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

Use specific MOM6 Resolutions #542

Merged
Changes from 3 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
125 changes: 73 additions & 52 deletions gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ if( $OGCM == TRUE ) then
set MOM5 = "#DELETE"
set DEFAULT_HISTORY_TEMPLATE="HISTORY.AOGCM.rc.tmpl"
set MIT = "#DELETE"
set OCEAN_NAME="MOM6"
else if ( "$OCNMODEL" == "MIT" ) then
set OCEAN_NAME="MIT"
set OGCM_GRID_TYPE = llc
Expand Down Expand Up @@ -755,17 +754,8 @@ if( $OGCM == TRUE ) then
else
goto CORSLV
endif
else
if ( $OCEAN_NAME == "MOM" ) then
set Resolution = `echo 360 200`
else if ( $OCEAN_NAME == "MOM6" ) then
# c12 MOM6 is default 72x36
if( $AGCM_IM == "c12" ) then
set Resolution = `echo 72 36`
else
set Resolution = `echo 360 210`
endif
endif
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 $<`
Expand All @@ -774,16 +764,7 @@ if( $OGCM == TRUE ) then
set OGCM_IM = $Resolution[1]
set OGCM_JM = $Resolution[2]
else
if ( $OCEAN_NAME == "MOM" ) then
set Resolution = `echo 360 200`
else if ( $OCEAN_NAME == "MOM6" ) then
# c12 MOM6 is default 72x36
if( $AGCM_IM == "c12" ) then
set Resolution = `echo 72 36`
else
set Resolution = `echo 360 210`
endif
endif
set Resolution = `echo 360 200`

if( $num == 0 ) then
set OGCM_IM = $Resolution[1]
Expand All @@ -793,6 +774,39 @@ if( $OGCM == TRUE ) then
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:
#
# Atm Res Atm NXxNY Atm IMxJM Ocean NXxNY Ocean IMxJM Ocean LM
# ------- --------- --------- ----------- ----------- --------
# c12 1x6 12x72 3x2 72x36 50
# c90 5x36 90x540 90x2 540x458 50
# c180 30x36 180x1080 36x30 1440x1080 75

if ( $AGCM_IM == "c12" ) then
set OGCM_NX = 3
set OGCM_NY = 2
set OGCM_IM = 72
set OGCM_JM = 36
set OGCM_LM = 50
else if ( $AGCM_IM == "c90" ) then
set OGCM_NX = 90
set OGCM_NY = 2
set OGCM_IM = 540
set OGCM_JM = 458
set OGCM_LM = 50
else if ( $AGCM_IM == "c180" ) then
set OGCM_NX = 36
set OGCM_NY = 30
set OGCM_IM = 1440
set OGCM_JM = 1080
set OGCM_LM = 75
else
echo
echo "ERROR: MOM6 is currently only supported for c12, c90, and c180 atmospheric resolutions"
exit 1
endif
endif

set IMO = ${OGCM_IM}
Expand Down Expand Up @@ -825,17 +839,14 @@ if( $OGCM == TRUE ) then
set OSTIA = "#DELETE"
set OCEANOUT = "#DELETE"

echo "Enter the Ocean Model ${C1}Vertical Resolution${CN}: ${C2}LM${CN} (Default: 50)"
set OGCM_LM = $<
if( .$OGCM_LM == . ) then
set OGCM_LM = 50
endif
# We only ask this if not MOM6
if ( "$OCNMODEL" != "MOM6" ) then
echo "Enter the Ocean Model ${C1}Vertical Resolution${CN}: ${C2}LM${CN} (Default: 50)"
set OGCM_LM = $<
if( .$OGCM_LM == . ) then
set OGCM_LM = 50
endif

# At the moment c12 MOM6 is default 3x2 ocean (and 1x6 atmos)
if( $AGCM_IM == "c12" ) then
set OGCM_NX = 3
set OGCM_NY = 2
else
set OGCM_NX = 36
set OGCM_NY = 10
endif
Expand Down Expand Up @@ -1049,10 +1060,10 @@ if( $AGCM_IM == "c12" ) then
set AGCM_IM = 12
set AGCM_JM = `expr $AGCM_IM \* 6`
# C12 MOM6 should be 1x6 to match the default 3x2 ocean layout
if ( $OCEAN_NAME == "MOM6") then
set NX = 1
if ( "$OCNMODEL" == "MOM6") then
set NX = 1
else
set NX = 2
set NX = 2
endif
set NY = `expr $NX \* 6`
set HYDROSTATIC = $USE_HYDROSTATIC
Expand Down Expand Up @@ -1107,18 +1118,22 @@ if( $AGCM_IM == "c90" ) then
set AGCM_IM = 90
set AGCM_JM = `expr $AGCM_IM \* 6`
if( $OGCM == TRUE ) then
if( "$OCNMODEL" == "MIT" ) then
set NX = 10
set NY = 36
else
set NX = $OGCM_NY
set NY = $OGCM_NX
endif
set OCEAN_DT = $DT
if( "$OCNMODEL" == "MIT" ) then
set NX = 10
set NY = 36
else if ( "$OCNMODEL" == "MOM6") then
# For MOM6 c90 means atm NXxNY = 5x36
set NX = 5
set NY = 36
else
set NX = $OGCM_NY
set NY = $OGCM_NX
endif
set OCEAN_DT = $DT
else
set NX = 3
set NY = `expr $NX \* 6`
set OCEAN_DT = $IRRAD_DT
set NX = 3
set NY = `expr $NX \* 6`
set OCEAN_DT = $IRRAD_DT
endif
set HYDROSTATIC = $USE_HYDROSTATIC
set HIST_IM = `expr $AGCM_IM \* 4`
Expand All @@ -1136,13 +1151,19 @@ if( $AGCM_IM == "c180" ) then
set AGCM_IM = 180
set AGCM_JM = `expr $AGCM_IM \* 6`
if( $OGCM == TRUE ) then
set NX = $OGCM_NY
set NY = $OGCM_NX
set OCEAN_DT = $DT
if ( "$OCNMODEL" == "MOM6") then
# For MOM6 c180 means atm NXxNY = 30x36
set NX = 30
set NY = 36
else
set NX = $OGCM_NY
set NY = $OGCM_NX
endif
set OCEAN_DT = $DT
else
set NX = 6
set NY = `expr $NX \* 6`
set OCEAN_DT = $IRRAD_DT
set NX = 6
set NY = `expr $NX \* 6`
set OCEAN_DT = $IRRAD_DT
endif
set HYDROSTATIC = $USE_HYDROSTATIC
set HIST_IM = `expr $AGCM_IM \* 4`
Expand Down