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

Bugfix for handling GAAS in replays and forecasts #518

Merged
merged 4 commits into from
Sep 28, 2023
Merged
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
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
12 changes: 7 additions & 5 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 @@ -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
11 changes: 7 additions & 4 deletions gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -1020,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
2 changes: 1 addition & 1 deletion gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -2291,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