Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions AGCM.rc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ OGCM.JM_WORLD: @OGCM_JM
OGCM.LM: @OGCM_LM
@COUPLED OGCM.NX: @OGCM_NX
@COUPLED OGCM.NY: @OGCM_NY
@MOM5 OGCM.GRIDSPEC: MAPL_Tripolar.nc
@MOM6 OGCM.GRIDSPEC: MAPL_Tripolar.nc
@MIT OGCM.GRIDSPEC: mit.ascii
@MIT OCEAN_DIR: mitocean_run
Expand Down Expand Up @@ -1007,15 +1006,15 @@ USE_WAVES: 0
@COUPLED steady_state_ocean: 0
@COUPLED OCEAN_PICE_SCALING: 0.0

# For running MOM5 coupled model in dual ocean mode, uncomment three lines below,
# For running MOM6 coupled model in dual ocean mode, uncomment three lines below,
# make sure that regular replay is enabled, proper PRECIP_FILE is chosen,
# sst.data and fraci.data are pointing to read forcing files on tripolar grid,
# the run starts at 21z/03z/09z/15z,
# HISTORY.rc collections have proper ref_time field
# ---------------------------------------------------------------------------
@MOM5#DUAL_OCEAN: 1
@MOM5#DATA_SST_FILE: sst.data
@MOM5#DATA_FRT_FILE: fraci.data
@MOM6#DUAL_OCEAN: 1
@MOM6#DATA_SST_FILE: sst.data
@MOM6#DATA_FRT_FILE: fraci.data

@COUPLED
@COUPLED# Section for CICE
Expand Down
2 changes: 0 additions & 2 deletions gcm_forecast.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ done:
setenv BCSDIR @BCSDIR
@DATAOCEANsetenv SSTDIR @SSTDIR
setenv BCRSLV @ATMOStag_@OCEANtag
@MOM5setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1
@MOM6setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1

#this is hard-wired for NAS for now - should make it more general
Expand Down Expand Up @@ -696,7 +695,6 @@ endif

if (! -e tile.bin) then
$GEOSBIN/binarytile.x tile.data tile.bin
@MOM5 $GEOSBIN/binarytile.x tile_hist.data tile_hist.bin
endif

# If running in dual ocean mode, link sst and fraci data here
Expand Down
8 changes: 0 additions & 8 deletions gcm_regress.j
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ COLLECTIONS: test_collection
@DATAOCEAN 'T' , 'DYN' ,
@DATAOCEAN 'U;V' , 'DYN' ,
@DATAOCEAN 'Q' , 'MOIST', 'QV',
@MOM5 test_collection.fields: 'UW' ,'MOM' , 'US',
@MOM5 'VW' ,'MOM' , 'VS',
@MOM5 'TW' ,'MOM' , 'TS',
@MOM5 'SW' ,'MOM' , 'SS',
@MOM5 'SLV' ,'MOM' ,
@MOM5 'QFLUX','OCEAN' ,
@MOM6 test_collection.fields: 'UW' ,'MOM6' , 'US',
@MOM6 'VW' ,'MOM6' , 'VS',
@MOM6 'TW' ,'MOM6' , 'TS',
Expand Down Expand Up @@ -801,7 +795,6 @@ if ( $RUN_LAYOUT == TRUE) then
@COUPLED /bin/mv AGCM.rc AGCM.tmp
@COUPLED cat AGCM.tmp | sed -e "s?$oldstring?$newstring?g" > AGCM.rc

@MOM5sed -r -i -e "/^ *layout/ s#= ([0-9]+),*([0-9]+)#= ${test_NY},${test_NX}#" input.nml
@MOM6sed -r -i -e "s/#override LAYOUT = 3, 2/#override LAYOUT = ${test_NY}, ${test_NX}/g" MOM_override

setenv YEAR `cat cap_restart | cut -c1-4`
Expand Down Expand Up @@ -924,7 +917,6 @@ if ( $RUN_OPENMP == TRUE) then
@COUPLED /bin/mv AGCM.rc AGCM.tmp
@COUPLED cat AGCM.tmp | sed -e "s?$oldstring?$newstring?g" > AGCM.rc

@MOM5sed -r -i -e "/^ *layout/ s#= ([0-9]+),*([0-9]+)#= ${OGCM_NX0},${OGCM_NY0}#" input.nml
@MOM6sed -r -i -e "s/#override LAYOUT = 3, 2/#override LAYOUT = ${OGCM_NX0}, ${OGCM_NY0}/g" MOM_override

setenv YEAR `cat cap_restart | cut -c1-4`
Expand Down
11 changes: 0 additions & 11 deletions gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ done:
setenv BCSDIR @BCSDIR
@DATAOCEANsetenv SSTDIR @SSTDIR
setenv BCRSLV @ATMOStag_@OCEANtag
@MOM5setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1
@MOM6setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1

