From d495745adbbc75606951960e5796da271802090b Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 3 Sep 2024 10:42:28 -0400 Subject: [PATCH] Support for L186 pressure lid --- gcm_forecast.tmpl | 12 ++++++++++++ gcm_regress.j | 20 ++++++++++++++++++++ gcm_run.j | 14 +++++++++++++- gcm_run_benchmark.j | 20 ++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) diff --git a/gcm_forecast.tmpl b/gcm_forecast.tmpl index fd958308..6eae5150 100755 --- a/gcm_forecast.tmpl +++ b/gcm_forecast.tmpl @@ -536,6 +536,18 @@ if( $AGCM_LM != 72 ) then cp $file dummy cat dummy | sed -e "s|/L72/|/L${AGCM_LM}/|g" | sed -e "s|z72|z${AGCM_LM}|g" > $file end + + # We have to do something special for L186. By default all of the GOCART emissions have: + # pressure_lid_in_hPa: 0.01 + # which is the pressure lid in hPa for all other GEOS vertical levels. But L186 has a lid + # at 0.00025 Pa. So we need to change this value in the GOCART emissions files for L186. + if ( $AGCM_LM == 186 ) then + set files = `/bin/ls *.rc` + foreach file ($files) + cp $file dummy + cat dummy | sed -e '/pressure_lid_in_hPa:/c\pressure_lid_in_hPa: 2.5e-6' > $file + end + endif endif # Rename big ExtData files that are not needed diff --git a/gcm_regress.j b/gcm_regress.j index 503defe3..34fc0ba9 100755 --- a/gcm_regress.j +++ b/gcm_regress.j @@ -363,6 +363,26 @@ if( $EXTDATA2G_TRUE == 1 ) then endif +if( $AGCM_LM != 72 ) then + set files = `/bin/ls *.yaml` + foreach file ($files) + cp $file dummy + cat dummy | sed -e "s|/L72/|/L${AGCM_LM}/|g" | sed -e "s|z72|z${AGCM_LM}|g" > $file + end + + # We have to do something special for L186. By default all of the GOCART emissions have: + # pressure_lid_in_hPa: 0.01 + # which is the pressure lid in hPa for all other GEOS vertical levels. But L186 has a lid + # at 0.00025 Pa. So we need to change this value in the GOCART emissions files for L186. + if ( $AGCM_LM == 186 ) then + set files = `/bin/ls *.rc` + foreach file ($files) + cp $file dummy + cat dummy | sed -e '/pressure_lid_in_hPa:/c\pressure_lid_in_hPa: 2.5e-6' > $file + end + endif +endif + # Move GOCART to use RRTMGP Bands # ------------------------------- # UNCOMMENT THE LINES BELOW IF RUNNING RRTMGP diff --git a/gcm_run.j b/gcm_run.j index 168db150..20b8ba6e 100755 --- a/gcm_run.j +++ b/gcm_run.j @@ -756,6 +756,18 @@ if( $AGCM_LM != 72 ) then cp $file dummy cat dummy | sed -e "s|/L72/|/L${AGCM_LM}/|g" | sed -e "s|z72|z${AGCM_LM}|g" > $file end + + # We have to do something special for L186. By default all of the GOCART emissions have: + # pressure_lid_in_hPa: 0.01 + # which is the pressure lid in hPa for all other GEOS vertical levels. But L186 has a lid + # at 0.00025 Pa. So we need to change this value in the GOCART emissions files for L186. + if ( $AGCM_LM == 186 ) then + set files = `/bin/ls *.rc` + foreach file ($files) + cp $file dummy + cat dummy | sed -e '/pressure_lid_in_hPa:/c\pressure_lid_in_hPa: 2.5e-6' > $file + end + endif endif # Rename big ExtData files that are not needed @@ -1259,7 +1271,7 @@ end @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 +@MOM5 end @MOM6 foreach dset ( $dsets ) @MOM6 set num = `/bin/ls -1 $dset.nc | wc -l` @MOM6 if($num != 0) then diff --git a/gcm_run_benchmark.j b/gcm_run_benchmark.j index 64321eda..c1e09ca7 100755 --- a/gcm_run_benchmark.j +++ b/gcm_run_benchmark.j @@ -630,6 +630,26 @@ if( ${EMISSIONS} == AMIP_EMISSIONS ) then endif +if( $AGCM_LM != 72 ) then + set files = `/bin/ls *.yaml` + foreach file ($files) + cp $file dummy + cat dummy | sed -e "s|/L72/|/L${AGCM_LM}/|g" | sed -e "s|z72|z${AGCM_LM}|g" > $file + end + + # We have to do something special for L186. By default all of the GOCART emissions have: + # pressure_lid_in_hPa: 0.01 + # which is the pressure lid in hPa for all other GEOS vertical levels. But L186 has a lid + # at 0.00025 Pa. So we need to change this value in the GOCART emissions files for L186. + if ( $AGCM_LM == 186 ) then + set files = `/bin/ls *.rc` + foreach file ($files) + cp $file dummy + cat dummy | sed -e '/pressure_lid_in_hPa:/c\pressure_lid_in_hPa: 2.5e-6' > $file + end + endif +endif + # Rename big ExtData files that are not needed # -------------------------------------------- set SC_TRUE = `grep -i '^\s*ENABLE_STRATCHEM:\s*\.TRUE\.' GEOS_ChemGridComp.rc | wc -l`