Skip to content

Commit 51a438c

Browse files
authored
Update the rectangular (box) grid configurations. (CICE-Consortium#1006)
- Fix bug where left hand side of rectangular grids had incorrect longitudes and latitudes computed. This changes answers in some box configurations. - Update the box resolutions. dxrect and dyrect were hardwired to 30km for all box resolutions. Now adjust dxrect and dyrect depending on the number of gridcells so it always covers an area of about 3 degrees by 3 degrees. This means gbox12 is 30km resolution, gbox80 is 5km, gbox128 is 3 km, and gbox180 is 2 km. Reduce the gbox180 timestep to 1800s for stability. This changes answers for some box configurations. - Remove u masking from box2001 ocean forcing, bit-for-bit. - Remove 50W check associated with box2001 initial conditions, bit-for-bit. - Add rectangular grid diagnostics - Minor update to the box2001 documentation Explicitly set npt_unit in all set_nml files that have npt set. Improves robustness where one option sets npt and another sets npt_unit.
1 parent a19e5ca commit 51a438c

File tree

14 files changed

+36
-28
lines changed

14 files changed

+36
-28
lines changed

cicecore/cicedyn/general/ice_forcing.F90

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5202,7 +5202,6 @@ subroutine box2001_data_ocn
52025202
use ice_domain, only: nblocks, blocks_ice
52035203
use ice_blocks, only: block, get_block, nx_block, ny_block, nghost
52045204
use ice_flux, only: uocn, vocn
5205-
use ice_grid, only: uvm
52065205

52075206
! local parameters
52085207

@@ -5235,9 +5234,6 @@ subroutine box2001_data_ocn
52355234
vocn(i,j,iblk) = -p2*real(iglob(i), kind=dbl_kind) &
52365235
/ real(nx_global,kind=dbl_kind) + p1
52375236

5238-
uocn(i,j,iblk) = uocn(i,j,iblk) * uvm(i,j,iblk)
5239-
vocn(i,j,iblk) = vocn(i,j,iblk) * uvm(i,j,iblk)
5240-
52415237
enddo
52425238
enddo
52435239
enddo ! nblocks

cicecore/cicedyn/general/ice_init.F90

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,12 @@ subroutine input_data
19671967
write(nu_diag,1030) ' grid_ocn_dynu = ',trim(grid_ocn_dynu)
19681968
write(nu_diag,1030) ' grid_ocn_dynv = ',trim(grid_ocn_dynv)
19691969
write(nu_diag,1030) ' kmt_type = ',trim(kmt_type)
1970-
if (trim(grid_type) /= 'rectangular') then
1970+
if (trim(grid_type) == 'rectangular') then
1971+
write(nu_diag,1004) 'lon/lat refrect = ',lonrefrect,latrefrect
1972+
write(nu_diag,1004) 'dx/dy rect (cm) = ',dxrect,dyrect
1973+
write(nu_diag,1010) 'scale_dxdy = ',scale_dxdy
1974+
write(nu_diag,1004) 'dx/dy scale = ',dxscale,dyscale
1975+
else
19711976
if (use_bathymetry) then
19721977
tmpstr2 = ' : bathymetric input data is used'
19731978
else
@@ -2759,7 +2764,8 @@ subroutine input_data
27592764

27602765
1000 format (a20,1x,f13.6,1x,a) ! float
27612766
1002 format (a20,5x,f9.2,1x,a)
2762-
1003 format (a20,1x,G13.4,1x,a)
2767+
1003 format (a20,1x,g13.4,1x,a)
2768+
1004 format (a20,1x,2g13.4,1x,a)
27632769
1009 format (a20,1x,d13.6,1x,a)
27642770
1010 format (a20,8x,l6,1x,a) ! logical
27652771
1011 format (a20,1x,l6)
@@ -3318,23 +3324,9 @@ subroutine set_state_var (nx_block, ny_block, &
33183324
! location of ice
33193325
!---------------------------------------------------------
33203326

3321-
if (trim(ice_data_type) == 'box2001') then
3327+
icells = 0
33223328

3323-
! place ice on left side of domain
3324-
icells = 0
3325-
do j = jlo, jhi
3326-
do i = ilo, ihi
3327-
if (tmask(i,j)) then
3328-
if (ULON(i,j) < -50./rad_to_deg) then
3329-
icells = icells + 1
3330-
indxi(icells) = i
3331-
indxj(icells) = j
3332-
endif ! ULON
3333-
endif ! tmask
3334-
enddo ! i
3335-
enddo ! j
3336-
3337-
elseif (trim(ice_data_type) == 'boxslotcyl') then
3329+
if (trim(ice_data_type) == 'boxslotcyl') then
33383330

33393331
! Geometric configuration of the slotted cylinder
33403332
diam = p3 *dxrect*(nx_global-1)
@@ -3366,8 +3358,10 @@ subroutine set_state_var (nx_block, ny_block, &
33663358
enddo
33673359
enddo
33683360

3369-
elseif (trim(ice_data_type) == 'uniform') then
3361+
elseif (trim(ice_data_type) == 'uniform' .or. trim(ice_data_type) == 'box2001') then
33703362
! all cells not land mask are ice
3363+
! box2001 used to have a check for west of 50W, this was changed, so now box2001 is
3364+
! the same as uniform. keep box2001 option for backwards compatibility.
33713365
icells = 0
33723366
do j = jlo, jhi
33733367
do i = ilo, ihi

cicecore/cicedyn/infrastructure/ice_grid.F90

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ subroutine init_grid2
673673
!$OMP END PARALLEL DO
674674
endif
675675

676-
if (trim(grid_type) == 'regional' .and. &
676+
if ((trim(grid_type) == 'regional' .or. &
677+
trim(grid_type) == 'rectangular') .and. &
677678
(.not. (l_readCenter))) then
678679
! for W boundary extrapolate from interior
679680
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block)
@@ -2329,7 +2330,8 @@ subroutine Tlatlon
23292330
enddo ! iblk
23302331
!$OMP END PARALLEL DO
23312332

2332-
if (trim(grid_type) == 'regional') then
2333+
if (trim(grid_type) == 'regional' .or. &
2334+
trim(grid_type) == 'rectangular') then
23332335
! for W boundary extrapolate from interior
23342336
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block)
23352337
do iblk = 1, nblocks
@@ -2479,7 +2481,8 @@ subroutine NElatlon
24792481
enddo ! iblk
24802482
!$OMP END PARALLEL DO
24812483

2482-
if (trim(grid_type) == 'regional') then
2484+
if (trim(grid_type) == 'regional' .or. &
2485+
trim(grid_type) == 'rectangular') then
24832486
! for W boundary extrapolate from interior
24842487
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block)
24852488
do iblk = 1, nblocks

configuration/scripts/options/set_nml.bgcsklclim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ n_fed = 1
1212
n_fep = 1
1313
year_init = 2005
1414
istep0 = 0
15+
npt_unit = '1'
1516
npt = 168
1617
ice_ic = 'none'
1718
tr_brine = .true.

configuration/scripts/options/set_nml.box2001

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ grid_atm = 'B'
22
grid_ocn = 'B'
33
days_per_year = 360
44
use_leap_years = .false.
5+
npt_unit = '1'
56
npt = 240
67
ice_ic = 'internal'
78
restart_ext = .true.

configuration/scripts/options/set_nml.boxnodyn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ nilyr = 1
22
ice_ic = 'internal'
33
days_per_year = 360
44
use_leap_years = .false.
5+
npt_unit = '1'
56
npt = 72
67
dumpfreq = 'd'
78
dumpfreq_n = 2

configuration/scripts/options/set_nml.boxopen

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
npt_unit = '1'
12
npt = 48
23
ice_ic = 'internal'
34
use_leap_years = .false.

configuration/scripts/options/set_nml.boxslotcyl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ nilyr = 1
44
ice_ic = 'internal'
55
restart_ext = .false.
66
dt = 3600.0
7+
npt_unit = '1'
78
npt = 288
89
grid_type = 'rectangular'
910
kmt_type = 'default'

configuration/scripts/options/set_nml.boxwallblock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
days_per_year = 360
22
use_leap_years = .false.
3+
npt_unit = '1'
34
npt = 240
45
ice_ic = 'internal'
56
restart_ext = .true.

configuration/scripts/options/set_nml.gbox12

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
dxrect = 30.e5
2+
dyrect = 30.e5
13
ice_ic = 'internal'
24
grid_type = 'rectangular'
35
kmt_type = 'default'

0 commit comments

Comments
 (0)