Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync develop into main #519

Merged
merged 24 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e60164e
updated timescales for GFDL-MP
wmputman Aug 18, 2023
7ce362a
updates to GFDL autoconversion to reduce QL
wmputman Aug 25, 2023
3809ba8
More cleanup of app scripts
mathomp4 Aug 29, 2023
1554ec3
Add comment, clean spaces
mathomp4 Aug 29, 2023
e012408
updates for FV3 & GFDL settings
wmputman Sep 12, 2023
7301189
Merge remote-tracking branch 'origin/feature/wmputman/hwt_spring_exp'…
sdrabenh Sep 16, 2023
7ed28b3
HISTORY.rc tmpl for GEOS-MITgcm coupled model
afahadabdullah Sep 18, 2023
7df921c
Change defaults to stock config
sdrabenh Sep 20, 2023
d99e67f
Add MIT history to other setups
mathomp4 Sep 21, 2023
e747144
Merge pull request #510 from GEOS-ESM/mitbugfix
sdrabenh Sep 21, 2023
10c2f20
Merge branch 'develop' into feature/mathomp4/more-cleanup
sdrabenh Sep 21, 2023
1042a33
Merge pull request #508 from GEOS-ESM/feature/mathomp4/more-cleanup
sdrabenh Sep 21, 2023
7c0fb63
Fix WSUB use in other scripts
mathomp4 Sep 22, 2023
0466250
Merge pull request #512 from GEOS-ESM/bugfix/mathomp4/fix-wsub
mathomp4 Sep 22, 2023
0cb7365
Fix doubled logger output
mathomp4 Sep 26, 2023
a038bd3
Merge branch 'develop' into feature/sdrabenh/hwt_spring_exp
mathomp4 Sep 27, 2023
7e9948b
Merge pull request #515 from GEOS-ESM/feature/sdrabenh/hwt_spring_exp
sdrabenh Sep 28, 2023
e12b949
Merge branch 'develop' into feature/mathomp4/fix-logger-dup
sdrabenh Sep 28, 2023
a130337
Merge pull request #514 from GEOS-ESM/feature/mathomp4/fix-logger-dup
sdrabenh Sep 28, 2023
1e5d2e9
fix bug in sed replacement of RECORD in gcm_forecast.tmpl
sdrabenh Sep 28, 2023
feec44c
bugfix to allow replay with GAAS enabled, and forecasts with GAAS dis…
sdrabenh Sep 28, 2023
69d2345
Fix comment line
sdrabenh Sep 28, 2023
e027ff3
update setting to replay to ERA5
sdrabenh Sep 28, 2023
41ecb7d
Merge pull request #518 from GEOS-ESM/feature/sdrabenh/fix_GAAS_for_r…
sdrabenh Sep 28, 2023
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
13 changes: 9 additions & 4 deletions AGCM.rc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,15 @@ RECORD_REF_TIME: >>>REFTIME<<< >>>FCSTIME<<<

# Regular REPLAY to ERA5
# ----------------------
#ERA5 REPLAY_ANA_EXPID: era5_eta2eta_L137
#ERA5 REPLAY_ANA_LOCATION: /discover/nobackup/projects/gmao/osse2/Ops12KM_R/forecasts_EC/ERA5/UV
#ERA5 REPLAY_MODE: Regular
#ERA5 REPLAY_FILE: /discover/nobackup/projects/gmao/osse2/Ops12KM_R/forecasts_EC/ERA5/UV/%y4%m2%d2_%h20000/era5_eta2eta_L137.%y4%m2%d2_%h2z.nc4
#ERA5 REPLAY_MODE: Regular
#ERA5 REPLAY_FILE_FREQUENCY: 21600
#ERA5 REPLAY_FILE_REFERENCE_TIME: 000000
#ERA5 REPLAY_ANA_EXPID: era5
#ERA5 REPLAY_ANA_LOCATION: /gpfsm/dnb78s1/projects/p18/sdrabenh/valdat/era5/ana
#ERA5 REPLAY_FILE: /gpfsm/dnb78s1/projects/p18/sdrabenh/valdat/era5/ana/Y%y4/M%m2/era5_eta2eta_L137.%y4%m2%d2_%h2z.nc4
#ERA5 REPLAY_O3: NO
#ERA5 REPLAY_DAMPBEG: 500.0
#ERA5 REPLAY_DAMPEND: 5000.0

# Typical Exact REPLAY Configuration
# ----------------------------------
Expand Down
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ install (
DESTINATION etc
)

