Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to:
#183
CICE with dynamics allocatable through namelist
One of my test using GX3 (24 iterations):
CICE_v6/GX3> md5sum history./icednc
1b47affe3502c4e9354691c22785c916 history.AllocDyn/iced.1998-01-02-00000.nc
1b47affe3502c4e9354691c22785c916 history.master/iced.1998-01-02-00000.nc
--o--
INFO:
New namelist info (and default values):
&domain_nml
nprocs = -1
max_blocks = -1 ! MXBLCK
block_size_x = -1 ! BLCKX
block_size_y = -1 ! BLCKY
nx_global = -1 ! NXGLOB
ny_global = -1 ! NYGLOB
...
CICE stops with ERROR if the namelist settings are <1 - except for max_blocks. If max_blocks is <1 it is automatically calculated/estimated as:
max_blocks=( ((nx_global-1)/block_size_x + 1) * ((ny_global-1)/block_size_y + 1) ) / nprocs
--o--
affected files:
cicecore/shared/ice_domain_size.F90
cicecore/shared/ice_arrays_column.F90
cicecore/drivers/cice/CICE_InitMod.F90
cicecore/drivers/hadgem3/CICE_InitMod.F90
cicecore/drivers/cesm/CICE_InitMod.F90
cicecore/cicedynB/infrastructure/ice_grid.F90
cicecore/cicedynB/infrastructure/ice_restoring.F90
cicecore/cicedynB/general/ice_flux.F90
cicecore/cicedynB/general/ice_state.F90
cicecore/cicedynB/general/ice_forcing.F90
cicecore/cicedynB/general/ice_forcing_bgc.F90
cicecore/cicedynB/general/ice_flux_bgc.F90
configuration/scripts/ice_in (setup to GX3)
--o--
TIP: If you want to keep the CPPDEFS to specify blocks, grid size etc., You can add a "sed" command similar to this:
cat ice_in_tmp | sed s/'^.nprocs.$'/" nprocs = ${nprocs}"/g
| sed s/'^.max_blocks.$'/" , max_blocks = ${MXBLCK}"/g
| sed s/'^.block_size_x.$'/" , block_size_x = ${BLCKX}"/g
| sed s/'^.block_size_y.$'/" , block_size_y = ${BLCKY}"/g
| sed s/'^.nx_global.$'/" , nx_global = ${NXGLOB}"/g
| sed s/'^.ny_global.$'/" , ny_global = ${NYGLOB}"/g > ice_in
MXBLCK can be set to 0. The it is calculated as:
max_blocks = (nx_global/block_size_x)*(ny_global/block_size_y) / nprocs
(as suggested within ice_domain_size.F90)