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

remove Eulerian dycore #1215

Open
wants to merge 6 commits into
base: cam_development
Choose a base branch
from
Open
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
21 changes: 0 additions & 21 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -4059,27 +4059,6 @@ if ( $dyn eq 'fv3') {

}

# EUL dycore
if ($dyn eq 'eul') {
add_default($nl, 'eul_dif2_coef');
add_default($nl, 'eul_hdif_order');
add_default($nl, 'eul_hdif_kmnhdn');
add_default($nl, 'eul_hdif_coef');
add_default($nl, 'eul_divdampn');
add_default($nl, 'eul_tfilt_eps');
add_default($nl, 'eul_kmxhdc');
add_default($nl, 'eul_nsplit');
}

# SLD dycore
if ($dyn eq 'sld') {
add_default($nl, 'sld_dif2_coef');
add_default($nl, 'sld_dif4_coef');
add_default($nl, 'sld_divdampn');
add_default($nl, 'sld_tfilt_eps');
add_default($nl, 'sld_kmxhdc');
}

# Single column model
if ($cfg->get('scam')) {
add_default($nl, 'iopfile');
Expand Down
19 changes: 5 additions & 14 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Switch specifies whether CAM is being built by the CCSM sequential scripts. 0 =
<entry id="cpl" valid_values="mct,nuopc" value="mct" >
Coupling framework: mct or nuopc. Default: mct.
</entry>
<entry id="dyn" valid_values="eul,fv,fv3,se,mpas" value="">
Dynamics package: eul, fv, fv3, se, or mpas.
<entry id="dyn" valid_values="fv,fv3,se,mpas" value="">
Dynamics package: fv, fv3, se, or mpas.
</entry>
<entry id="waccm_phys" valid_values="0,1" value="0">
Switch to turn on waccm physics: 0 => no, 1 => yes.
Expand Down Expand Up @@ -148,15 +148,15 @@ Modifications that allow perturbation growth testing: 0=off, 1=on.
</entry>
<entry id="scam" valid_values="0,1" value="0">
Configure CAM for single column mode and specify an IOP: 0=no, 1=yes.
This option only supported for the Eulerian and SE dycores.
This option only supported for the SE dycore.
</entry>
<entry id="scam_iop" valid_values="arm95,arm97,atex,bomex,cgilss11,cgilss12,cgilss6,dycomsrf01,dycomsrf02,gateiii,mpace,rico,sas,sparticus,togaii,twp06,camfrc,none" value="none">
Single column IOP
Supported for Eulerian and SE dycores.
Only supported for SE dycore.
</entry>
<entry id="camiop" valid_values="0,1" value="0">
Configure CAM to generate an IOP file that can be used to drive SCAM: 0=no, 1=yes.
Supported for Eulerian and SE dycores.
Only supported for SE dycore.
</entry>
<entry id="hgrid" value="">
Horizontal grid specifier. The recognized values depend on
Expand Down Expand Up @@ -195,15 +195,6 @@ Switch on (off) age of air tracers: 0=off, 1=on.
Maximum number of constituents that are radiatively active or in any one
diagnostic list.
</entry>
<entry id="trm" value="1">
Maximum Fourier wavenumber.
</entry>
<entry id="trn" value="1">
Highest degree of the Legendre polynomials for m=0.
</entry>
<entry id="trk" value="1">
Highest degree of the associated Legendre polynomials.
</entry>
<entry id="pcols" value="16">
Maximum number of columns in a chunk (physics data structure).
</entry>
Expand Down
9 changes: 0 additions & 9 deletions bld/config_files/horiz_grid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

<config_horiz_grid>

<horiz_grid dyn="eul" hgrid="512x1024" nlat="512" nlon="1024" m="341" n="341" k="341" />
<horiz_grid dyn="eul" hgrid="256x512" nlat="256" nlon="512" m="170" n="170" k="170" />
<horiz_grid dyn="eul" hgrid="128x256" nlat="128" nlon="256" m="85" n="85" k="85" />
<horiz_grid dyn="eul" hgrid="64x128" nlat="64" nlon="128" m="42" n="42" k="42" />
<horiz_grid dyn="eul" hgrid="48x96" nlat="48" nlon="96" m="31" n="31" k="31" />
<horiz_grid dyn="eul" hgrid="32x64" nlat="32" nlon="64" m="21" n="21" k="21" />
<horiz_grid dyn="eul" hgrid="8x16" nlat="8" nlon="16" m="5" n="5" k="5" />
<horiz_grid dyn="eul" hgrid="1x1" nlat="1" nlon="1" m="1" n="1" k="1" />

<horiz_grid dyn="fv" hgrid="0.23x0.31" nlat="768" nlon="1152" />
<horiz_grid dyn="fv" hgrid="0.47x0.63" nlat="384" nlon="576" />
<horiz_grid dyn="fv" hgrid="0.5x0.625" nlat="361" nlon="576" />
Expand Down
62 changes: 10 additions & 52 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OPTIONS
-cppdefs <string> A string of user specified CPP defines. Appended to
Makefile defaults. E.g. -cppdefs '-DVAR1 -DVAR2'
-cpl Coupling framework [mct | nuopc]. Default: mct.
-dyn <name> Dynamical core option: [eul | fv | se | fv3 | mpas]. Default: fv.
-dyn <name> Dynamical core option: [fv | se | fv3 | mpas]. Default: fv.
-edit_chem_mech Invokes CAMCHEM_EDITOR to allow the user to edit the chemistry mechanism file
-hgrid <name> Specify horizontal grid. Use nlatxnlon for spectral grids;
dlatxdlon for fv grids (dlat and dlon are the grid cell size
Expand Down Expand Up @@ -123,7 +123,6 @@ OPTIONS
Options relevent to SCAM mode:

-camiop Configure CAM to generate an IOP file that can be used to drive SCAM.
This switch only works with the Eulerian dycore.
-scam <iopname> Compiles model in single column mode and configures for iop
[ arm95 | arm97 | atex | bomex | cgilsS11 | cgilsS12 | cgilsS6 | dycomsRF01 |
dycomsRF02 | gateIII | mpace | rico | sparticus | togaII | twp06 | SAS | camfrc ].
Expand Down Expand Up @@ -700,14 +699,6 @@ $waccm_phys = $cfg_ref->get('waccm_phys');

if ($print>=2) { print "WACCM physics: $waccm_phys$eol"; }


# WACCM physics only runs with FV, SE and FV3 dycores
if ( ($waccm_phys) and ($dyn_pkg eq 'eul') ) {
die <<"EOF";
** ERROR: WACCM physics does not run with the Eulerian spectral dycore.
EOF
}

# WACCM includes 4 age of air tracers by default
if ($chem_pkg =~ /waccm_ma/ or $chem_pkg =~ /waccm_tsmlt/) {
$cfg_ref->set('age_of_air_trcs', 1);
Expand Down Expand Up @@ -1222,10 +1213,10 @@ if (defined $opts{'scam'}) {
}
my $scam = $cfg_ref->get('scam') ? "ON" : "OFF";

# The only dycores supported in SCAM mode are Eulerian and Spectral Elements
if ($scam eq 'ON' and !($dyn_pkg eq 'eul' or $dyn_pkg eq 'se')) {
# The only dycore supported in SCAM mode is the Spectral Element
if ($scam eq 'ON' and !($dyn_pkg eq 'se')) {
die <<"EOF";
** ERROR: SCAM mode only works with Eulerian or SE dycores.
** ERROR: SCAM mode only works with SE dycore.
** Requested dycore is: $dyn_pkg
EOF
}
Expand All @@ -1239,10 +1230,10 @@ if (defined $opts{'camiop'}) {
}
my $camiop = $cfg_ref->get('camiop') ? "ON" : "OFF";

# The only dycores supported in SCAM mode are Eulerian and Spectral Elements
if ($camiop eq 'ON' and !($dyn_pkg eq 'eul' or $dyn_pkg eq 'se')) {
# The only dycore supported in SCAM mode is the Spectral Element
if ($camiop eq 'ON' and !($dyn_pkg eq 'se')) {
die <<"EOF";
** ERROR: CAMIOP mode only works with the Eulerian or Spectral Element dycores.
** ERROR: CAMIOP mode only works with the Spectral Element dycore.
** Requested dycore is: $dyn_pkg
EOF
}
Expand All @@ -1256,9 +1247,6 @@ my $hgrid;
if ($dyn_pkg eq 'fv') {
$hgrid = '1.9x2.5';
}
elsif ($dyn_pkg eq 'eul') {
$hgrid = '64x128';
}
elsif ($dyn_pkg eq 'se') {
$hgrid = 'ne16np4';
}
Expand Down Expand Up @@ -1934,12 +1922,6 @@ $cfg_cppdefs .= " -DPLEV=$nlev -DPCNST=$nadv -DPCOLS=$pcols -DPSUBCOLS=$psubcols
# Radiatively active constituent number
$cfg_cppdefs .= " -DN_RAD_CNST=$max_n_rad_cnst";

# Spectral truncation parameters
my $trm = $cfg_ref->get('trm');
my $trn = $cfg_ref->get('trn');
my $trk = $cfg_ref->get('trk');
$cfg_cppdefs .= " -DPTRM=$trm -DPTRN=$trn -DPTRK=$trk";

# offline driver for FV dycore
if ($offline_dyn) { $cfg_cppdefs .= ' -DOFFLINE_DYN'; }

Expand Down Expand Up @@ -2358,11 +2340,6 @@ sub write_filepath
print $fh "$camsrcdir/src/utils/pilgrim\n";
}

# Advective transport
if ($dyn eq 'eul') {
print $fh "$camsrcdir/src/advection/slt\n";
}

print $fh "$camsrcdir/src/cpl/$cpl\n";
print $fh "$camsrcdir/src/control\n";
print $fh "$camsrcdir/src/utils\n";
Expand Down Expand Up @@ -2539,9 +2516,9 @@ sub set_horiz_grid
$hgrid =~ m/C(\d+)/;
$cfg_ref->set('hgrid', $hgrid);
}
elsif ($dyn_pkg =~ m/^eul$|^fv/) {
elsif ($dyn_pkg =~ m/^fv/) {

# For EUL and FV dycores the parameters are read from an input file,
# For FV dycore the parameters are read from an input file,
# and if no dycore/grid matches are found then issue error message.

my $xml = XML::Lite->new( $hgrid_file );
Expand Down Expand Up @@ -2570,26 +2547,7 @@ sub set_horiz_grid
unless ($found) { die "set_horiz_grid: no match for dycore $dyn_pkg and hgrid $hgrid\n"; }

# Set parameter values -- dycore specific.
if ( $dyn_pkg =~ m/eul/ ) {
$cfg_ref->set('nlat', $a{'nlat'});
$cfg_ref->set('nlon', $a{'nlon'});
$cfg_ref->set('trm', $a{'m'});
$cfg_ref->set('trn', $a{'n'});
$cfg_ref->set('trk', $a{'k'});

# Override resolution settings to configure for SCAM mode. The override is needed
# because in SCAM mode the -hgrid option is used to specify the resolution of default
# datasets from which single data columns are extracted.
my $scam = $cfg_ref->get('scam');
if ($scam) {
$cfg_ref->set('nlat', 1);
$cfg_ref->set('nlon', 1);
$cfg_ref->set('trm', 1);
$cfg_ref->set('trn', 1);
$cfg_ref->set('trk', 1);
}
}
elsif ( $dyn_pkg eq 'fv' ) {
if ( $dyn_pkg eq 'fv' ) {
$cfg_ref->set('nlat', $a{'nlat'});
$cfg_ref->set('nlon', $a{'nlon'});
}
Expand Down
Loading
Loading