if(HYDROSTATIC)
set(CFG_HYDROSTATIC TRUE)
else()
set(CFG_HYDROSTATIC FALSE)
endif()

if(INSTALL_SOURCE_TARFILE)
set(CFG_INSTALL_SOURCE_TARFILE TRUE)
else()
Expand Down
1,744 changes: 1,744 additions & 0 deletions HISTORY.AOGCM_MITgcm.rc.tmpl

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions fvcore_layout.rc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
do_evap = .false.
do_subl = .false.
do_qa = .false.
tau_l2v = 150.
tau_i2v = 150.
tau_revp = 150.
tau_l2v = 450.
tau_i2v = 450.
tau_revp = 450.
tau_frz = 450.
dw_land = 0.05
dw_ocean = 0.10
Expand Down
26 changes: 14 additions & 12 deletions gcm_forecast.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,10 @@ cp linkbcs $EXPDIR
# Get Executable and RESTARTS
#######################################################################

cp $EXPDIR/GEOSgcm.x .
echo "Copying $EXPDIR/GEOSgcm.x to $SCRDIR"
echo ""
/bin/cp $EXPDIR/GEOSgcm.x $SCRDIR/GEOSgcm.x
setenv GEOSEXE $SCRDIR/GEOSgcm.x

set rst_files = `grep "RESTART_FILE" AGCM.rc | grep -v VEGDYN | grep -v "#" | cut -d ":" -f1 | cut -d "_" -f1-2`
set rst_file_names = `grep "RESTART_FILE" AGCM.rc | grep -v VEGDYN | grep -v "#" | cut -d ":" -f2`
Expand Down Expand Up @@ -640,16 +643,16 @@ if ( $DNA_TRUE == 0 && -e DNA_ExtData.rc ) /bin/mv
set ACHEM_TRUE = `grep -i '^\s*ENABLE_ACHEM:\s*\.TRUE\.' GEOS_ChemGridComp.rc | wc -l`
if ( $ACHEM_TRUE == 0 && -e GEOSachem_ExtData.rc ) /bin/mv GEOSachem_ExtData.rc GEOSachem_ExtData.rc.NOT_USED

@MP_NO_USE_WSUB# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_NO_USE_WSUB# -------------------------------------------------
@MP_TURN_OFF_WSUB_EXTDATA# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_TURN_OFF_WSUB_EXTDATA# -------------------------------------------------
if ($EXTDATA2G_TRUE == 0 ) then
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
else
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
endif
@MP_NO_USE_WSUB/bin/rm WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATA/bin/rm WSUB_ExtData.tmp

# Generate the complete ExtData.rc
# --------------------------------
Expand Down Expand Up @@ -826,12 +829,11 @@ if( $REPLAY_MODE == 'Exact' | $REPLAY_MODE == 'Regular' ) then
set REPLAY_FILE_TYPE = `echo $REPLAY_FILE | cut -d"/" -f1 | grep -v %`
set REPLAY_FILE09_TYPE = `echo $REPLAY_FILE09 | cut -d"/" -f1 | grep -v %`

# Modify GAAS_GridComp.rc and Link REPLAY files
# Disable GAAS and Link REPLAY files
# ---------------------------------------------
/bin/mv -f GAAS_GridComp.rc GAAS_GridComp.tmp
cat GAAS_GridComp.tmp | sed -e "s?aod/Y%y4/M%m2/${ANA_EXPID}.?aod/Y%y4/M%m2/${ANA_EXPID}.?g" > GAAS_GridComp.rc
/bin/mv -f GEOS_ChemGridComp.rc GEOS_ChemGridComp.rc.tmp
cat GEOS_ChemGridComp.rc.tmp | sed "s?ENABLE_GAAS:.*?ENABLE_GAAS: .FALSE.?g" > GEOS_ChemGridComp.rc

/bin/ln -sf ${ANA_LOCATION}/aod .
/bin/ln -sf ${ANA_LOCATION}/${REPLAY_FILE_TYPE} .
/bin/ln -sf ${ANA_LOCATION}/${REPLAY_FILE09_TYPE} .

Expand Down
14 changes: 7 additions & 7 deletions gcm_regress.j
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,16 @@ if( @EMISSIONS == AMIP_EMISSIONS ) then
endif
endif

@MP_NO_USE_WSUB# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_NO_USE_WSUB# -------------------------------------------------
@MP_TURN_OFF_WSUB_EXTDATA# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_TURN_OFF_WSUB_EXTDATA# -------------------------------------------------
if ($EXTDATA2G_TRUE == 0 ) then
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
else
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
endif
@MP_NO_USE_WSUB/bin/rm WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATA/bin/rm WSUB_ExtData.tmp

