From 1d633f6c3f1e7cbf10ad92d0cc83e37711358b39 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 7 Nov 2024 09:06:44 -0500 Subject: [PATCH 1/4] Fixes #653. Update default ocean to CS for C90+ --- gcm_setup | 66 +++++++++++++++++++++++++++---------------- geoschemchem_setup | 70 +++++++++++++++++++++++++++++----------------- gmichem_setup | 41 +++++++++++++-------------- stratchem_setup | 70 +++++++++++++++++++++++++++++----------------- 4 files changed, 150 insertions(+), 97 deletions(-) diff --git a/gcm_setup b/gcm_setup index 4c5bf416..2222cb3e 100755 --- a/gcm_setup +++ b/gcm_setup @@ -819,12 +819,31 @@ else # OGCM = FALSE (Data Ocean Resolution) # ------------------------------------ DORSLV: - echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds) Default" + + # We have two different default ocean resolutions based on the atmospheric resolution + # if LOW_ATM_RES is TRUE, we use o1 (Reynolds) as the default + # if LOW_ATM_RES is FALSE, we use CS (Cubed-Sphere OSTIA) as the default + + if( $LOW_ATM_RES == 'TRUE') then + set DEFAULT_HRCODE = 'o1' + set O1_DEFAULT = ' (Default)' + set CS_DEFAULT = '' + else + set DEFAULT_HRCODE = 'CS' + set O1_DEFAULT = '' + set CS_DEFAULT = ' (Default)' + set DEFAULT_HRCODE = 'CS' + endif + echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds)${O1_DEFAULT}" echo " ${C2}o2${CN} (1/4-deg, 1440x720 MERRA-2)" echo " ${C2}o3${CN} (1/8-deg, 2880x1440 OSTIA)" - echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)" + echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)${CS_DEFAULT}" + # We also note that the Reynolds ocean does not exist past 2022 + echo "" + echo "NOTE: The Reynolds ocean resolution is only available up to 2022" + set HRCODE = `echo $<` - if( .$HRCODE == . ) set HRCODE = o1 + if( .$HRCODE == . ) set HRCODE = $DEFAULT_HRCODE set HRCODE = `echo $HRCODE | tr "[:upper:]" "[:lower:]"` if( $HRCODE != 'o1' & \ @@ -886,30 +905,29 @@ else set DATAOCEAN = "" endif if( $HRCODE == 'cs' ) then - if( $LOW_ATM_RES == 'FALSE') then - set OGCM_IM = `echo $AGCM_IM | cut -b2-` - set OGCM_JM = `expr $OGCM_IM \* 6` - set Resolution = `echo $OGCM_IM $OGCM_JM` - set OGCM_IM = $Resolution[1] - set OGCM_JM = $Resolution[2] - set OGCM_GRID_TYPE = Cubed-Sphere - set OGCM_NF = 6 - set LATLON_OGCM = "#DELETE" - set CUBE_OGCM = "" - set DATAOCEAN = "#DELETE" - - set OCEAN_TAG = Ostia - set SSTNAME = OSTIA_REYNOLDS - set OCEANOUT = "CS" - set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} - set OGRIDTYP = "CF" - set OSTIA = "" - else + if( $LOW_ATM_RES == 'TRUE') then echo "Error: Cubed-Sphere Ocean with ${AGCM_IM} not currently supported. Must be c90 or higher" exit 7 endif + set OGCM_IM = `echo $AGCM_IM | cut -b2-` + set OGCM_JM = `expr $OGCM_IM \* 6` + set Resolution = `echo $OGCM_IM $OGCM_JM` + set OGCM_IM = $Resolution[1] + set OGCM_JM = $Resolution[2] + set OGCM_GRID_TYPE = Cubed-Sphere + set OGCM_NF = 6 + set LATLON_OGCM = "#DELETE" + set CUBE_OGCM = "" + set DATAOCEAN = "#DELETE" + + set OCEAN_TAG = Ostia + set SSTNAME = OSTIA_REYNOLDS + set OCEANOUT = "CS" + set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} + set OGRIDTYP = "CF" + set OSTIA = "" endif set IMO = ${OGCM_IM} diff --git a/geoschemchem_setup b/geoschemchem_setup index 185b6dc1..8ada21f3 100755 --- a/geoschemchem_setup +++ b/geoschemchem_setup @@ -31,8 +31,8 @@ endif # Build Directory Locations ####################################################################### -# Set Current Working Path to gcm_setup -# ------------------------------------- +# Set Current Working Path to geoschemchem_setup +# ---------------------------------------------- setenv ARCH `uname -s` setenv NODE `uname -n` @@ -819,12 +819,31 @@ else # OGCM = FALSE (Data Ocean Resolution) # ------------------------------------ DORSLV: - echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds) Default" + + # We have two different default ocean resolutions based on the atmospheric resolution + # if LOW_ATM_RES is TRUE, we use o1 (Reynolds) as the default + # if LOW_ATM_RES is FALSE, we use CS (Cubed-Sphere OSTIA) as the default + + if( $LOW_ATM_RES == 'TRUE') then + set DEFAULT_HRCODE = 'o1' + set O1_DEFAULT = ' (Default)' + set CS_DEFAULT = '' + else + set DEFAULT_HRCODE = 'CS' + set O1_DEFAULT = '' + set CS_DEFAULT = ' (Default)' + set DEFAULT_HRCODE = 'CS' + endif + echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds)${O1_DEFAULT}" echo " ${C2}o2${CN} (1/4-deg, 1440x720 MERRA-2)" echo " ${C2}o3${CN} (1/8-deg, 2880x1440 OSTIA)" - echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)" + echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)${CS_DEFAULT}" + # We also note that the Reynolds ocean does not exist past 2022 + echo "" + echo "NOTE: The Reynolds ocean resolution is only available up to 2022" + set HRCODE = `echo $<` - if( .$HRCODE == . ) set HRCODE = o1 + if( .$HRCODE == . ) set HRCODE = $DEFAULT_HRCODE set HRCODE = `echo $HRCODE | tr "[:upper:]" "[:lower:]"` if( $HRCODE != 'o1' & \ @@ -886,30 +905,29 @@ else set DATAOCEAN = "" endif if( $HRCODE == 'cs' ) then - if( $LOW_ATM_RES == 'FALSE') then - set OGCM_IM = `echo $AGCM_IM | cut -b2-` - set OGCM_JM = `expr $OGCM_IM \* 6` - set Resolution = `echo $OGCM_IM $OGCM_JM` - set OGCM_IM = $Resolution[1] - set OGCM_JM = $Resolution[2] - set OGCM_GRID_TYPE = Cubed-Sphere - set OGCM_NF = 6 - set LATLON_OGCM = "#DELETE" - set CUBE_OGCM = "" - set DATAOCEAN = "#DELETE" - - set OCEAN_TAG = Ostia - set SSTNAME = OSTIA_REYNOLDS - set OCEANOUT = "CS" - set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} - set OGRIDTYP = "CF" - set OSTIA = "" - else + if( $LOW_ATM_RES == 'TRUE') then echo "Error: Cubed-Sphere Ocean with ${AGCM_IM} not currently supported. Must be c90 or higher" exit 7 endif + set OGCM_IM = `echo $AGCM_IM | cut -b2-` + set OGCM_JM = `expr $OGCM_IM \* 6` + set Resolution = `echo $OGCM_IM $OGCM_JM` + set OGCM_IM = $Resolution[1] + set OGCM_JM = $Resolution[2] + set OGCM_GRID_TYPE = Cubed-Sphere + set OGCM_NF = 6 + set LATLON_OGCM = "#DELETE" + set CUBE_OGCM = "" + set DATAOCEAN = "#DELETE" + + set OCEAN_TAG = Ostia + set SSTNAME = OSTIA_REYNOLDS + set OCEANOUT = "CS" + set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} + set OGRIDTYP = "CF" + set OSTIA = "" endif set IMO = ${OGCM_IM} diff --git a/gmichem_setup b/gmichem_setup index 5f5201b7..61a6b2f9 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -978,30 +978,29 @@ else set DATAOCEAN = "" endif if( $HRCODE == 'cs' ) then - if( $LOW_ATM_RES == 'FALSE') then - set OGCM_IM = `echo $AGCM_IM | cut -b2-` - set OGCM_JM = `expr $OGCM_IM \* 6` - set Resolution = `echo $OGCM_IM $OGCM_JM` - set OGCM_IM = $Resolution[1] - set OGCM_JM = $Resolution[2] - set OGCM_GRID_TYPE = Cubed-Sphere - set OGCM_NF = 6 - set LATLON_OGCM = "#DELETE" - set CUBE_OGCM = "" - set DATAOCEAN = "#DELETE" - - set OCEAN_TAG = Ostia - set SSTNAME = OSTIA_REYNOLDS - set OCEANOUT = "CS" - set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} - set OGRIDTYP = "CF" - set OSTIA = "" - else + if( $LOW_ATM_RES == 'TRUE') then echo "Error: Cubed-Sphere Ocean with ${AGCM_IM} not currently supported. Must be c90 or higher" exit 7 endif + set OGCM_IM = `echo $AGCM_IM | cut -b2-` + set OGCM_JM = `expr $OGCM_IM \* 6` + set Resolution = `echo $OGCM_IM $OGCM_JM` + set OGCM_IM = $Resolution[1] + set OGCM_JM = $Resolution[2] + set OGCM_GRID_TYPE = Cubed-Sphere + set OGCM_NF = 6 + set LATLON_OGCM = "#DELETE" + set CUBE_OGCM = "" + set DATAOCEAN = "#DELETE" + + set OCEAN_TAG = Ostia + set SSTNAME = OSTIA_REYNOLDS + set OCEANOUT = "CS" + set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} + set OGRIDTYP = "CF" + set OSTIA = "" endif set IMO = ${OGCM_IM} diff --git a/stratchem_setup b/stratchem_setup index b1b8e673..c2576020 100755 --- a/stratchem_setup +++ b/stratchem_setup @@ -31,8 +31,8 @@ endif # Build Directory Locations ####################################################################### -# Set Current Working Path to gcm_setup -# ------------------------------------- +# Set Current Working Path to stratchem_setup +# ------------------------------------------- setenv ARCH `uname -s` setenv NODE `uname -n` @@ -819,12 +819,31 @@ else # OGCM = FALSE (Data Ocean Resolution) # ------------------------------------ DORSLV: - echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds) Default" + + # We have two different default ocean resolutions based on the atmospheric resolution + # if LOW_ATM_RES is TRUE, we use o1 (Reynolds) as the default + # if LOW_ATM_RES is FALSE, we use CS (Cubed-Sphere OSTIA) as the default + + if( $LOW_ATM_RES == 'TRUE') then + set DEFAULT_HRCODE = 'o1' + set O1_DEFAULT = ' (Default)' + set CS_DEFAULT = '' + else + set DEFAULT_HRCODE = 'CS' + set O1_DEFAULT = '' + set CS_DEFAULT = ' (Default)' + set DEFAULT_HRCODE = 'CS' + endif + echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code: ${C2}o1${CN} (1 -deg, 360x180 Reynolds)${O1_DEFAULT}" echo " ${C2}o2${CN} (1/4-deg, 1440x720 MERRA-2)" echo " ${C2}o3${CN} (1/8-deg, 2880x1440 OSTIA)" - echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)" + echo " ${C2}CS${CN} (Cubed-Sphere OSTIA)${CS_DEFAULT}" + # We also note that the Reynolds ocean does not exist past 2022 + echo "" + echo "NOTE: The Reynolds ocean resolution is only available up to 2022" + set HRCODE = `echo $<` - if( .$HRCODE == . ) set HRCODE = o1 + if( .$HRCODE == . ) set HRCODE = $DEFAULT_HRCODE set HRCODE = `echo $HRCODE | tr "[:upper:]" "[:lower:]"` if( $HRCODE != 'o1' & \ @@ -886,30 +905,29 @@ else set DATAOCEAN = "" endif if( $HRCODE == 'cs' ) then - if( $LOW_ATM_RES == 'FALSE') then - set OGCM_IM = `echo $AGCM_IM | cut -b2-` - set OGCM_JM = `expr $OGCM_IM \* 6` - set Resolution = `echo $OGCM_IM $OGCM_JM` - set OGCM_IM = $Resolution[1] - set OGCM_JM = $Resolution[2] - set OGCM_GRID_TYPE = Cubed-Sphere - set OGCM_NF = 6 - set LATLON_OGCM = "#DELETE" - set CUBE_OGCM = "" - set DATAOCEAN = "#DELETE" - - set OCEAN_TAG = Ostia - set SSTNAME = OSTIA_REYNOLDS - set OCEANOUT = "CS" - set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data - set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} - set OGRIDTYP = "CF" - set OSTIA = "" - else + if( $LOW_ATM_RES == 'TRUE') then echo "Error: Cubed-Sphere Ocean with ${AGCM_IM} not currently supported. Must be c90 or higher" exit 7 endif + set OGCM_IM = `echo $AGCM_IM | cut -b2-` + set OGCM_JM = `expr $OGCM_IM \* 6` + set Resolution = `echo $OGCM_IM $OGCM_JM` + set OGCM_IM = $Resolution[1] + set OGCM_JM = $Resolution[2] + set OGCM_GRID_TYPE = Cubed-Sphere + set OGCM_NF = 6 + set LATLON_OGCM = "#DELETE" + set CUBE_OGCM = "" + set DATAOCEAN = "#DELETE" + + set OCEAN_TAG = Ostia + set SSTNAME = OSTIA_REYNOLDS + set OCEANOUT = "CS" + set SSTFILE = dataoceanfile_OSTIA_REYNOLDS_SST.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set ICEFILE = dataoceanfile_OSTIA_REYNOLDS_ICE.${OGCM_IM}x${OGCM_JM}.\${YEAR}.data + set KPARFILE = SEAWIFS_KPAR_mon_clim.${OGCM_IM}x${OGCM_JM} + set OGRIDTYP = "CF" + set OSTIA = "" endif set IMO = ${OGCM_IM} From f159276218081f3f06ad7f0d6b000f8ca01dfdaa Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 7 Nov 2024 11:15:35 -0500 Subject: [PATCH 2/4] Add dates for Reynolds --- gmichem_setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmichem_setup b/gmichem_setup index 61a6b2f9..0b6dddd9 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -823,7 +823,7 @@ else echo "------------------------------------------------" echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code:" echo "------------------------------------------------" - echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (Default)" + echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (1971-2022) (Default)" echo " ${C2}o2${CN} 1/4-deg, 1440x 720 MERRA-2" echo " ${C2}o3${CN} 1/8-deg, 2880x1440 OSTIA" echo " ${C2}o4${CN} 1 -deg, 360x 180 Hadley (1949-2006)" From 85ca2cc92f438980a6ac9395eb7f7a319ebda937 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 7 Nov 2024 14:26:18 -0500 Subject: [PATCH 3/4] Do default split in gmichem_setup --- gmichem_setup | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gmichem_setup b/gmichem_setup index 0b6dddd9..3624b47b 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -819,21 +819,37 @@ else # OGCM = FALSE (Data Ocean Resolution) # ------------------------------------ DORSLV: + + # We have two different default ocean resolutions based on the atmospheric resolution + # if LOW_ATM_RES is TRUE, we use o1 (Reynolds) as the default + # if LOW_ATM_RES is FALSE, we use CS (Cubed-Sphere OSTIA) as the default + + if( $LOW_ATM_RES == 'TRUE') then + set DEFAULT_HRCODE = 'o1' + set O1_DEFAULT = ' (Default)' + set CS_DEFAULT = '' + else + set DEFAULT_HRCODE = 'CS' + set O1_DEFAULT = '' + set CS_DEFAULT = ' (Default)' + set DEFAULT_HRCODE = 'CS' + endif + echo echo "------------------------------------------------" echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code:" echo "------------------------------------------------" - echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (1971-2022) (Default)" + echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (1971-2022)$O1_DEFAULT" echo " ${C2}o2${CN} 1/4-deg, 1440x 720 MERRA-2" echo " ${C2}o3${CN} 1/8-deg, 2880x1440 OSTIA" echo " ${C2}o4${CN} 1 -deg, 360x 180 Hadley (1949-2006)" echo " ${C2}o5${CN} 1 -deg, 360x 180 CCSM_4.0 (1850-2005)" echo " ${C2}o6${CN} 1 -deg, 360x 180 CCSM_4.0 (2006-2100)" echo " ${C2}o7${CN} 1 -deg, 360x 180 HadISST (1870-2020)" - echo " ${C2}CS${CN} Cubed-Sphere OSTIA" + echo " ${C2}CS${CN} Cubed-Sphere OSTIA$CS_DEFAULT" echo "------------------------------------------------" set HRCODE = `echo $<` - if( .$HRCODE == . ) set HRCODE = o1 + if( .$HRCODE == . ) set HRCODE = $DEFAULT_HRCODE set HRCODE = `echo $HRCODE | tr "[:upper:]" "[:lower:]"` if( $HRCODE != 'o1' & \ From e630c45291d4aef4b07516443cd977c38394e44c Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 7 Nov 2024 14:27:23 -0500 Subject: [PATCH 4/4] Add braces --- gmichem_setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gmichem_setup b/gmichem_setup index 3624b47b..ad0932da 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -839,14 +839,14 @@ else echo "------------------------------------------------" echo "Enter the ${C1}Data_Ocean Horizontal Resolution ${CN}code:" echo "------------------------------------------------" - echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (1971-2022)$O1_DEFAULT" + echo " ${C2}o1${CN} 1 -deg, 360x 180 Reynolds (1971-2022)${O1_DEFAULT}" echo " ${C2}o2${CN} 1/4-deg, 1440x 720 MERRA-2" echo " ${C2}o3${CN} 1/8-deg, 2880x1440 OSTIA" echo " ${C2}o4${CN} 1 -deg, 360x 180 Hadley (1949-2006)" echo " ${C2}o5${CN} 1 -deg, 360x 180 CCSM_4.0 (1850-2005)" echo " ${C2}o6${CN} 1 -deg, 360x 180 CCSM_4.0 (2006-2100)" echo " ${C2}o7${CN} 1 -deg, 360x 180 HadISST (1870-2020)" - echo " ${C2}CS${CN} Cubed-Sphere OSTIA$CS_DEFAULT" + echo " ${C2}CS${CN} Cubed-Sphere OSTIA${CS_DEFAULT}" echo "------------------------------------------------" set HRCODE = `echo $<` if( .$HRCODE == . ) set HRCODE = $DEFAULT_HRCODE