Skip to content

Commit 7424588

Browse files
authored
Merge pull request #724 from GEOS-ESM/feature/zhaobin74/cice6-config-upd
add checking and setting restart flag in CICE6 config file in gcm_run
2 parents e408c73 + 818c156 commit 7424588

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gcm_run.j

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ setenv @LD_LIBRARY_PATH_CMD ${LD_LIBRARY_PATH}:${GEOSDIR}/lib
3737
# We only add BASEDIR to the @LD_LIBRARY_PATH_CMD if BASEDIR is defined (i.e., not running with Spack)
3838
if ( $?BASEDIR ) then
3939
setenv @LD_LIBRARY_PATH_CMD ${@LD_LIBRARY_PATH_CMD}:${BASEDIR}/${ARCH}/lib
40+
setenv PATH ${PATH}:${BASEDIR}/${ARCH}/bin
4041
endif
4142

4243
setenv RUN_CMD "@RUN_CMD"
@@ -841,6 +842,16 @@ endif
841842
#ln -sf $SSTDIR/dataoceanfile_MERRA2_SST.${OGCM_IM}x${OGCM_JM}.${yy}.data sst.data
842843
#ln -sf $SSTDIR/dataoceanfile_MERRA2_ICE.${OGCM_IM}x${OGCM_JM}.${yy}.data fraci.data
843844

845+
@CICE6 #detect exisistence of certain fields in CICE6 restart
846+
@CICE6 ncdump -h INPUT/iced.nc | grep 'apnd' > /dev/null
847+
@CICE6 if( $status == 0 ) then
848+
@CICE6 echo 'pond state in restart, turn on restart flag if not already'
849+
@CICE6 sed -i -E 's/^[[:space:]]*restart_pond_lvl[[:space:]]*=[[:space:]]*\.false\./ restart_pond_lvl = .true./' ice_in
850+
@CICE6 else
851+
@CICE6 echo 'pond state NOT in restart, turn off restart flag if already on'
852+
@CICE6 sed -i -E 's/^[[:space:]]*restart_pond_lvl[[:space:]]*=[[:space:]]*\.true\./ restart_pond_lvl = .false./' ice_in
853+
@CICE6 endif
854+
844855
#######################################################################
845856
# Split Saltwater Restart if detected
846857
#######################################################################

0 commit comments

Comments
 (0)