# Generate the complete ExtData.rc
# --------------------------------
Expand Down
28 changes: 14 additions & 14 deletions gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -841,16 +841,16 @@ if ( $DNA_TRUE == 0 && -e DNA_ExtData.rc ) /bin/mv
set ACHEM_TRUE = `grep -i '^\s*ENABLE_ACHEM:\s*\.TRUE\.' GEOS_ChemGridComp.rc | wc -l`
if ( $ACHEM_TRUE == 0 && -e GEOSachem_ExtData.rc ) /bin/mv GEOSachem_ExtData.rc GEOSachem_ExtData.rc.NOT_USED

@MP_NO_USE_WSUB# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_NO_USE_WSUB# -------------------------------------------------
@MP_TURN_OFF_WSUB_EXTDATA# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_TURN_OFF_WSUB_EXTDATA# -------------------------------------------------
if ($EXTDATA2G_TRUE == 0 ) then
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
else
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
endif
@MP_NO_USE_WSUB/bin/rm WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATA/bin/rm WSUB_ExtData.tmp

# Generate the complete ExtData.rc
# --------------------------------
Expand Down Expand Up @@ -892,9 +892,6 @@ setenv YEAR $yearc

if (! -e tile.bin) then
$GEOSBIN/binarytile.x tile.data tile.bin
### @MIT $GEOSBIN/binarytile.x tile_hist.data tile_hist.bin
### @MOM5 $GEOSBIN/binarytile.x tile_hist.data tile_hist.bin
### @MOM6 $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 @@ -1023,12 +1020,15 @@ if( $REPLAY_MODE == 'Exact' | $REPLAY_MODE == 'Regular' ) then
set REPLAY_FILE_TYPE = `echo $REPLAY_FILE | cut -d"/" -f1 | grep -v %`
set REPLAY_FILE09_TYPE = `echo $REPLAY_FILE09 | cut -d"/" -f1 | grep -v %`

# Modify GAAS_GridComp.rc and Link REPLAY files
# Modify GAAS_GridComp_ExtData and Link REPLAY files
# ---------------------------------------------
/bin/mv -f GAAS_GridComp.rc GAAS_GridComp.tmp
cat GAAS_GridComp.tmp | sed -e "s?aod/Y%y4/M%m2/${ANA_EXPID}.?aod/Y%y4/M%m2/${ANA_EXPID}.?g" > GAAS_GridComp.rc
/bin/mv -f GAAS_GridComp_ExtData.yaml GAAS_GridComp_ExtData.yaml.tmpl
cat GAAS_GridComp_ExtData.yaml.tmpl | sed -e "s?das.aod_?chem/Y%y4/M%m2/${ANA_EXPID}.aod_?g" > GAAS_GridComp_ExtData.yaml

/bin/ln -sf ${ANA_LOCATION}/aod .
/bin/mv -f GAAS_GridComp_ExtData.rc GAAS_GridComp_ExtData.rc.tmpl
cat GAAS_GridComp_ExtData.rc.tmpl | sed -e "s?das.aod_?chem/Y%y4/M%m2/${ANA_EXPID}.aod_?g" > GAAS_GridComp_ExtData.rc

/bin/ln -sf ${ANA_LOCATION}/chem .
/bin/ln -sf ${ANA_LOCATION}/${REPLAY_FILE_TYPE} .
/bin/ln -sf ${ANA_LOCATION}/${REPLAY_FILE09_TYPE} .

Expand Down
14 changes: 7 additions & 7 deletions gcm_run_benchmark.j
Original file line number Diff line number Diff line change
Expand Up @@ -643,16 +643,16 @@ if ( $ACHEM_TRUE == 0 && -e GEOSachem_ExtData.rc ) /bin/mv
set GOCART_DATA_TRUE = `grep -i '^\s*ENABLE_GOCART_DATA:\s*\.TRUE\.' GEOS_ChemGridComp.rc | wc -l`
if ( $GOCART_DATA_TRUE == 0 && -e GOCARTdata_ExtData.rc ) /bin/mv GOCARTdata_ExtData.rc GOCARTdata_ExtData.rc.NOT_USED