#this is hard-wired for NAS for now - should make it more general
Expand Down Expand Up @@ -804,8 +803,6 @@ endif
@COUPLEDset HEARTBEAT_DT = `grep '^\s*HEARTBEAT_DT:' CAP.rc | cut -d: -f2 | awk '{print $1}'`

@COUPLED sed -i -e "s/OGCM_RUN_DT: [0-9]\+\(\.[0-9]\+\)\?/OGCM_RUN_DT: $HEARTBEAT_DT/g" AGCM.rc
@MOM5 sed -i -e "s/dt_cpld = [0-9]\+\(\.[0-9]\+\)\?,/dt_cpld = $HEARTBEAT_DT,/g" \
@MOM5 -e "s/dt_atmos = [0-9]\+\(\.[0-9]\+\)\?,/dt_atmos = $HEARTBEAT_DT,/g" MOM_override
@MOM6 sed -i -e "s/DT = [0-9]\+\(\.[0-9]\+\)\?/DT = $HEARTBEAT_DT/g" \
@MOM6 -e "s/DT_THERM = [0-9]\+\(\.[0-9]\+\)\?/DT_THERM = $HEARTBEAT_DT/g" MOM_override
@CICE6 sed -i -E "s/^([[:space:]]*dt[[:space:]]*=[[:space:]]*)[0-9]+(\.[0-9]+)?/\1${HEARTBEAT_DT}/" ice_in
Expand Down Expand Up @@ -1352,15 +1349,7 @@ end

@COUPLED # MOM-Specific Output Files
@COUPLED # -------------------------
@MOM5 set dsets="ocean_month"
@MOM6 set dsets="ocean_state prog_z sfc_ave forcing"
@MOM5 foreach dset ( $dsets )
@MOM5 set num = `/bin/ls -1 $dset.nc | wc -l`
@MOM5 if($num != 0) then
@MOM5 if(! -e $EXPDIR/MOM_Output) mkdir -p $EXPDIR/MOM_Output
@MOM5 /bin/mv $SCRDIR/$dset.nc $EXPDIR/MOM_Output/$dset.${edate}.nc
@MOM5 endif
@MOM5 end
@MOM6 foreach dset ( $dsets )
@MOM6 set num = `/bin/ls -1 $dset.nc | wc -l`
@MOM6 if($num != 0) then
Expand Down
9 changes: 0 additions & 9 deletions gcm_run.j-new_rst_approach
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ done:
setenv BCSDIR @BCSDIR
@DATAOCEANsetenv SSTDIR @SSTDIR
setenv BCRSLV @ATMOStag_@OCEANtag
@MOM5setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1
@MOM6setenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}/v1

#this is hard-wired for NAS for now - should make it more general
Expand Down Expand Up @@ -1278,15 +1277,7 @@ end

@COUPLED # MOM-Specific Output Files
@COUPLED # -------------------------
@MOM5 set dsets="ocean_month"
@MOM6 set dsets="ocean_state prog_z sfc_ave forcing"
@MOM5 foreach dset ( $dsets )
@MOM5 set num = `/bin/ls -1 $dset.nc | wc -l`
@MOM5 if($num != 0) then
@MOM5 if(! -e $EXPDIR/MOM_Output) mkdir -p $EXPDIR/MOM_Output
@MOM5 /bin/mv $SCRDIR/$dset.nc $EXPDIR/MOM_Output/$dset.${edate}.nc
@MOM5 endif
@MOM5 end
@MOM6 foreach dset ( $dsets )
@MOM6 set num = `/bin/ls -1 $dset.nc | wc -l`
@MOM6 if($num != 0) then
Expand Down
5 changes: 0 additions & 5 deletions gcm_run_benchmark.j
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ setenv CHMDIR @CHMDIR
setenv DATELINE DC
setenv EMISSIONS @EMISSIONS

@MOM5setenv ABCSDIR @COUPLEDIR/atmosphere_bcs/@LSMBCS/MOM5/@ATMOStag_@OCEANtag
@MOM5setenv OBCSDIR @shared_COUPLED/ocean/MOM5/${OGCM_IM}x${OGCM_JM}
@MOM6setenv ABCSDIR @COUPLEDIR/atmosphere_bcs/@LSMBCS/MOM6/@ATMOStag_@OCEANtag
@MOM6setenv OBCSDIR @shared_COUPLED/ocean/MOM6/${OGCM_IM}x${OGCM_JM}
@COUPLEDsetenv SSTDIR @COUPLEDIR/SST/MERRA2/${OGCM_IM}x${OGCM_JM}
Expand All @@ -335,7 +333,6 @@ cat << _EOF_ > $FILE
@COUPLED/bin/ln -sf $ABCSDIR/@[email protected] runoff.bin
@COUPLED/bin/ln -sf $OBCSDIR/MAPL_Tripolar.nc .
@COUPLED/bin/ln -sf $OBCSDIR/vgrid${OGCM_LM}.ascii ./vgrid.ascii
@MOM5#/bin/ln -s @COUPLEDIR/a@HIST_IMx@HIST_JM_o${OGCM_IM}x${OGCM_JM}/DC0@HIST_IMxPC0@[email protected] tile_hist.data
@MOM6#/bin/ln -s @COUPLEDIR/MOM6/DC0@HIST_IMxPC0@HIST_JM_@OCEANtag/DC0@HIST_IMxPC0@[email protected] tile_hist.data

