diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 659711710..5cbaedcb6 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -63,7 +63,7 @@ subroutine input_data diag_file, print_global, print_points, latpnt, lonpnt, & debug_model, debug_model_step, debug_model_task, & debug_model_i, debug_model_j, debug_model_iblk - use ice_domain, only: close_boundaries, orca_halogrid + use ice_domain, only: close_boundaries use ice_domain_size, only: & ncat, nilyr, nslyr, nblyr, nfsd, nfreq, & n_iso, n_aero, n_zaero, n_algae, & @@ -174,6 +174,7 @@ subroutine input_data logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo integer (kind=int_kind) :: numin, numax ! unit number limits logical (kind=log_kind) :: lcdf64 ! deprecated, backwards compatibility + logical (kind=log_kind) :: orca_halogrid !deprecated integer (kind=int_kind) :: rplvl, rptopo real (kind=dbl_kind) :: Cf, ksno, puny, ice_ref_salinity, Tocnfrz @@ -382,7 +383,7 @@ subroutine input_data grid_atm = 'A' ! underlying atm forcing/coupling grid grid_ocn = 'A' ! underlying atm forcing/coupling grid gridcpl_file = 'unknown_gridcpl_file' - orca_halogrid = .false. ! orca haloed grid + orca_halogrid = .false. ! orca haloed grid - deprecated bathymetry_file = 'unknown_bathymetry_file' bathymetry_format = 'default' use_bathymetry = .false. @@ -1266,7 +1267,7 @@ subroutine input_data endif abort_list = trim(abort_list)//":1" endif - + if (history_format /= 'cdf1' .and. & history_format /= 'cdf2' .and. & history_format /= 'cdf5' .and. & @@ -1829,6 +1830,20 @@ subroutine input_data endif endif + if (orca_halogrid) then + if (my_task == master_task) then + write(nu_diag,*) subname//' ERROR: orca_halogrid has been deprecated' + endif + abort_list = trim(abort_list)//":63" + endif + + if (trim(grid_type) == 'cpom_grid') then + if (my_task == master_task) then + write(nu_diag,*) subname//" ERROR: grid_type = 'cpom_grid' has been deprecated" + endif + abort_list = trim(abort_list)//":64" + endif + ice_IOUnitsMinUnit = numin ice_IOUnitsMaxUnit = numax @@ -2579,7 +2594,6 @@ subroutine input_data if (trim(kmt_type) == 'file') & write(nu_diag,1031) ' kmt_file = ', trim(kmt_file) endif - write(nu_diag,1011) ' orca_halogrid = ', orca_halogrid write(nu_diag,1011) ' conserv_check = ', conserv_check diff --git a/cicecore/cicedyn/infrastructure/ice_domain.F90 b/cicecore/cicedyn/infrastructure/ice_domain.F90 index 91af49947..301120108 100644 --- a/cicecore/cicedyn/infrastructure/ice_domain.F90 +++ b/cicecore/cicedyn/infrastructure/ice_domain.F90 @@ -64,8 +64,7 @@ module ice_domain maskhalo_remap , & ! if true, use masked halo updates for transport maskhalo_bound , & ! if true, use masked halo updates for bound_state halo_dynbundle , & ! if true, bundle halo update in dynamics - landblockelim , & ! if true, land block elimination is on - orca_halogrid ! if true, input fields are haloed as defined by orca grid + landblockelim ! if true, land block elimination is on !----------------------------------------------------------------------- ! diff --git a/cicecore/cicedyn/infrastructure/ice_grid.F90 b/cicecore/cicedyn/infrastructure/ice_grid.F90 index de0fbb586..53082aeaf 100644 --- a/cicecore/cicedyn/infrastructure/ice_grid.F90 +++ b/cicecore/cicedyn/infrastructure/ice_grid.F90 @@ -498,8 +498,6 @@ subroutine init_grid2 call latlongrid ! lat lon grid for sequential CESM (CAM mode) return #endif - elseif (trim(grid_type) == 'cpom_grid') then - call cpomgrid ! cpom model orca1 type grid else call rectgrid ! regular rectangular grid endif @@ -643,9 +641,7 @@ subroutine init_grid2 !----------------------------------------------------------------- ! Compute ANGLE on T-grid !----------------------------------------------------------------- - if (trim(grid_type) == 'cpom_grid') then - ANGLET(:,:,:) = ANGLE(:,:,:) - else if (.not. (l_readCenter)) then + if (.not. (l_readCenter)) then ANGLET = c0 !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block, & @@ -675,7 +671,7 @@ subroutine init_grid2 enddo enddo !$OMP END PARALLEL DO - endif ! cpom_grid + endif if (trim(grid_type) == 'regional' .and. & (.not. (l_readCenter))) then @@ -1833,112 +1829,6 @@ subroutine grid_boxislands_kmt (work) end subroutine grid_boxislands_kmt -!======================================================================= - -! CPOM displaced pole grid and land mask. \\ -! Grid record number, field and units are: \\ -! (1) ULAT (degrees) \\ -! (2) ULON (degrees) \\ -! (3) HTN (m) \\ -! (4) HTE (m) \\ -! (7) ANGLE (radians) \\ -! -! Land mask record number and field is (1) KMT. -! -! author: Adrian K. Turner, CPOM, UCL, 09/08/06 - - subroutine cpomgrid - - integer (kind=int_kind) :: & - i, j, iblk, & - ilo,ihi,jlo,jhi ! beginning and end of physical domain - - logical (kind=log_kind) :: diag - - real (kind=dbl_kind), dimension(:,:), allocatable :: & - work_g1 - - real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks) :: & - work1 - - real (kind=dbl_kind) :: & - rad_to_deg - - type (block) :: & - this_block ! block information for current block - - character(len=*), parameter :: subname = '(cpomgrid)' - - call icepack_query_parameters(rad_to_deg_out=rad_to_deg) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__, line=__LINE__) - - call ice_open(nu_grid,grid_file,64) - call ice_open(nu_kmt,kmt_file,32) - - diag = .true. ! write diagnostic info - - ! topography - call ice_read(nu_kmt,1,work1,'ida4',diag) - - hm (:,:,:) = c0 - kmt(:,:,:) = c0 - !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) - do iblk = 1, nblocks - this_block = get_block(blocks_ice(iblk),iblk) - ilo = this_block%ilo - ihi = this_block%ihi - jlo = this_block%jlo - jhi = this_block%jhi - - do j = jlo, jhi - do i = ilo, ihi - kmt(i,j,iblk) = work1(i,j,iblk) - if (kmt(i,j,iblk) >= c1) hm(i,j,iblk) = c1 - enddo - enddo - enddo - !$OMP END PARALLEL DO - - allocate(work_g1(nx_global,ny_global)) - - ! lat, lon, cell dimensions, angles - call ice_read_global(nu_grid,1,work_g1, 'rda8',diag) - call scatter_global(ULAT, work_g1, master_task, distrb_info, & - field_loc_NEcorner, field_type_scalar) - - call ice_read_global(nu_grid,2,work_g1, 'rda8',diag) - call scatter_global(ULON, work_g1, master_task, distrb_info, & - field_loc_NEcorner, field_type_scalar) - - call ice_read_global(nu_grid,3,work_g1, 'rda8',diag) - work_g1 = work_g1 * m_to_cm - call primary_grid_lengths_HTN(work_g1) ! dxU, dxT, dxN, dxE - - call ice_read_global(nu_grid,4,work_g1, 'rda8',diag) - work_g1 = work_g1 * m_to_cm - call primary_grid_lengths_HTE(work_g1) ! dyU, dyT, dyN, dyE - - call ice_read_global(nu_grid,7,work_g1,'rda8',diag) - call scatter_global(ANGLE, work_g1, master_task, distrb_info, & - field_loc_NEcorner, field_type_scalar) - - ! fix units - ULAT = ULAT / rad_to_deg - ULON = ULON / rad_to_deg - - deallocate(work_g1) - - if (my_task == master_task) then - close (nu_grid) - close (nu_kmt) - endif - - write(nu_diag,*) subname," min/max HTN: ", minval(HTN), maxval(HTN) - write(nu_diag,*) subname," min/max HTE: ", minval(HTE), maxval(HTE) - - end subroutine cpomgrid !======================================================================= diff --git a/cicecore/cicedyn/infrastructure/ice_read_write.F90 b/cicecore/cicedyn/infrastructure/ice_read_write.F90 index b8bafc10b..784f54f07 100644 --- a/cicecore/cicedyn/infrastructure/ice_read_write.F90 +++ b/cicecore/cicedyn/infrastructure/ice_read_write.F90 @@ -18,7 +18,7 @@ module ice_read_write field_loc_noupdate, field_type_noupdate use ice_communicate, only: my_task, master_task use ice_broadcast, only: broadcast_scalar - use ice_domain, only: distrb_info, orca_halogrid + use ice_domain, only: distrb_info use ice_domain_size, only: max_blocks, nx_global, ny_global, ncat use ice_blocks, only: nx_block, ny_block, nghost use ice_exit, only: abort_ice @@ -1143,20 +1143,8 @@ subroutine ice_read_nc_xy(fid, nrec, varname, work, diag, & integer (kind=int_kind) :: lnrec ! local value of nrec - real (kind=dbl_kind), dimension(:,:), allocatable :: & - work_g2 - lnrec = nrec - if (orca_halogrid .and. .not. present(restart_ext)) then - if (my_task == master_task) then - allocate(work_g2(nx_global+2,ny_global+1)) - else - allocate(work_g2(1,1)) ! to save memory - endif - work_g2(:,:) = c0 - endif - nx = nx_global ny = ny_global @@ -1207,18 +1195,10 @@ subroutine ice_read_nc_xy(fid, nrec, varname, work, diag, & ! Read global array !-------------------------------------------------------------- - if (orca_halogrid .and. .not. present(restart_ext)) then - status = nf90_get_var( fid, varid, work_g2, & - start=(/1,1,lnrec/), count=(/nx_global+2,ny_global+1,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - work_g1 = work_g2(2:nx_global+1,1:ny_global) - else - status = nf90_get_var( fid, varid, work_g1, & - start=(/1,1,lnrec/), count=(/nx,ny,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - endif + status = nf90_get_var( fid, varid, work_g1, & + start=(/1,1,lnrec/), count=(/nx,ny,1/)) + call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & + file=__FILE__, line=__LINE__) endif ! my_task = master_task @@ -1272,8 +1252,6 @@ subroutine ice_read_nc_xy(fid, nrec, varname, work, diag, & ! echmod: this should not be necessary if fill/missing are only on land where (work > 1.0e+30_dbl_kind) work = c0 - if (orca_halogrid .and. .not. present(restart_ext)) deallocate(work_g2) - #else work = c0 ! to satisfy intent(out) attribute call abort_ice(subname//' ERROR: USE_NETCDF cpp not defined', & @@ -1346,20 +1324,8 @@ subroutine ice_read_nc_xyz(fid, nrec, varname, work, diag, & integer (kind=int_kind) :: lnrec ! local value of nrec - real (kind=dbl_kind), dimension(:,:,:), allocatable :: & - work_g2 - lnrec = nrec - if (orca_halogrid .and. .not. present(restart_ext)) then - if (my_task == master_task) then - allocate(work_g2(nx_global+2,ny_global+1,ncat)) - else - allocate(work_g2(1,1,ncat)) ! to save memory - endif - work_g2(:,:,:) = c0 - endif - nx = nx_global ny = ny_global @@ -1408,18 +1374,10 @@ subroutine ice_read_nc_xyz(fid, nrec, varname, work, diag, & ! Read global array !-------------------------------------------------------------- - if (orca_halogrid .and. .not. present(restart_ext)) then - status = nf90_get_var( fid, varid, work_g2, & - start=(/1,1,1,lnrec/), count=(/nx_global+2,ny_global+1,ncat,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - work_g1 = work_g2(2:nx_global+1,1:ny_global,:) - else - status = nf90_get_var( fid, varid, work_g1, & - start=(/1,1,1,lnrec/), count=(/nx,ny,ncat,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - endif + status = nf90_get_var( fid, varid, work_g1, & + start=(/1,1,1,lnrec/), count=(/nx,ny,ncat,1/)) + call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & + file=__FILE__, line=__LINE__) endif ! my_task = master_task @@ -1478,7 +1436,6 @@ subroutine ice_read_nc_xyz(fid, nrec, varname, work, diag, & endif deallocate(work_g1) - if (orca_halogrid .and. .not. present(restart_ext)) deallocate(work_g2) #else call abort_ice(subname//' ERROR: USE_NETCDF cpp not defined', & @@ -1558,20 +1515,9 @@ subroutine ice_read_nc_xyf(fid, nrec, varname, work, diag, & character(len=*), parameter :: subname = '(ice_read_nc_xyf)' #ifdef USE_NETCDF - real (kind=dbl_kind), dimension(:,:,:), allocatable :: & - work_g2 lnrec = nrec - if (orca_halogrid .and. .not. present(restart_ext)) then - if (my_task == master_task) then - allocate(work_g2(nx_global+2,ny_global+1,nfreq)) - else - allocate(work_g2(1,1,nfreq)) ! to save memory - endif - work_g2(:,:,:) = c0 - endif - nx = nx_global ny = ny_global @@ -1620,18 +1566,10 @@ subroutine ice_read_nc_xyf(fid, nrec, varname, work, diag, & ! Read global array !-------------------------------------------------------------- - if (orca_halogrid .and. .not. present(restart_ext)) then - status = nf90_get_var( fid, varid, work_g2, & - start=(/1,1,1,lnrec/), count=(/nx_global+2,ny_global+1,nfreq,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - work_g1 = work_g2(2:nx_global+1,1:ny_global,:) - else - status = nf90_get_var( fid, varid, work_g1, & - start=(/1,1,1,lnrec/), count=(/nx,ny,nfreq,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - endif + status = nf90_get_var( fid, varid, work_g1, & + start=(/1,1,1,lnrec/), count=(/nx,ny,nfreq,1/)) + call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & + file=__FILE__, line=__LINE__) endif ! my_task = master_task @@ -1693,7 +1631,6 @@ subroutine ice_read_nc_xyf(fid, nrec, varname, work, diag, & where (work > 1.0e+30_dbl_kind) work = c0 deallocate(work_g1) - if (orca_halogrid .and. .not. present(restart_ext)) deallocate(work_g2) #else call abort_ice(subname//' ERROR: USE_NETCDF cpp not defined', & @@ -2501,17 +2438,6 @@ subroutine ice_read_global_nc (fid, nrec, varname, work_g, diag) ! character (char_len) :: & ! dimname ! dimension name ! - real (kind=dbl_kind), dimension(:,:), allocatable :: & - work_g3 - - if (orca_halogrid) then - if (my_task == master_task) then - allocate(work_g3(nx_global+2,ny_global+1)) - else - allocate(work_g3(1,1)) ! to save memory - endif - work_g3(:,:) = c0 - endif work_g(:,:) = c0 @@ -2529,42 +2455,35 @@ subroutine ice_read_global_nc (fid, nrec, varname, work_g, diag) ! Read global array !-------------------------------------------------------------- - if (orca_halogrid) then - status = nf90_get_var( fid, varid, work_g3, & - start=(/1,1,nrec/), count=(/nx_global+2,ny_global+1,1/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) - work_g=work_g3(2:nx_global+1,1:ny_global) - else - ! Check var size : is var 2d ? - status = nf90_inquire_variable(fid, varid, ndims=ndim, dimids=dimids) - call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & - file=__FILE__, line=__LINE__) - if ( ndim > 2 ) then - call abort_ice(subname//' ERROR: '//trim(varname)//' cannot have more than 2 dimensions', & - file=__FILE__, line=__LINE__) - endif - ! Is work_g the same size as the variable? - status = nf90_inquire_dimension(fid, dimids(1), len=dimlen) - call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & - file=__FILE__, line=__LINE__) - if ( dimlen /= size(work_g,1) ) then - call abort_ice(subname//' ERROR: x dim of '//trim(varname)//' wrong size, check nx_global', & - file=__FILE__, line=__LINE__) - endif - status = nf90_inquire_dimension(fid, dimids(2), len=dimlen) - call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & - file=__FILE__, line=__LINE__) - if ( dimlen /= size(work_g,2) ) then - call abort_ice(subname//' ERROR: y dim of '//trim(varname)//' wrong size, check ny_global', & - file=__FILE__, line=__LINE__) - endif - - ! Get the data - status = nf90_get_var( fid, varid, work_g, start=(/1,1,nrec/)) - call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & - file=__FILE__, line=__LINE__) + ! Check var size : is var 2d ? + status = nf90_inquire_variable(fid, varid, ndims=ndim, dimids=dimids) + call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & + file=__FILE__, line=__LINE__) + if ( ndim > 2 ) then + call abort_ice(subname//' ERROR: '//trim(varname)//' cannot have more than 2 dimensions', & + file=__FILE__, line=__LINE__) + endif + ! Is work_g the same size as the variable? + status = nf90_inquire_dimension(fid, dimids(1), len=dimlen) + call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & + file=__FILE__, line=__LINE__) + if ( dimlen /= size(work_g,1) ) then + call abort_ice(subname//' ERROR: x dim of '//trim(varname)//' wrong size, check nx_global', & + file=__FILE__, line=__LINE__) endif + status = nf90_inquire_dimension(fid, dimids(2), len=dimlen) + call ice_check_nc(status, subname//' ERROR: Cannot check variable '//trim(varname), & + file=__FILE__, line=__LINE__) + if ( dimlen /= size(work_g,2) ) then + call abort_ice(subname//' ERROR: y dim of '//trim(varname)//' wrong size, check ny_global', & + file=__FILE__, line=__LINE__) + endif + + ! Get the data + status = nf90_get_var( fid, varid, work_g, start=(/1,1,nrec/)) + call ice_check_nc(status, subname//' ERROR: Cannot get variable '//trim(varname), & + file=__FILE__, line=__LINE__) + endif ! my_task = master_task !------------------------------------------------------------------- @@ -2587,8 +2506,6 @@ subroutine ice_read_global_nc (fid, nrec, varname, work_g, diag) write(nu_diag,*) subname,' min, max, sum = ', amin, amax, asum, trim(varname) endif - if (orca_halogrid) deallocate(work_g3) - #else call abort_ice(subname//' ERROR: USE_NETCDF cpp not defined', & file=__FILE__, line=__LINE__) diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index d97671021..b3fc5404d 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -100,7 +100,6 @@ nilyr = 7 nslyr = 1 nblyr = 1 - orca_halogrid = .false. / &tracer_nml diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index f148a8f57..1e5302461 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -5,7 +5,7 @@ smoke gx3 1x4 debug,diag1,run2day smoke gx3 4x1 debug,diag1,run5day restart gx3 8x2 debug restart gx3 8x2 debug,gx3nc -smoke gx3 8x2 diag24,run1year,medium +smoke gx3 8x2 diag24,run1year,long smoke gx3 7x2 diag1,bigdiag,run1day,diagpt1 decomp gx3 4x2x25x29x5 none smoke gx3 4x2 diag1,run5day smoke_gx3_8x2_diag1_run5day @@ -14,21 +14,17 @@ smoke gx3 1x8 diag1,run5day,evp1d restart gx1 40x4 droundrobin,medium restart tx1 40x4 dsectrobin,medium restart tx1 40x4 dsectrobin,medium,jra55do -restart gx3 4x4 short +restart gx3 4x4 medium restart gx3 4x4 gx3nc,short -restart gx3 10x4 maskhalo,short +restart gx3 10x4 maskhalo,medium restart gx3 6x2 alt01 restart gx3 8x2 alt02 restart gx3 4x2 alt03 restart gx3 12x2 alt03,maskhalo,droundrobin restart gx3 4x4 alt04 -restart gx3 4x4 alt05,short +restart gx3 4x4 alt05,medium restart gx3 8x2 alt06 -restart gx3 8x3 alt07 restart gx3 16x2 snicar -restart gx3 12x2 snicartest -restart gx3 8x2 congel -restart gx3 8x3 saltflux,short restart gx3 18x2 debug,maskhalo restart gx3 6x2 alt01,debug,short restart gx3 8x2 alt02,debug,short @@ -80,7 +76,7 @@ smoke gx3 4x1 snwitdrdg,snwgrain,icdefault,debug smoke gx3 4x1 snw30percent,icdefault,debug restart gx3 8x2 snwitdrdg,icdefault,snwgrain restart gx3 4x4 gx3ncarbulk,iobinary,medium -restart gx3 4x4 cdf64,histall,precision8,short +restart gx3 4x4 cdf64,histall,precision8,medium smoke gx3 30x1 bgcz,histall smoke gx3 14x2 fsd12,histall smoke gx3 4x1 dynpicard diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 21726f295..9bfd3a65b 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -337,7 +337,6 @@ grid_nml "``nfsd``", "integer", "number of floe size categories", "1" "``nilyr``", "integer", "number of vertical layers in ice", "0" "``nslyr``", "integer", "number of vertical layers in snow", "0" - "``orca_halogrid``", "logical", "use orca haloed grid for data/grid read", "``.false.``" "``scale_dxdy``", "logical", "apply dxscale, dyscale to rectgrid", "``false``" "``use_bathymetry``", "logical", "use read in bathymetry file for seabedstress option", "``.false.``" "", "", "", ""