@MP_NO_USE_WSUB# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_NO_USE_WSUB# -------------------------------------------------
@MP_TURN_OFF_WSUB_EXTDATA# 1MOM and GFDL microphysics do not use WSUB_CLIM
@MP_TURN_OFF_WSUB_EXTDATA# -------------------------------------------------
if ($EXTDATA2G_TRUE == 0 ) then
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.rc WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/^WSUB_CLIM/ s#ExtData.*#/dev/null#' > WSUB_ExtData.rc
else
@MP_NO_USE_WSUB/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_NO_USE_WSUBcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
@MP_TURN_OFF_WSUB_EXTDATA/bin/mv WSUB_ExtData.yaml WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATAcat WSUB_ExtData.tmp | sed -e '/collection:/ s#WSUB_SWclim.*#/dev/null#' > WSUB_ExtData.yaml
endif
@MP_NO_USE_WSUB/bin/rm WSUB_ExtData.tmp
@MP_TURN_OFF_WSUB_EXTDATA/bin/rm WSUB_ExtData.tmp

# Generate the complete ExtData.rc
# --------------------------------
Expand Down
38 changes: 7 additions & 31 deletions gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ if( $OGCM == TRUE ) then
set OCEAN_NAME="MIT"
set OGCM_GRID_TYPE = llc
set MIT = ""
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM_MITgcm.rc.tmpl"
set MOM5 = "#DELETE"
set MOM6 = "#DELETE"
endif
Expand Down Expand Up @@ -1390,26 +1391,17 @@ set GFDL_USE_CCN = "use_ccn = .true."

# BACM_1M and GFDL do not use WSUB_CLIM, so this eliminates a regrid
if ( "$CLDMICRO" == "BACM_1M" | "$CLDMICRO" == "GFDL_1M" ) then
set MP_NO_USE_WSUB = ""
set MP_TURN_OFF_WSUB_EXTDATA = ""
else
set MP_NO_USE_WSUB = "#DELETE#"
set MP_TURN_OFF_WSUB_EXTDATA = "#DELETE#"
endif

# Settings for fvcore_layout.rc
if ( "$USE_HYDROSTATIC" == "TRUE" ) then
set FV_MAKENH = "Make_NH = .F."
set FV_HYDRO = "hydrostatic = .T."
else
# Logic for NH runs based on build type
if ( "$DEFAULT_HYDROSTATIC" == "TRUE") then
# If you built for hydrostatic, but want an NH run, run make_nh
set FV_MAKENH = "Make_NH = .T."
else
# If you built for non-hydrostatic and want an NH run, do not run
# NOTE: If you run regrid.pl it will make restarts that should trigger
# make_nh automatically in FV3
set FV_MAKENH = "Make_NH = .F."
endif
set FV_MAKENH = "Make_NH = .T."
set FV_HYDRO = "hydrostatic = .F."
if ( "$CLDMICRO" == "GFDL_1M" ) then
set GFDL_HYDRO = ".FALSE."
Expand Down Expand Up @@ -1630,23 +1622,7 @@ while( $check == FALSE )
# Check to see if the HISTORY template exists in the $ETCDIR
if( -f $ETCDIR/$HISTORY_TEMPLATE ) then
set check = TRUE
set TMPHIST1 = `mktemp`
/bin/cp -f $ETCDIR/$HISTORY_TEMPLATE $TMPHIST1

set EXPID_old = `grep "EXPID:" $TMPHIST1 | cut -d: -f2`
set EXPDSC_old = `grep "EXPDSC:" $TMPHIST1 | cut -d: -f2`

set TMPCMD = `mktemp`
set string = "EXPID:"
echo cat $TMPHIST1 \| awk \'\{if \( \$1 \~ \"${string}\" \) \
\{sub \( \"${EXPID_old}\" , \"${EXPID}\" \)\;print\} else print\}\' \> $TMPHIST > $TMPCMD
chmod +x $TMPCMD
$TMPCMD
/bin/rm -f $TMPCMD
/bin/mv -f $TMPHIST $TMPHIST1
cat $TMPHIST1 | sed -e "s|${EXPDSC_old}|${EXPDSC}|g" > $TMPHIST
/bin/rm -f $TMPHIST1

/bin/cp -f $ETCDIR/$HISTORY_TEMPLATE $TMPHIST
# else check if the file exists (assuming they sent in full path)
else if( -e $HISTORY_TEMPLATE ) then
set check = TRUE
Expand Down Expand Up @@ -2315,7 +2291,7 @@ s?@OGCM_NY?$OGCM_NY?g
s?@OGCM_NPROCS?$OGCM_NPROCS?g