# Precip correction
Expand Down Expand Up @@ -725,7 +722,6 @@ endif

if (! -e tile.bin) then
$GEOSBIN/binarytile.x tile.data tile.bin
@MOM5 $GEOSBIN/binarytile.x tile_hist.data tile_hist.bin
endif

# If running in dual ocean mode, link sst and fraci data here
Expand Down Expand Up @@ -1080,7 +1076,6 @@ end

@COUPLED # MOM-Specific Output Files
@COUPLED # -------------------------
@MOM5 set dsets="ocean_month"
@MOM6 set dsets="ocean_state prog_z sfc_ave forcing"
@COUPLED foreach dset ( $dsets )
@COUPLED set num = `/bin/ls -1 $dset.nc | wc -l`
Expand Down
72 changes: 4 additions & 68 deletions gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ if( $OGCM == TRUE ) then
# -----------
OCNMODEL:
echo "Choose an ${C1}Ocean Model${CN}: (Default: ${C2}MOM6${CN})"
echo " ${C2}MOM5${CN}"
echo " ${C2}MOM6${CN}"
echo " ${C2}MIT${CN}"

Expand All @@ -556,9 +555,9 @@ if( $OGCM == TRUE ) then
else
set OCNMODEL = `echo $OCNMODEL | tr "[:lower:]" "[:upper:]"`

if ( "$OCNMODEL" != "MOM5" & "$OCNMODEL" != "MOM6" & "$OCNMODEL" != "MIT") then
if ( "$OCNMODEL" != "MOM6" & "$OCNMODEL" != "MIT") then
echo
echo "${C1}Ocean Model${CN} must be either MOM5, MOM6 or MIT!"
echo "${C1}Ocean Model${CN} must be either MOM6 or MIT!"
goto OCNMODEL
else
echo
Expand All @@ -567,23 +566,11 @@ if( $OGCM == TRUE ) then

# NOTE: We use a CMake variable here because the shared library
# suffix is different on Linux and macOS. This is set by configure_file()
if ( "$OCNMODEL" == "MOM5" ) then
set OCEAN_NAME="MOM"
set OGRIDTYP = "M5TP"
set OCEAN_PRELOAD = 'env @PRELOAD_COMMAND=$GEOSDIR/lib/libmom@CMAKE_SHARED_LIBRARY_SUFFIX@'
set MOM5=""
set MOM6 = "#DELETE"
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM-MOM5.rc.tmpl"

set mom5_warning="######################################################\nYou (user) have chosen to set up a coupled model experiment with MOM5.\nBe aware that such a set up is _known_ to have problems. See following for more details.\nhttps://github.com/GEOS-ESM/MOM5/issues/19\nIf your intent is to help _fix_ above issue, your help is much appreciated. Thank you and good luck!\nOtherwise, until this above issue is _fixed_ you are on your own with above choice.\n######################################################"
echo "\033[31;5m"${mom5_warning}"\033[0m"
set MIT = "#DELETE"
else if ( "$OCNMODEL" == "MOM6" ) then
if ( "$OCNMODEL" == "MOM6" ) then
set OCEAN_NAME="MOM6"
set OGRIDTYP = "M6TP"
set OCEAN_PRELOAD = 'env @PRELOAD_COMMAND=\$GEOSDIR/lib/libmom6@CMAKE_SHARED_LIBRARY_SUFFIX@'
set MOM6=""
set MOM5 = "#DELETE"
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM.rc.tmpl"
set MIT = "#DELETE"
else if ( "$OCNMODEL" == "MIT" ) then
Expand All @@ -592,7 +579,6 @@ if( $OGCM == TRUE ) then
set OGRIDTYP = "MITLLC"
set MIT = ""
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM_MITgcm.rc.tmpl"
set MOM5 = "#DELETE"
set MOM6 = "#DELETE"
endif

Expand All @@ -608,25 +594,6 @@ if( $OGCM == TRUE ) then
set OGCM_JM = 15
set OGCM_IM = `expr $OGCM_JM \* 360`

