The purpose of the setup script, csim.setup.csh, is to build an executable version of the ice model, document what source code and data files are being used in the ice.log.$LID file, and gather or create any necessary input data files. $LID is a time stamp set in the run script. The environment variables set locally in the ice setup script are listed in Table 2.
Variable | Description |
CASE | case name |
CASESTR | short descriptive text string, used in history files |
OCEANMIXED_ICE | logical variable used to implement ocean mixed layer model |
ICE_GRID | ice model grid (gx3v5 or gx1v3) |
RUNTYPE | run type (startup or continue) |
NCAT | number of thickness categories in the ice thickness distribution |
NX | number of processors assigned in the x direction, used for MPI grid decomposition |
NY | number of processors assigned in the y direction, used for MPI grid decomposition |
BINTYPE | Set to MPI for internal parallelization, set to single for non-MPI runs |
CSIMDIR | source code base directory |
SHRCODE | share code directory |
CSIMDATA | input data base directory |
CBLD | makefile and Macros directory |
EXEROOT | Run model, mv data, output put here |
LID | timestamp for file ID string |
OBJDIR | ice model code is built here |
$HSTDIR, $RSTDIR and $INIDIR are the directories in
$EXEROOT where the history, restart, and initial condition
files are output, respectively. The ice model input templates are
located in $ICESRC. These templates are fortran modules that contain
information on grid dimensions, number of ice thickness categories and
vertical resolution in the ice categories. The grid is determined in
the run script and the resolution $RES is set in csim.setup.csh:
100x116 for the gx3v5 grid and 320x384 for gx1v3. Depending on $RES and the
number of ice thickness categories $NCAT set in csim_run, the
appropriate input template ice_model_size.${RES}x${NCAT} will
be copied into the directory where the ice model is being built and renamed
ice_model_size.F. Files exist for the following configurations:
$CSIMDIR/input_templates/ice_model_size.F.100x116x1
$CSIMDIR/input_templates/ice_model_size.F.100x116x3
$CSIMDIR/input_templates/ice_model_size.F.100x116x5
$CSIMDIR/input_templates/ice_model_size.F.100x116x10
$CSIMDIR/input_templates/ice_model_size.F.320x384x1
$CSIMDIR/input_templates/ice_model_size.F.320x384x3
$CSIMDIR/input_templates/ice_model_size.F.320x384x5
$CSIMDIR/input_templates/ice_model_size.F.320x384x10
The variable $OML_ICE_SST_INIT is used if $OCEANMIXED_ICE is set to .true. in the run script and determines the initial sea surface temperature. If the run is a startup run, this variable is set to true in the ice setup script, and the January 1 value of the sea surface temperature is read from the POP forcing file. Thereafter, the value of $OML_ICE_SST_INIT is set to .false., and sea surface temperature and the freeze/melt potential is read from a restart file.
Symbol | Description |
HSTDIR | directory where history files are written |
RSTDIR | directory where restart files are written |
INIDIR | directory where initial condition files are written |
ICESRC | directory where ice model input templates are located |
RES | grid dimensions used to select model resolution |
NLAT | number of latitudes in grid resolution |
NLON | number of longitudes in grid resolution |
OML_ICE_SST_INIT | logical variable, if true initialize ocean mixed layer temperature from within ice model |
RESTART | logical variable used to initialize model from a restart file |
RSTFILE | name of restart file |
The ice model contains two namelists. The variables for both lists are set in csim.setup.csh and are written to the file ice_in in $EXEROOT when the setup script is executed. Changes to the namelists must be made in the run or setup script, not in the ice_in file. The ice model reads his file at runtime. Therefore, the namelist will be updated even if the ice model is not recompiled.
One namelist is called icefields_nml and is defined in ice_history.F. It contains a list of logical variables that correspond to ice fields that will be written to the history file. By default, all these variables are set to .true., so leaving the namelist blank will result in all fields being written to the history file. The available fields are listed in Table 11. Changing the content of the history files via the namelist is discussed in section 8.3.3.
The other namelist is called ice_nml and is defined in ice_init.F. It contains variables that control the physics used in the model. They are listed in Tables 3-8. Some of the variables in the namelist are determined from environment variables set in the scripts. Variables that are commonly changed directly in the namelist are the timestep dt, the length of the model run npt, and the number of subcycles per timestep in the ice dynamics ndte.