s?@OBSERVER_FRQ?0?g
s?RECORD_?#RECORD_?g
s?^[ \t]*RECORD_?#RECORD_?g

s?@DASTUNING?#?g

Expand Down Expand Up @@ -2429,7 +2405,7 @@ s/@ANALYZE_TS/0/g

s/@LSM_CHOICE/$LSM_CHOICE/g

s/@MP_NO_USE_WSUB/$MP_NO_USE_WSUB/g
s/@MP_TURN_OFF_WSUB_EXTDATA/$MP_TURN_OFF_WSUB_EXTDATA/g

s?@BACM_1M_?$BACM_1M_?g
s?@GFDL_1M_?$GFDL_1M_?g
Expand Down
36 changes: 6 additions & 30 deletions geoschemchem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ if( $OGCM == TRUE ) then
set OCEAN_NAME="MIT"
set OGCM_GRID_TYPE = llc
set MIT = ""
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM_MITgcm.rc.tmpl"
set MOM5 = "#DELETE"
set MOM6 = "#DELETE"
endif
Expand Down Expand Up @@ -1405,26 +1406,17 @@ set GFDL_USE_CCN = "use_ccn = .true."

# BACM_1M and GFDL do not use WSUB_CLIM, so this eliminates a regrid
if ( "$CLDMICRO" == "BACM_1M" | "$CLDMICRO" == "GFDL_1M" ) then
set MP_NO_USE_WSUB = ""
set MP_TURN_OFF_WSUB_EXTDATA = ""
else
set MP_NO_USE_WSUB = "#DELETE#"
set MP_TURN_OFF_WSUB_EXTDATA = "#DELETE#"
endif

# Settings for fvcore_layout.rc
if ( "$USE_HYDROSTATIC" == "TRUE" ) then
set FV_MAKENH = "Make_NH = .F."
set FV_HYDRO = "hydrostatic = .T."
else
# Logic for NH runs based on build type
if ( "$DEFAULT_HYDROSTATIC" == "TRUE") then
# If you built for hydrostatic, but want an NH run, run make_nh
set FV_MAKENH = "Make_NH = .T."
else
# If you built for non-hydrostatic and want an NH run, do not run
# NOTE: If you run regrid.pl it will make restarts that should trigger
# make_nh automatically in FV3
set FV_MAKENH = "Make_NH = .F."
endif
set FV_MAKENH = "Make_NH = .T."
set FV_HYDRO = "hydrostatic = .F."
if ( "$CLDMICRO" == "GFDL_1M" ) then
set GFDL_HYDRO = ".FALSE."
Expand Down Expand Up @@ -1660,23 +1652,7 @@ while( $check == FALSE )
# Check to see if the HISTORY template exists in the $ETCDIR
if( -f $ETCDIR/$HISTORY_TEMPLATE ) then
set check = TRUE
set TMPHIST1 = `mktemp`
/bin/cp -f $ETCDIR/$HISTORY_TEMPLATE $TMPHIST1

set EXPID_old = `grep "EXPID:" $TMPHIST1 | cut -d: -f2`
set EXPDSC_old = `grep "EXPDSC:" $TMPHIST1 | cut -d: -f2`

set TMPCMD = `mktemp`
set string = "EXPID:"
echo cat $TMPHIST1 \| awk \'\{if \( \$1 \~ \"${string}\" \) \
\{sub \( \"${EXPID_old}\" , \"${EXPID}\" \)\;print\} else print\}\' \> $TMPHIST > $TMPCMD
chmod +x $TMPCMD
$TMPCMD
/bin/rm -f $TMPCMD
/bin/mv -f $TMPHIST $TMPHIST1
cat $TMPHIST1 | sed -e "s|${EXPDSC_old}|${EXPDSC}|g" > $TMPHIST
/bin/rm -f $TMPHIST1

/bin/cp -f $ETCDIR/$HISTORY_TEMPLATE $TMPHIST
# else check if the file exists (assuming they sent in full path)
else if( -e $HISTORY_TEMPLATE ) then
set check = TRUE
Expand Down Expand Up @@ -2461,7 +2437,7 @@ s/@ANALYZE_TS/0/g

s/@LSM_CHOICE/$LSM_CHOICE/g

s/@MP_NO_USE_WSUB/$MP_NO_USE_WSUB/g
s/@MP_TURN_OFF_WSUB_EXTDATA/$MP_TURN_OFF_WSUB_EXTDATA/g

s?@BACM_1M_?$BACM_1M_?g
s?@GFDL_1M_?$GFDL_1M_?g
Expand Down
Loading