else if ( $OCEAN_NAME == "MOM" ) then
set Resolution = `echo 360 200`
echo "Enter the Ocean Lat/Lon ${C1}Horizontal Resolution${CN}: ${C2}IM JM${CN} (Default:" $Resolution")"
set Resolution = `echo $<`
set num = $#Resolution
if( $num == 2 ) then
set OGCM_IM = $Resolution[1]
set OGCM_JM = $Resolution[2]
else
set Resolution = `echo 360 200`

if( $num == 0 ) then
set OGCM_IM = $Resolution[1]
set OGCM_JM = $Resolution[2]
else
goto CORSLV
endif
endif

else if ( "$OCNMODEL" == "MOM6" ) then
# For MOM6 we currently have only 3 allowed ocean resolutions based on the
# atmospheric resolution. The allowed are:
Expand Down Expand Up @@ -910,7 +877,6 @@ else
set OCEAN_PRELOAD = ""
set OGCM_LM = 34
set COUPLED = "#DELETE"
set MOM5 = "#DELETE"
set MOM6 = "#DELETE"
set CICE4 = "#DELETE"
set CICE6 = "#DELETE"
Expand Down Expand Up @@ -2034,7 +2000,6 @@ s?@FORCEDAS?$FORCEDAS?g
s?@FORCEGCM?$FORCEGCM?g
s?@COUPLED?$COUPLED?g
s?@CLDMICRO?$CLDMICRO?g
s?@MOM5?$MOM5?g
s?@MOM6?$MOM6?g
s?@OCNMODEL?$OCNMODEL?g
s?@CICE4?$CICE4?g
Expand Down Expand Up @@ -2198,11 +2163,7 @@ set FILES = `echo $FILES`
set TMPOCEANDIR = `mktemp -d`

if( $OGCM == TRUE & "$OCNMODEL" != "MIT" ) then
if ( $OCEAN_NAME == "MOM" ) then
/bin/cp ${ETCDIR}/MOM5/geos5/${OGCM_IM}x${OGCM_JM}/INPUT/input.nml ${TMPOCEANDIR}
/bin/cp ${ETCDIR}/MOM5/geos5/${OGCM_IM}x${OGCM_JM}/INPUT/*table ${TMPOCEANDIR}
set FILES = "$FILES field_table "
else if ( $OCEAN_NAME == "MOM6" ) then
if ( $OCEAN_NAME == "MOM6" ) then
/bin/cp ${ETCDIR}/MOM6/mom6_app/${OGCM_IM}x${OGCM_JM}/MOM_input ${TMPOCEANDIR}
/bin/cp ${ETCDIR}/MOM6/mom6_app/${OGCM_IM}x${OGCM_JM}/MOM_override ${TMPOCEANDIR}
/bin/cp ${ETCDIR}/MOM6/mom6_app/${OGCM_IM}x${OGCM_JM}/input.nml ${TMPOCEANDIR}
Expand Down Expand Up @@ -2457,17 +2418,6 @@ if( $OGCM == TRUE ) then

sed -i -e "s/DT = [0-9]*\.[0-9]*/DT = $OCEAN_DT/g" \
-e "s/DT_THERM = [0-9]*\.[0-9]*/DT_THERM = $OCEAN_DT/g" $HOMDIR/MOM_override
else if ("$OCNMODEL" == "MOM5" ) then
# With MOM5 we need to change dt lines in input.nml to
# use $OCEAN_DT instead. NOTE: This sed assumes integer followed by comma

sed -i -e "s/dt_cpld = [0-9]*,/dt_cpld = $OCEAN_DT,/g" \
-e "s/dt_atmos = [0-9]*,/dt_atmos = $OCEAN_DT,/g" $HOMDIR/input.nml
endif

# We also need to change the dt in ice_in as well for CICE6
if ( $SEAICE_NAME == "CICE6" ) then
sed -i -E "s/^([[:space:]]*dt[[:space:]]*=[[:space:]]*)[0-9]+(\.[0-9]+)?/\1${OCEAN_DT}/" "$HOMDIR/ice_in"
endif

endif
Expand Down Expand Up @@ -2726,25 +2676,11 @@ if( $OGCM == TRUE ) then

if ("$OCNMODEL" != "MIT" ) then

# Some files are common to both MOM and MOM6
cat >> $FILES_TO_PROCESS << EOF
HOMDIR/input.nml
HOMDIR/diag_table
HOMDIR/__init__.py
EXPDIR/plot/plotocn.j
EOF
endif

# Some files are specific to MOM
if ( "$OCNMODEL" == "MOM" ) then
cat >> $FILES_TO_PROCESS << EOF
HOMDIR/field_table
EOF
endif

# Some files are specific to MOM6
if ( "$OCNMODEL" == "MOM6" ) then
cat >> $FILES_TO_PROCESS << EOF
HOMDIR/MOM_override
HOMDIR/MOM_input
HOMDIR/data_table
Expand Down
Loading
Loading