diff --git a/Externals_CAM.cfg b/Externals_CAM.cfg
index 795ca77b07..3a1977d235 100644
--- a/Externals_CAM.cfg
+++ b/Externals_CAM.cfg
@@ -58,14 +58,14 @@ required = True
[camnor_phys]
protocol = git
-tag = camnor_noresm_v0.0.5
+branch = noresm
repo_url = https://github.com/NorESMhub/CAM-Nor-physics
local_path = src/physics/camnor_phys
required = True
[oslo_aero]
protocol = git
-tag = noresm_oslo_aero_v0
+branch = noresm_develop
repo_url = https://github.com/NorESMhub/OSLO_AERO
local_path = src/chemistry/oslo_aero
required = True
diff --git a/bld/config_files/definition.xml b/bld/config_files/definition.xml
index 93733061c0..e834645434 100644
--- a/bld/config_files/definition.xml
+++ b/bld/config_files/definition.xml
@@ -325,5 +325,8 @@ SPCAM horizontal grid spacing, m
SPCAM time step, s
+
+Turns on aerocom
+
diff --git a/bld/configure b/bld/configure
index aab6d47985..b46b4940f4 100755
--- a/bld/configure
+++ b/bld/configure
@@ -52,6 +52,7 @@ OPTIONS
Options used to determine the CAM model configuration. These options will have an
effect whether running CAM from CESM scripts or running via CAM standalone scripts:
+ -aerocom Enable AEROCOM cpp-def for OSLO_AERO
-[no]age_of_air_trcs Switch on [off] age of air tracers. Default: on for waccm_phys, otherwise off.
-analytic_ic Enables the (namelist controlled) dycore testing infrastructure
-aquaplanet Switch on aqua-planet mode.
@@ -232,6 +233,7 @@ my %opts = (
cache => "config_cache.xml",
);
GetOptions(
+ "aerocom!" => \$opts{'aerocom'},
"age_of_air_trcs!" => \$opts{'age_of_air_trcs'},
"analytic_ic" => \$opts{'analytic_ic'},
"aquaplanet" => \$opts{'aquaplanet'},
@@ -1940,6 +1942,14 @@ if ($silhs == 1) {
# Simple Models
if ($simple_phys) { $cfg_cppdefs .= ' -DSIMPLE'; }
+# Turn on aerocom
+my $aerocom_opt = (defined $opts{'aerocom'}) ? 1 : 0;
+$cfg_ref->set('aerocom', $aerocom_opt);
+my $aerocom = $cfg_ref->get('aerocom');
+if ($aerocom eq 1) {
+ $cfg_cppdefs .= ' -DAEROCOM';
+}
+
# UNICON
if ($unicon) { $cfg_cppdefs .= ' -DUSE_UNICON'; }
@@ -2087,8 +2097,17 @@ sub write_filepath
my $CASEROOT = "$ENV{'CASEROOT'}";
print $fh "$CASEROOT/SourceMods/src.cam\n";
- # CAM-Nor has precedence over everything except SourceMods
- # Only active in NF or NB compsets
+ # CAM chemistry for oslo-aero must be at the top of Filepath since it
+ # needs to take precedence over everything. This is because several shadow files
+ # for oslo_aero routines are now in camnor_physics and contain stub interfaces
+ # needed for use statements. These replace the previous use of #ifdef OSLO_AERO queries.
+ if ($chem =~/_oslo/) {
+ print $fh "$camsrcdir/src/chemistry/oslo_aero/src\n";
+ print $fh "$camsrcdir/src/chemistry/oslo_aero/src_cam\n";
+ }
+
+ # CAM-Nor-physics has precedence over everything except SourceMods and oslo-aero
+ # Only active in NF or NB compsets
if ($camnor) {
if ($phys_pkg eq 'cam_dev') {
print $fh "$camsrcdir/src/physics/camnor_phys/physics\n";
@@ -2102,10 +2121,6 @@ sub write_filepath
}
}
- if ($chem =~/_oslo/) {
- print $fh "$camsrcdir/src/chemistry/oslo_aero/src_cam\n";
- }
-
# offline unit driver (defaults to stub)
print $fh "$camsrcdir/src/unit_drivers\n";
print $fh "$camsrcdir/src/unit_drivers/${offline_drv}\n";
@@ -2142,14 +2157,12 @@ sub write_filepath
if ($chem_src_dir) {
print $fh "$chem_src_dir\n";
}
- if ($chem =~/_oslo/) {
- # print $fh "$camsrcdir/src/chemistry/oslo_aero/object\n"; BUG: this does not compile
- print $fh "$camsrcdir/src/chemistry/oslo_aero/src\n";
- print $fh "$camsrcdir/src/chemistry/oslo_aero/cam_intr\n";
- } elsif ($chem =~ /_mam/) {
- print $fh "$camsrcdir/src/chemistry/modal_aero\n";
- } else {
- print $fh "$camsrcdir/src/chemistry/bulk_aero\n";
+ if ($chem !~/_oslo/) {
+ if ($chem =~ /_mam/) {
+ print $fh "$camsrcdir/src/chemistry/modal_aero\n";
+ } else {
+ print $fh "$camsrcdir/src/chemistry/bulk_aero\n";
+ }
}
print $fh "$camsrcdir/src/chemistry/aerosol\n";
@@ -2161,9 +2174,9 @@ sub write_filepath
}
if ($waccm_phys) {
print $fh "$camsrcdir/src/physics/waccm\n";
- print $fh "$camsrcdir/src/physics/ali_arms\n";
- print $fh "$camsrcdir/src/physics/ali_arms/subs\n";
- print $fh "$camsrcdir/src/physics/ali_arms/include\n";
+ print $fh "$camsrcdir/src/physics/ali_arms\n";
+ print $fh "$camsrcdir/src/physics/ali_arms/subs\n";
+ print $fh "$camsrcdir/src/physics/ali_arms/include\n";
}
print $fh "$camsrcdir/src/ionosphere\n";
diff --git a/bld/namelist_files/use_cases/1850_cam_lt.xml b/bld/namelist_files/use_cases/1850_cam_lt.xml
index d8668677e5..54b0307a10 100644
--- a/bld/namelist_files/use_cases/1850_cam_lt.xml
+++ b/bld/namelist_files/use_cases/1850_cam_lt.xml
@@ -32,12 +32,11 @@
.true.
'CYCLICAL'
-
1850
'atm/cam/tracer_cnst'
'tracer_cnst_WACCM6_halons_3DmonthlyL70_1850climoCMIP6piControl001_y21-50avg_c180802.nc'
- 'O3','OH','NO3','HO2','HALONS'
+ 'O3','OH','NO3','HO2'
'CYCLICAL'
''
diff --git a/bld/namelist_files/use_cases/1850_cam_lt_noresm.xml b/bld/namelist_files/use_cases/1850_cam_lt_noresm.xml
new file mode 100644
index 0000000000..0c21387dab
--- /dev/null
+++ b/bld/namelist_files/use_cases/1850_cam_lt_noresm.xml
@@ -0,0 +1,81 @@
+
+
+
+
+'atm/cam/solar/SolarForcingCMIP6piControl_c160921.nc'
+18500101
+FIXED
+
+
+atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc
+1850
+'CYCLICAL'
+'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'
+
+
+'Q:H2O->UBC_FILE'
+atm/cam/chem/ubc/b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensAvg123.cam.h0zm.H2O.185001-201412_c230509cdf5.nc
+CYCLICAL
+1850
+
+
+'atm/cam/ozone_strataero'
+'ozone_strataero_cyclical_WACCM6_L70_CMIP6-piControl.001_y21-50avg_zm_5day_c180802.nc'
+'O3'
+'CYCLICAL'
+1850
+
+
+1850
+'atm/cam/tracer_cnst'
+'tracer_cnst_WACCM6_halons_3DmonthlyL70_1850climoCMIP6piControl001_y21-50avg_c180802.nc'
+'O3','OH','NO3','HO2'
+'CYCLICAL'
+''
+
+
+CYCLICAL
+1850
+
+ 'H2O -> $INPUTDATA_ROOT/atm/cam/chem/emis/elev/H2O_emission_CH4_oxidationx2_elev_3DmonthlyL70_1850climoCMIP6piControl001_y21-50avg_c180802.nc',
+ 'BC_AX -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_AX_airALL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'BC_AX -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_AX_anthroprofENEIND_vertical_1850_0.9x1.25_version20180512.nc',
+ 'BC_N -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_N_airALL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'BC_N -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_N_anthroprofENEIND_vertical_1850_0.9x1.25_version20180512.nc',
+ 'BC_NI -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_NI_bbAGRIBORFDEFOPEATSAVATEMF_vertical_1850_0.9x1.25_version20180512.nc',
+ 'OM_NI -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_OM_NI_airALL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'OM_NI -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_OM_NI_anthroprofENEIND_vertical_1850_0.9x1.25_version20180512.nc',
+ 'OM_NI -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_OM_NI_bbAGRIBORFDEFOPEATSAVATEMF_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO2_airALL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO2_anthroprofENEIND_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO2_bbAGRIBORFDEFOPEATSAVATEMF_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO2_volcCONTEXPL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO4_PR -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO4_PR_airALL_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO4_PR -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO4_PR_anthroprofENEIND_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO4_PR -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO4_PR_bbAGRIBORFDEFOPEATSAVATEMF_vertical_1850_0.9x1.25_version20180512.nc',
+ 'SO4_PR -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO4_PR_volcCONTEXPL_vertical_1850_0.9x1.25_version20180512.nc'
+
+
+
+CYCLICAL
+1850
+
+ 'BC_AX -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_AX_anthrosurfAGRTRADOMSOLWSTSHP_surface_1850_0.9x1.25_version20180512.nc',
+ 'BC_N -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_BC_N_anthrosurfAGRTRADOMSOLWSTSHP_surface_1850_0.9x1.25_version20180512.nc',
+ 'OM_NI -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_OM_NI_anthrosurfAGRTRADOMSOLWSTSHP_surface_1850_0.9x1.25_version20180512.nc',
+ 'SO2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO2_anthrosurfAGRTRADOMSOLWSTSHP_surface_1850_0.9x1.25_version20180512.nc',
+ 'SO4_PR -> $INPUTDATA_ROOT/atm/cam/chem/emis/cmip6_emissions_version20180512/emissions_cmip6_noresm2_SO4_PR_anthrosurfAGRTRADOMSOLWSTSHP_surface_1850_0.9x1.25_version20180512.nc'
+
+
+'A:Q:H2O','N:O2:O2','N:CO2:CO2','N:ozone:O3','N:N2O:N2O','N:CH4:CH4','N:CFC11:CFC11','N:CFC12:CFC12'
+
+
+.true.
+
+
+.true.
+
+
+'isoprene = isoprene','monoterp = myrcene + sabinene + limonene+ carene_3 + ocimene_t_b + pinene_b + pinene_a'
+
+
diff --git a/cime_config/buildcpp b/cime_config/buildcpp
index e7df81cecb..b4508bfd67 100644
--- a/cime_config/buildcpp
+++ b/cime_config/buildcpp
@@ -41,6 +41,7 @@ def buildcpp(case):
nthrds_atm = case.get_value("NTHRDS_ATM")
cam_config_opts = case.get_value("CAM_CONFIG_OPTS")
comp_interface=case.get_value("COMP_INTERFACE")
+ cam_aerocom = case.get_value("CAM_AEROCOM")
# level information for CAM is part of the atm grid name - and must be stripped out
nlev = ''
@@ -123,6 +124,10 @@ def buildcpp(case):
if "-cosp" in config_opts:
config_opts += ["-cosp_libdir", os.path.join(exeroot, "atm", "obj", "cosp")]
+ print(f"cam_aerocom is {cam_aerocom}")
+ if cam_aerocom:
+ config_opts += [" -aerocom"]
+
if cam_dycore == 'mpas':
config_opts += ["-mpas_libdir", os.path.join(exeroot, "atm", "obj", "mpas")]
diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index 246c81ce11..9147bfe14e 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -131,6 +131,14 @@
CAM dynamical core
+
+ logical
+ FALSE
+ build_component_cam
+ env_build.xml
+ If true, turn on aerocom diagnostics for oslo-aerosol package
+
+
char
@@ -226,6 +234,7 @@
waccm_sc_1850_cam6
1850_cam_lt
1850_cam_mt
+ 1850_cam_lt_noresm
2000_cam4_trop_chem
waccmxie_ma_2000_cam4
@@ -240,9 +249,9 @@
waccmx_ma_2000_cam6
2000_cam6
- 2000_cam6
-
2000_cam6_noresm
+
+ 2000_cam6
2000_cam6_noresm
aquaplanet_cam3
@@ -270,7 +279,6 @@
hist_cam6
hist_cam_lt
hist_cam_mt
-
hist_cam6_noresm
waccm_tsmlt_hist_cam6
diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml
index 480d3e1273..2faac02647 100644
--- a/cime_config/config_compsets.xml
+++ b/cime_config/config_compsets.xml
@@ -32,18 +32,19 @@
- lname
- alias
- support (optional description of the support level for this compset)
+
Each compset node can also have the following attributes
- grid (optional regular expression match for grid to work with the compset)
+
+
+
-
- NF2000dev
- 2000_CAM%DEV%LT%NORESM_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
+
NF2000oslo
2000_CAM%DEV%LT%NORESM%CAMoslo_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
@@ -54,34 +55,16 @@
- NF2000devL32
- 2000_CAM%DEV%NORESM_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
-
- NF2000osloL32
- 2000_CAM%DEV%NORESM%CAMoslo_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
-
- NF2000tropmam4l32
- 2000_CAM%DEV%NORESM%TROPMAM4_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
-
-
- NF2000climo
- 2000_CAM60%NORESM_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
-
-
- NF1850
- 1850_CAM60%NORESM_CLM51%FATES-SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
+ NF1850oslo
+ 1850_CAM%DEV%LT%NORESM%CAMoslo_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
- NF1850oslo
- 1850_CAM60%NORESM%CAMoslo_CLM51%FATES-SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
+ NF1850tropmam4
+ 1850_CAM%DEV%LT%NORESM%TROPMAM4_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
- NFLTHIST_v0d
+ NFLTHISTghgmam4_v0d
HIST_CAM%DEV%LT%NORESM%GHGMAM4_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
@@ -89,18 +72,8 @@
HIST_CAM%DEV%LT%NORESM%CAMoslo_CLM51%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV
-
- NQPC6
- 2000_CAM60%NORESM_SLND_SICE_DOCN%AQP3_SROF_SGLC_SWAV
-
-
-
- NQPC2000climo
- 2000_CAM60%NORESM%CCTS1_SLND_SICE_DOCN%AQP3_SROF_SGLC_SWAV
-
-
-
+
@@ -458,7 +431,7 @@
-
+
diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml
index 316bd8435d..37e7fc9879 100644
--- a/cime_config/config_pes.xml
+++ b/cime_config/config_pes.xml
@@ -5,1389 +5,310 @@
- none
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- none
-
- -1
- -1
- -1
- -1
- -1
- -1
- -1
- -1
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 24
- 24
- 24
- 24
- 24
- 24
- 24
- 24
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- -4
- -4
- -4
- -4
- -4
- -4
- -4
- -4
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- -4
- -4
- -4
- -4
- -4
- -4
- -4
- -4
-
-
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- -40
- -40
- -40
- -40
- -40
- -40
- -40
- -40
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
-
-
-
-
- none
-
- 2048
- 2048
- 2048
- 2048
- 2048
- 2048
- 2048
- 2048
-
-
- 8
- 8
- 8
- 8
- 8
- 8
- 8
- 8
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 720
- 720
- 720
- 720
- 720
- 720
- 720
- 720
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 1728
- 1728
- 1728
- 1728
- 1728
- 1728
- 1728
- 1728
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
-
-
- none
-
- -50
- -50
- -50
- -50
- -50
- -50
-
-
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- none
-
- -16
- -16
- -16
- -16
- -16
- -16
- -16
- -16
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 4800
- 4800
- 4800
- 4800
- 4800
- 4800
- 4800
- 4800
-
-
- 4
- 4
- 4
- 4
- 4
- 4
- 4
- 4
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 16384
- 16384
- 16384
- 16384
- 16384
- 16384
- 16384
- 16384
-
-
- 8
- 8
- 8
- 8
- 8
- 8
- 8
- 8
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 8192
- 8192
- 8192
- 8192
- 8192
- 8192
- 8192
- 8192
-
-
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
- none
-
- -32
- -32
- -32
- -32
- -32
- -32
- -32
- -32
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 64
- 64
- 64
- 64
- 64
- 64
- 64
- 64
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -32
+ -32
+ -32
+ -32
+ -32
+ -32
+ -32
+ -32
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
- none
-
- -2
- -2
- -2
- -2
- -2
- -2
- -2
- -2
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 224
- 224
- 224
- 224
- 224
- 224
- 224
- 224
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 192
- 192
- 192
- 192
- 192
- 192
- 192
- 192
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 192
- 192
- 192
- 192
- 192
- 192
- 192
- 192
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 240
- 240
- 240
- 240
- 240
- 240
- 240
- 240
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- 36
- none
-
- 360
- 360
- 360
- 360
- 360
- 360
- 360
- 360
-
-
- 3
- 3
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 48
- 48
- 48
- 48
- 48
- 48
- 48
- 48
-
-
- 3
- 3
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- none
-
- 144
- 144
- 144
- 144
- 144
- 144
- 144
- 144
-
-
- 3
- 3
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- none
-
- 288
- 288
- 288
- 288
- 288
- 288
- 288
- 288
-
-
- 3
- 3
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
- none
-
- 36
- 36
- 36
- 36
- 36
- 36
- 36
- 36
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
- none
-
- 192
- 192
- 192
- 192
- 192
- 192
- 192
- 192
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 864
- 864
- 864
- 864
- 864
- 864
- 864
- 864
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
-
- none
-
- -4
- -4
- -4
- -4
- -4
- -4
- -4
- -4
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- -208
- -208
- -208
- -208
- -208
- -208
- -208
- -208
-
-
- 8
- 8
- 8
- 8
- 8
- 8
- 8
- 8
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 384
- 384
- 384
- 384
- 384
- 384
-
-
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+ -4
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
- none
-
- -8
- -8
- -8
- -8
- -8
- -8
- -8
- -8
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
- none
-
- 768
- 768
- 768
- 768
- 768
- 768
- 768
- 768
-
-
- 3
- 3
- 3
- 3
- 3
- 3
- 3
- 3
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- none
-
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
- 1800
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 480
- 480
- 480
- 480
- 480
- 480
- 480
- 480
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
- none
-
- -16
- -16
- -16
- -16
- -16
- -16
- -16
- -16
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
- none
-
- 960
- 960
- 960
- 960
- 960
- 960
- 960
- 960
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
+ none
+
+ -16
+ -16
+ -16
+ -16
+ -16
+ -16
+ -16
+ -16
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
@@ -1699,7 +620,6 @@
-
diff --git a/cime_config/testdefs/testlist_cam.xml b/cime_config/testdefs/testlist_cam.xml
index 6990266fe4..618ba78ed4 100644
--- a/cime_config/testdefs/testlist_cam.xml
+++ b/cime_config/testdefs/testlist_cam.xml
@@ -10,7 +10,7 @@
-
+
@@ -26,17 +26,16 @@
-
+
+
-
-
-
+
@@ -44,7 +43,7 @@
-
+
@@ -53,27 +52,7 @@
-
@@ -99,7 +76,7 @@
-
+
@@ -109,7 +86,7 @@
-
+
diff --git a/src/physics/cam/cam_diagnostics.F90 b/src/physics/cam/cam_diagnostics.F90
index 10612edfa9..b230c5389f 100644
--- a/src/physics/cam/cam_diagnostics.F90
+++ b/src/physics/cam/cam_diagnostics.F90
@@ -221,7 +221,7 @@ subroutine diag_init_dry(pbuf2d)
call register_vector_field('UAP','VAP')
call addfld (apcnst(1), (/ 'lev' /), 'A','kg/kg', trim(cnst_longname(1))//' (after physics)')
- if (.not.dycore_is('EUL')) then
+ if (.not.dycore_is('EUL')) then
call addfld ('TFIX', horiz_only, 'A', 'K/s', 'T fixer (T equivalent of Energy correction)')
end if
call addfld ('TTEND_TOT', (/ 'lev' /), 'A', 'K/s', 'Total temperature tendency')
@@ -365,7 +365,7 @@ subroutine diag_init_dry(pbuf2d)
call add_default ('UAP ' , history_budget_histfile_num, ' ')
call add_default ('VAP ' , history_budget_histfile_num, ' ')
call add_default (apcnst(1) , history_budget_histfile_num, ' ')
- if (.not.dycore_is('EUL')) then
+ if (.not.dycore_is('EUL')) then
call add_default ('TFIX ' , history_budget_histfile_num, ' ')
end if
end if
@@ -949,7 +949,7 @@ subroutine diag_phys_writeout_dry(state, pbuf, p_surf_t)
do m = 1, pcnst
if (cnst_cam_outfld(m)) then
- call outfld(cnst_name(m), state%q(1,1,m), pcols, lchnk)
+ call outfld(cnst_name(m), state%q(:,:,m), pcols, lchnk)
end if
end do
@@ -1129,9 +1129,9 @@ subroutine diag_phys_writeout_dry(state, pbuf, p_surf_t)
!
! Output U, V, T, P and Z at bottom level
!
- call outfld ('UBOT ', state%u(1,pver) , pcols, lchnk)
- call outfld ('VBOT ', state%v(1,pver) , pcols, lchnk)
- call outfld ('ZBOT ', state%zm(1,pver) , pcols, lchnk)
+ call outfld ('UBOT ', state%u(:,pver) , pcols, lchnk)
+ call outfld ('VBOT ', state%v(:,pver) , pcols, lchnk)
+ call outfld ('ZBOT ', state%zm(:,pver) , pcols, lchnk)
!! Boundary layer atmospheric stability, temperature, water vapor diagnostics
@@ -1269,7 +1269,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
if (co2_transport()) then
do m = 1,4
- call outfld(trim(cnst_name(c_i(m)))//'_BOT', state%q(1,pver,c_i(m)), pcols, lchnk)
+ call outfld(trim(cnst_name(c_i(m)))//'_BOT', state%q(:,pver,c_i(m)), pcols, lchnk)
end do
end if
@@ -1390,7 +1390,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
!
! Output Q at bottom level
!
- call outfld ('QBOT ', state%q(1,pver,ixq), pcols, lchnk)
+ call outfld ('QBOT ', state%q(:,pver,ixq), pcols, lchnk)
! Total energy of the atmospheric column for atmospheric heat storage calculations
@@ -1407,7 +1407,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
do k=2,pver
ftem(:ncol,1) = ftem(:ncol,1) + ftem(:ncol,k)
end do
- call outfld ('ATMEINT ',ftem(:ncol,1) ,pcols ,lchnk )
+ call outfld ('ATMEINT ',ftem(:ncol,1) ,ncol ,lchnk )
!! Boundary layer atmospheric stability, temperature, water vapor diagnostics
@@ -1430,12 +1430,12 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
hist_fld_active('THE9251000') .or. &
hist_fld_active('THE8501000') .or. &
hist_fld_active('THE7001000')) then
- call vertinterp(ncol, pcols, pver, state%pmid, 100000._r8, state%q(1,1,ixq), p_surf_q1)
+ call vertinterp(ncol, pcols, pver, state%pmid, 100000._r8, state%q(:,:,ixq), p_surf_q1)
end if
if (hist_fld_active('THE9251000') .or. &
hist_fld_active('Q925')) then
- call vertinterp(ncol, pcols, pver, state%pmid, 92500._r8, state%q(1,1,ixq), p_surf_q2)
+ call vertinterp(ncol, pcols, pver, state%pmid, 92500._r8, state%q(:,:,ixq), p_surf_q2)
end if
!!! at 1000 mb and 925 mb
@@ -1462,7 +1462,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
!!! at 1000 mb and 850 mb
if (hist_fld_active('THE8501000')) then
- call vertinterp(ncol, pcols, pver, state%pmid, 85000._r8, state%q(1,1,ixq), p_surf_q2)
+ call vertinterp(ncol, pcols, pver, state%pmid, 85000._r8, state%q(:,:,ixq), p_surf_q2)
p_surf = ((p_surf_t(:, surf_085000)*(1000.0_r8/850.0_r8)**cappa) * &
exp((2500000.0_r8*p_surf_q2)/(1004.0_r8*p_surf_t(:, surf_085000)))) - &
(p_surf_t(:,surf_100000)*(1.0_r8)**cappa)*exp((2500000.0_r8*p_surf_q1)/(1004.0_r8*p_surf_t(:,surf_100000)))
@@ -1477,7 +1477,7 @@ subroutine diag_phys_writeout_moist(state, pbuf, p_surf_t)
!!! at 1000 mb and 700 mb
if (hist_fld_active('THE7001000')) then
- call vertinterp(ncol, pcols, pver, state%pmid, 70000._r8, state%q(1,1,ixq), p_surf_q2)
+ call vertinterp(ncol, pcols, pver, state%pmid, 70000._r8, state%q(:,:,ixq), p_surf_q2)
p_surf = ((p_surf_t(:, surf_070000)*(1000.0_r8/700.0_r8)**cappa) * &
exp((2500000.0_r8*p_surf_q2)/(1004.0_r8*p_surf_t(:, surf_070000)))) - &
(p_surf_t(:,surf_100000)*(1.0_r8)**cappa)*exp((2500000.0_r8*p_surf_q1)/(1004.0_r8*p_surf_t(:,surf_100000)))
@@ -1776,7 +1776,7 @@ subroutine diag_surf (cam_in, cam_out, state, pbuf)
if (moist_physics) then
call outfld('SHFLX', cam_in%shf, pcols, lchnk)
call outfld('LHFLX', cam_in%lhf, pcols, lchnk)
- call outfld('QFLX', cam_in%cflx(1,1), pcols, lchnk)
+ call outfld('QFLX', cam_in%cflx(:,:), pcols, lchnk)
call outfld('TAUX', cam_in%wsx, pcols, lchnk)
call outfld('TAUY', cam_in%wsy, pcols, lchnk)
@@ -2055,7 +2055,7 @@ subroutine diag_phys_tend_writeout_dry(state, pbuf, tend, ztodt)
! Total physics tendency for Temperature
! (remove global fixer tendency from total for FV and SE dycores)
- if (.not.dycore_is('EUL')) then
+ if (.not.dycore_is('EUL')) then
call check_energy_get_integrals( heat_glob_out=heat_glob )
ftem2(:ncol) = heat_glob/cpair
call outfld('TFIX', ftem2, pcols, lchnk )
@@ -2128,17 +2128,17 @@ subroutine diag_phys_tend_writeout_moist(state, pbuf, tend, ztodt, &
call cnst_get_ind('CLDLIQ', ixcldliq, abort=.false.)
call cnst_get_ind('CLDICE', ixcldice, abort=.false.)
- if ( cnst_cam_outfld( 1) ) then
- call outfld (apcnst( 1), state%q(1,1, 1), pcols, lchnk)
+ if ( cnst_cam_outfld(1) ) then
+ call outfld (apcnst(1), state%q(:,:,1), pcols, lchnk)
end if
if (ixcldliq > 0) then
if (cnst_cam_outfld(ixcldliq)) then
- call outfld (apcnst(ixcldliq), state%q(1,1,ixcldliq), pcols, lchnk)
+ call outfld (apcnst(ixcldliq), state%q(:,:,ixcldliq), pcols, lchnk)
end if
end if
if (ixcldice > 0) then
if ( cnst_cam_outfld(ixcldice) ) then
- call outfld (apcnst(ixcldice), state%q(1,1,ixcldice), pcols, lchnk)
+ call outfld (apcnst(ixcldice), state%q(:,:,ixcldice), pcols, lchnk)
end if
end if
@@ -2247,17 +2247,17 @@ subroutine diag_state_b4_phys_write_moist (state)
call cnst_get_ind('CLDLIQ', ixcldliq, abort=.false.)
call cnst_get_ind('CLDICE', ixcldice, abort=.false.)
- if ( cnst_cam_outfld( 1) ) then
- call outfld (bpcnst( 1), state%q(1,1, 1), pcols, lchnk)
+ if ( cnst_cam_outfld(1) ) then
+ call outfld (bpcnst(1), state%q(:,:,1), pcols, lchnk)
end if
if (ixcldliq > 0) then
if (cnst_cam_outfld(ixcldliq)) then
- call outfld (bpcnst(ixcldliq), state%q(1,1,ixcldliq), pcols, lchnk)
+ call outfld (bpcnst(ixcldliq), state%q(:,:,ixcldliq), pcols, lchnk)
end if
end if
if (ixcldice > 0) then
if (cnst_cam_outfld(ixcldice)) then
- call outfld (bpcnst(ixcldice), state%q(1,1,ixcldice), pcols, lchnk)
+ call outfld (bpcnst(ixcldice), state%q(:,:,ixcldice), pcols, lchnk)
end if
end if
diff --git a/src/physics/cam/convect_shallow.F90 b/src/physics/cam/convect_shallow.F90
index 0fa7e3b83d..26352d4b7a 100644
--- a/src/physics/cam/convect_shallow.F90
+++ b/src/physics/cam/convect_shallow.F90
@@ -19,19 +19,19 @@ module convect_shallow
use phys_control, only : phys_getopts
implicit none
- private
+ private
save
public :: &
convect_shallow_register, & ! Register fields in physics buffer
convect_shallow_init, & ! Initialize shallow module
convect_shallow_tend, & ! Return tendencies
- convect_shallow_use_shfrc !
+ convect_shallow_use_shfrc !
! The following namelist variable controls which shallow convection package is used.
! 'Hack' = Hack shallow convection (default)
! 'UW' = UW shallow convection by Sungsu Park and Christopher S. Bretherton
- ! 'UNICON' = General Convection Model by Sungsu Park
+ ! 'UNICON' = General Convection Model by Sungsu Park
! 'off' = No shallow convection
character(len=16) :: shallow_scheme ! Default set in phys_control.F90, use namelist to change
@@ -40,16 +40,16 @@ module convect_shallow
logical :: history_budget ! Output tendencies and state variables for CAM4 T, qv, ql, qi
integer :: history_budget_histfile_num ! output history file number for budget fields
- ! Physics buffer indices
- integer :: icwmrsh_idx = 0
- integer :: rprdsh_idx = 0
- integer :: rprdtot_idx = 0
- integer :: cldtop_idx = 0
- integer :: cldbot_idx = 0
- integer :: cush_idx = 0
+ ! Physics buffer indices
+ integer :: icwmrsh_idx = 0
+ integer :: rprdsh_idx = 0
+ integer :: rprdtot_idx = 0
+ integer :: cldtop_idx = 0
+ integer :: cldbot_idx = 0
+ integer :: cush_idx = 0
integer :: nevapr_shcu_idx = 0
- integer :: shfrc_idx = 0
- integer :: cld_idx = 0
+ integer :: shfrc_idx = 0
+ integer :: cld_idx = 0
integer :: concld_idx = 0
integer :: rprddp_idx = 0
integer :: tke_idx = 0
@@ -84,9 +84,9 @@ subroutine convect_shallow_register
use physics_buffer, only : pbuf_add_field, dtype_r8, dyn_time_lvls
use phys_control, only: use_gw_convect_sh
use unicon_cam, only: unicon_cam_register
-
+
call phys_getopts( shallow_scheme_out = shallow_scheme, microp_scheme_out = microp_scheme)
-
+
! SPCAM registers its own fields
if (shallow_scheme == 'SPCAM') return
@@ -95,7 +95,7 @@ subroutine convect_shallow_register
call pbuf_add_field('RPRDTOT', 'physpkg' ,dtype_r8,(/pcols,pver/), rprdtot_idx )
call pbuf_add_field('CLDTOP', 'physpkg' ,dtype_r8,(/pcols,1/), cldtop_idx )
call pbuf_add_field('CLDBOT', 'physpkg' ,dtype_r8,(/pcols,1/), cldbot_idx )
- call pbuf_add_field('cush', 'global' ,dtype_r8,(/pcols,dyn_time_lvls/), cush_idx )
+ call pbuf_add_field('cush', 'global' ,dtype_r8,(/pcols,dyn_time_lvls/), cush_idx )
call pbuf_add_field('NEVAPR_SHCU','physpkg' ,dtype_r8,(/pcols,pver/), nevapr_shcu_idx )
call pbuf_add_field('PREC_SH', 'physpkg' ,dtype_r8,(/pcols/), prec_sh_idx )
call pbuf_add_field('SNOW_SH', 'physpkg' ,dtype_r8,(/pcols/), snow_sh_idx )
@@ -110,16 +110,16 @@ subroutine convect_shallow_register
endif
! shallow interface gbm flux_convective_cloud_rain+snow (kg/m2/s)
- call pbuf_add_field('SH_FLXPRC','physpkg',dtype_r8,(/pcols,pverp/),sh_flxprc_idx)
+ call pbuf_add_field('SH_FLXPRC','physpkg',dtype_r8,(/pcols,pverp/),sh_flxprc_idx)
! shallow interface gbm flux_convective_cloud_snow (kg/m2/s)
- call pbuf_add_field('SH_FLXSNW','physpkg',dtype_r8,(/pcols,pverp/),sh_flxsnw_idx)
+ call pbuf_add_field('SH_FLXSNW','physpkg',dtype_r8,(/pcols,pverp/),sh_flxsnw_idx)
! shallow gbm cloud liquid water (kg/kg)
- call pbuf_add_field('SH_CLDLIQ','physpkg',dtype_r8,(/pcols,pver/),sh_cldliq_idx)
+ call pbuf_add_field('SH_CLDLIQ','physpkg',dtype_r8,(/pcols,pver/),sh_cldliq_idx)
! shallow gbm cloud ice water (kg/kg)
- call pbuf_add_field('SH_CLDICE','physpkg',dtype_r8,(/pcols,pver/),sh_cldice_idx)
+ call pbuf_add_field('SH_CLDICE','physpkg',dtype_r8,(/pcols,pver/),sh_cldice_idx)
! If gravity waves from shallow convection are on, output this field.
if (use_gw_convect_sh) then
@@ -154,7 +154,7 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
use spmd_utils, only : masterproc
use cam_abortutils, only : endrun
use phys_control, only : cam_physpkg_is
-
+
use physics_buffer, only : pbuf_get_index, physics_buffer_desc, pbuf_set_field
real(r8), intent(in) :: pref_edge(plevp) ! Reference pressures at interfaces
@@ -163,7 +163,7 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
integer limcnv ! Top interface level limit for convection
integer k
character(len=16) :: eddy_scheme
-
+
! SPCAM does its own convection
if (shallow_scheme == 'SPCAM') return
@@ -221,7 +221,7 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
call addfld( 'PCLDBOT', horiz_only, 'A', '1', 'Pressure of cloud base' )
call addfld( 'FREQSH', horiz_only, 'A', 'fraction', 'Fractional occurance of shallow convection' )
-
+
call addfld( 'HKFLXPRC', (/ 'ilev' /), 'A', 'kg/m2/s', 'Flux of precipitation from HK convection' )
call addfld( 'HKFLXSNW', (/ 'ilev' /), 'A', 'kg/m2/s', 'Flux of snow from HK convection' )
call addfld( 'HKNTPRPD', (/ 'lev' /), 'A', 'kg/kg/s', 'Net precipitation production from HK convection' )
@@ -286,7 +286,7 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
if( masterproc ) then
write(iulog,*) 'MFINTI: Convection will be capped at intfc ', limcnv, ' which is ', pref_edge(limcnv), ' pascals'
end if
-
+
call mfinti( rair, cpair, gravit, latvap, rhoh2o, limcnv) ! Get args from inti.F90
case('UW') ! Park and Bretherton shallow convection scheme
@@ -346,7 +346,7 @@ end function convect_shallow_use_shfrc
!=============================================================================== !
subroutine convect_shallow_tend( ztodt , cmfmc , &
- qc , qc2 , rliq , rliq2 , &
+ qc , qc2 , rliq , rliq2 , &
state , ptend_all, pbuf, cam_in)
use physics_buffer, only : physics_buffer_desc, pbuf_get_field, pbuf_set_field, pbuf_old_tim_idx
@@ -357,7 +357,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
use physics_types, only : physics_ptend_dealloc
use physics_types, only : physics_ptend_sum
use camsrfexch, only : cam_in_t
-
+
use constituents, only : pcnst, cnst_get_ind, cnst_get_type_byind
use hk_conv, only : cmfmca
use uwshcu, only : compute_uwshcu_inv
@@ -381,7 +381,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
real(r8), intent(out) :: rliq2(pcols) ! Vertically-integrated reserved cloud condensate [ m/s ]
real(r8), intent(out) :: qc2(pcols,pver) ! Same as qc but only from shallow convection scheme
-
+
real(r8), intent(inout) :: cmfmc(pcols,pverp) ! Moist deep + shallow convection cloud mass flux [ kg/s/m2 ]
real(r8), intent(inout) :: qc(pcols,pver) ! dq/dt due to export of cloud water into environment by shallow
@@ -392,7 +392,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
! --------------- !
- ! Local Variables !
+ ! Local Variables !
! --------------- !
integer :: i, k, m
integer :: n, x
@@ -432,7 +432,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
real(r8) :: pcnb(pcols) ! Bottom pressure level of shallow + deep convective activity
real(r8) :: cmfsl(pcols,pverp ) ! Convective flux of liquid water static energy
real(r8) :: cmflq(pcols,pverp ) ! Convective flux of total water in energy unit
-
+
real(r8) :: ftem_preCu(pcols,pver) ! Saturation vapor pressure after shallow Cu convection
real(r8) :: tem2(pcols,pver) ! Saturation specific humidity and RH
real(r8) :: t_preCu(pcols,pver) ! Temperature after shallow Cu convection
@@ -442,7 +442,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
real(r8) :: icwmr_UW(pcols,pver) ! In-cloud Cumulus LWC [ kg/m2 ]
real(r8) :: icimr_UW(pcols,pver) ! In-cloud Cumulus IWC [ kg/m2 ]
real(r8) :: ptend_tracer(pcols,pver,pcnst) ! Tendencies of tracers
- real(r8) :: sum1, sum2, sum3, pdelx
+ real(r8) :: sum1, sum2, sum3, pdelx
real(r8) :: landfracdum(pcols)
real(r8), dimension(pcols,pver) :: sl, qt, slv
@@ -476,14 +476,14 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
type(unicon_out_t) :: unicon_out
! ----------------------- !
- ! Main Computation Begins !
+ ! Main Computation Begins !
! ----------------------- !
zero = 0._r8
nstep = get_nstep()
lchnk = state%lchnk
ncol = state%ncol
-
+
call physics_state_copy( state, state1 ) ! Copy state to local state1.
! Associate pointers with physics buffer fields
@@ -553,7 +553,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
snow = 0._r8
case('Hack') ! Hack scheme
-
+
lq(:) = .TRUE.
call physics_ptend_init( ptend_loc, state%psetcols, 'cmfmca', ls=.true., lq=lq ) ! Initialize local ptend type
@@ -565,7 +565,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
state%rpdel , state%zm , tpert , qpert , state%phis , &
pblh , state%t , state%q , ptend_loc%s , ptend_loc%q , &
cmfmc2 , rprdsh , cmfsl , cmflq , precc , &
- qc2 , cnt2 , cnb2 , icwmr , rliq2 , &
+ qc2 , cnt2 , cnb2 , icwmr , rliq2 , &
state%pmiddry, state%pdeldry, state%rpdeldry )
case('UW') ! UW shallow convection scheme
@@ -576,7 +576,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
! Initialize local ptend type
lq(:) = .TRUE.
- call physics_ptend_init( ptend_loc, state%psetcols, 'UWSHCU', ls=.true., lu=.true., lv=.true., lq=lq )
+ call physics_ptend_init( ptend_loc, state%psetcols, 'UWSHCU', ls=.true., lu=.true., lv=.true., lq=lq )
call pbuf_get_field(pbuf, cush_idx, cush ,(/1,itim_old/), (/pcols,1/))
call pbuf_get_field(pbuf, tke_idx, tke)
@@ -587,7 +587,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call pbuf_get_field(pbuf, sh_e_ed_ratio_idx, sh_e_ed_ratio)
call compute_uwshcu_inv( pcols , pver , ncol , pcnst , ztodt , &
- state%pint, state%zi, state%pmid , state%zm , state%pdel , &
+ state%pint, state%zi, state%pmid , state%zm , state%pdel , &
state%u , state%v , state%q(:,:,1) , state%q(:,:,ixcldliq), state%q(:,:,ixcldice), &
state%t , state%s , state%q(:,:,:) , &
tke , cld , concld , pblh , cush , &
@@ -606,14 +606,14 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
! In addition, define 'icwmr' which includes both liquid and ice. !
! --------------------------------------------------------------------- !
- icwmr(:ncol,:) = iccmr_UW(:ncol,:)
+ icwmr(:ncol,:) = iccmr_UW(:ncol,:)
rprdsh(:ncol,:) = rprdsh(:ncol,:) + cmfdqs(:ncol,:)
do m = 4, pcnst
ptend_loc%q(:ncol,:pver,m) = ptend_tracer(:ncol,:pver,m)
enddo
! Conservation check
-
+
! do i = 1, ncol
! do m = 1, pcnst
! sum1 = 0._r8
@@ -626,8 +626,8 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
! pdelx = state%pdeldry(i,k)
! endif
! sum1 = sum1 + state%q(i,k,m)*pdelx
- ! sum2 = sum2 +(state%q(i,k,m)+ptend_loc%q(i,k,m)*ztodt)*pdelx
- ! sum3 = sum3 + ptend_loc%q(i,k,m)*pdelx
+ ! sum2 = sum2 +(state%q(i,k,m)+ptend_loc%q(i,k,m)*ztodt)*pdelx
+ ! sum3 = sum3 + ptend_loc%q(i,k,m)*pdelx
! enddo
! if( m .gt. 3 .and. abs(sum1) .gt. 1.e-13_r8 .and. abs(sum2-sum1)/sum1 .gt. 1.e-12_r8 ) then
!! if( m .gt. 3 .and. abs(sum3) .gt. 1.e-13_r8 ) then
@@ -671,7 +671,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
end select
- ! --------------------------------------------------------!
+ ! --------------------------------------------------------!
! Calculate fractional occurance of shallow convection !
! --------------------------------------------------------!
@@ -696,7 +696,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
! -------------------------------------------------------------- !
! 'cnt2' & 'cnb2' are from shallow, 'cnt' & 'cnb' are from deep !
- ! 'cnt2' & 'cnb2' are the interface indices of cloud top & base: !
+ ! 'cnt2' & 'cnb2' are the interface indices of cloud top & base: !
! cnt2 = float(kpen) !
! cnb2 = float(krel - 1) !
! Note that indices decreases with height. !
@@ -707,28 +707,28 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
if( cnb2(i) > cnb(i)) cnb(i) = cnb2(i)
if( cnb(i) == 1._r8 ) cnb(i) = cnt(i)
pcnt(i) = state%pmid(i,int(cnt(i)))
- pcnb(i) = state%pmid(i,int(cnb(i)))
+ pcnb(i) = state%pmid(i,int(cnb(i)))
end do
-
+
! ----------------------------------------------- !
! This quantity was previously known as CMFDQR. !
! Now CMFDQR is the shallow rain production only. !
! ----------------------------------------------- !
-
+
call pbuf_set_field(pbuf, rprdtot_idx, rprdsh(:ncol,:pver) + rprddp(:ncol,:pver), start=(/1,1/), kount=(/ncol,pver/))
-
- ! ----------------------------------------------------------------------- !
+
+ ! ----------------------------------------------------------------------- !
! Add shallow reserved cloud condensate to deep reserved cloud condensate !
! qc [ kg/kg/s] , rliq [ m/s ] !
! ----------------------------------------------------------------------- !
qc(:ncol,:pver) = qc(:ncol,:pver) + qc2(:ncol,:pver)
- rliq(:ncol) = rliq(:ncol) + rliq2(:ncol)
+ rliq(:ncol) = rliq(:ncol) + rliq2(:ncol)
! ---------------------------------------------------------------------------- !
! Output new partition of cloud condensate variables, as well as precipitation !
- ! ---------------------------------------------------------------------------- !
+ ! ---------------------------------------------------------------------------- !
if( microp_scheme == 'MG' ) then
call cnst_get_ind( 'NUMLIQ', ixnumliq )
@@ -740,9 +740,9 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 'ICWMRSH ', icwmr , pcols , lchnk )
call outfld( 'CMFDT ', ftem , pcols , lchnk )
- call outfld( 'CMFDQ ', ptend_loc%q(1,1,1) , pcols , lchnk )
- call outfld( 'CMFDICE', ptend_loc%q(1,1,ixcldice) , pcols , lchnk )
- call outfld( 'CMFDLIQ', ptend_loc%q(1,1,ixcldliq) , pcols , lchnk )
+ call outfld( 'CMFDQ ', ptend_loc%q(:,:,1) , pcols , lchnk )
+ call outfld( 'CMFDICE', ptend_loc%q(:,:,ixcldice) , pcols , lchnk )
+ call outfld( 'CMFDLIQ', ptend_loc%q(:,:,ixcldliq) , pcols , lchnk )
call outfld( 'CMFMC' , cmfmc , pcols , lchnk )
call outfld( 'QC' , qc2 , pcols , lchnk )
call outfld( 'CMFDQR' , rprdsh , pcols , lchnk )
@@ -752,12 +752,12 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 'CLDTOP' , cnt , pcols , lchnk )
call outfld( 'CLDBOT' , cnb , pcols , lchnk )
call outfld( 'PCLDTOP', pcnt , pcols , lchnk )
- call outfld( 'PCLDBOT', pcnb , pcols , lchnk )
+ call outfld( 'PCLDBOT', pcnb , pcols , lchnk )
call outfld( 'FREQSH' , freqsh , pcols , lchnk )
if( shallow_scheme .eq. 'UW' ) then
call outfld( 'CBMF' , cbmf , pcols , lchnk )
- call outfld( 'UWFLXPRC', flxprec , pcols , lchnk )
+ call outfld( 'UWFLXPRC', flxprec , pcols , lchnk )
call outfld( 'UWFLXSNW' , flxsnow , pcols , lchnk )
endif
@@ -795,8 +795,8 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 't_pre_Cu ', state1%t , pcols, lchnk )
call outfld( 'rh_pre_Cu ', ftem_preCu , pcols, lchnk )
- ! ----------------------------------------------- !
- ! Update physics state type state1 with ptend_loc !
+ ! ----------------------------------------------- !
+ ! Update physics state type state1 with ptend_loc !
! ----------------------------------------------- !
call physics_update( state1, ptend_loc, ztodt )
@@ -827,8 +827,8 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 't_aft_Cu ', state1%t , pcols, lchnk )
call outfld( 'rh_aft_Cu ', ftem , pcols, lchnk )
- tten(:ncol,:) = ( state1%t(:ncol,:pver) - t_preCu(:ncol,:) ) / ztodt
- rhten(:ncol,:) = ( ftem(:ncol,:) - ftem_preCu(:ncol,:) ) / ztodt
+ tten(:ncol,:) = ( state1%t(:ncol,:pver) - t_preCu(:ncol,:) ) / ztodt
+ rhten(:ncol,:) = ( ftem(:ncol,:) - ftem_preCu(:ncol,:) ) / ztodt
call outfld( 'tten_Cu ', tten , pcols, lchnk )
call outfld( 'rhten_Cu ', rhten , pcols, lchnk )
@@ -869,7 +869,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call zm_conv_evap( state1%ncol, state1%lchnk, &
state1%t, state1%pmid, state1%pdel, state1%q(:pcols,:pver,1), &
landfracdum, &
- ptend_loc%s, tend_s_snwprd, tend_s_snwevmlt, &
+ ptend_loc%s, tend_s_snwprd, tend_s_snwevmlt, &
ptend_loc%q(:pcols,:pver,1), &
rprdsh, cld, ztodt, &
precc, snow, ntprprd, ntsnprd , flxprec, flxsnow )
@@ -886,7 +886,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 'FZSNTCM ' , ftem , pcols, lchnk )
ftem(:ncol,:pver) = tend_s_snwevmlt(:ncol,:pver) / cpair
call outfld( 'EVSNTCM ' , ftem , pcols, lchnk )
- call outfld( 'EVAPQCM ' , ptend_loc%q(1,1,1) , pcols, lchnk )
+ call outfld( 'EVAPQCM ' , ptend_loc%q(:,:,1) , pcols, lchnk )
call outfld( 'PRECSH ' , precc , pcols, lchnk )
call outfld( 'HKFLXPRC' , flxprec , pcols, lchnk )
call outfld( 'HKFLXSNW' , flxsnow , pcols, lchnk )
@@ -894,7 +894,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , &
call outfld( 'HKNTSNPD' , ntsnprd , pcols, lchnk )
call outfld( 'HKEIHEAT' , ptend_loc%s , pcols, lchnk )
- ! ---------------------------------------------------------------- !
+ ! ---------------------------------------------------------------- !
! Add tendency from this process to tend from other processes here !
! ---------------------------------------------------------------- !
diff --git a/src/physics/cam/ndrop_bam.F90 b/src/physics/cam/ndrop_bam.F90
index 6cd8231356..a48c277b00 100644
--- a/src/physics/cam/ndrop_bam.F90
+++ b/src/physics/cam/ndrop_bam.F90
@@ -73,10 +73,10 @@ subroutine ndrop_bam_init
use phys_control, only: phys_getopts
- !-----------------------------------------------------------------------
- !
+ !-----------------------------------------------------------------------
+ !
! Initialize constants for droplet activation by bulk aerosols
- !
+ !
!-----------------------------------------------------------------------
integer :: l, m, iaer
@@ -172,7 +172,7 @@ subroutine ndrop_bam_init
! Skip aerosols that don't have a dispersion defined.
if (dispersion_aer(m) == 0._r8) cycle
-
+
alogsig(m) = log(dispersion_aer(m))
exp45logsig(m) = exp(4.5_r8*alogsig(m)*alogsig(m))
argfactor(m) = 2._r8/(3._r8*sqrt(2._r8)*alogsig(m))
@@ -316,7 +316,7 @@ subroutine ndrop_bam_run( &
smc(m) = smcrit(m) ! only for prescribed size dist
if (hygro_aer(m) > 1.e-10_r8) then ! loop only if variable size dist
- smc(m) = 2._r8*aten*sqrt(aten/(27._r8*hygro_aer(m)*amcubeloc(m)))
+ smc(m) = 2._r8*aten*sqrt(aten/(27._r8*hygro_aer(m)*amcubeloc(m)))
else
smc(m) = 100._r8
endif
@@ -397,7 +397,7 @@ subroutine ndrop_bam_ccn(lchnk, ncol, maerosol, naer2)
if (m == idxsul) then
! Lohmann treatment for sulfate has variable size distribution
do i = 1, ncol
- if (naer2(i,k,m) > 0._r8) then
+ if (naer2(i,k,m) > 0._r8) then
amcubesulfate(i) = amcubefactor(m)*maerosol(i,k,m)/(naer2(i,k,m))
smcritsulfate(i) = smcritfactor(m)/sqrt(amcubesulfate(i))
else
@@ -433,7 +433,7 @@ subroutine ndrop_bam_ccn(lchnk, ncol, maerosol, naer2)
end do ! level
do l = 1, psat
- call outfld(ccn_name(l), ccn(1,1,l), pcols, lchnk)
+ call outfld(ccn_name(l), ccn(:,:,l), pcols, lchnk)
end do
do l = 1, naer_all
@@ -489,9 +489,9 @@ subroutine maxsat(zeta, eta, nmode, smc, smax)
sum=1.e20_r8
endif
enddo
-
+
smax=1._r8/sqrt(sum)
-
+
end subroutine maxsat
!===============================================================================
diff --git a/src/physics/cam/vertical_diffusion.F90 b/src/physics/cam/vertical_diffusion.F90
index dd2cc721f3..e8d793816d 100644
--- a/src/physics/cam/vertical_diffusion.F90
+++ b/src/physics/cam/vertical_diffusion.F90
@@ -1060,9 +1060,9 @@ subroutine vertical_diffusion_tend( &
call outfld( 'slv_pre_PBL ', slv_prePBL, pcols, lchnk )
call outfld( 'u_pre_PBL ', state%u, pcols, lchnk )
call outfld( 'v_pre_PBL ', state%v, pcols, lchnk )
- call outfld( 'qv_pre_PBL ', state%q(:ncol,:,1), pcols, lchnk )
- call outfld( 'ql_pre_PBL ', state%q(:ncol,:,ixcldliq), pcols, lchnk )
- call outfld( 'qi_pre_PBL ', state%q(:ncol,:,ixcldice), pcols, lchnk )
+ call outfld( 'qv_pre_PBL ', state%q(:,:,1), pcols, lchnk )
+ call outfld( 'ql_pre_PBL ', state%q(:,:,ixcldliq), pcols, lchnk )
+ call outfld( 'qi_pre_PBL ', state%q(:,:,ixcldice), pcols, lchnk )
call outfld( 't_pre_PBL ', state%t, pcols, lchnk )
call outfld( 'rh_pre_PBL ', ftem_prePBL, pcols, lchnk )
@@ -1424,11 +1424,11 @@ subroutine vertical_diffusion_tend( &
call outfld( 'vflx_cg_PBL' , vflx_cg, pcols, lchnk )
call outfld( 'slten_PBL' , slten, pcols, lchnk )
call outfld( 'qtten_PBL' , qtten, pcols, lchnk )
- call outfld( 'uten_PBL' , ptend%u(:ncol,:), pcols, lchnk )
- call outfld( 'vten_PBL' , ptend%v(:ncol,:), pcols, lchnk )
- call outfld( 'qvten_PBL' , ptend%q(:ncol,:,1), pcols, lchnk )
- call outfld( 'qlten_PBL' , ptend%q(:ncol,:,ixcldliq), pcols, lchnk )
- call outfld( 'qiten_PBL' , ptend%q(:ncol,:,ixcldice), pcols, lchnk )
+ call outfld( 'uten_PBL' , ptend%u(:,:), pcols, lchnk )
+ call outfld( 'vten_PBL' , ptend%v(:,:), pcols, lchnk )
+ call outfld( 'qvten_PBL' , ptend%q(:,:,1), pcols, lchnk )
+ call outfld( 'qlten_PBL' , ptend%q(:,:,ixcldliq), pcols, lchnk )
+ call outfld( 'qiten_PBL' , ptend%q(:,:,ixcldice), pcols, lchnk )
call outfld( 'tten_PBL' , tten, pcols, lchnk )
call outfld( 'rhten_PBL' , rhten, pcols, lchnk )
@@ -1464,7 +1464,7 @@ subroutine vertical_diffusion_tend( &
call outfld( 'DUV' , ptend%u, pcols, lchnk )
call outfld( 'DVV' , ptend%v, pcols, lchnk )
do m = 1, pcnst
- call outfld( vdiffnam(m) , ptend%q(1,1,m), pcols, lchnk )
+ call outfld( vdiffnam(m) , ptend%q(:,:,m), pcols, lchnk )
end do
if( do_molec_diff ) then
call outfld( 'TTPXMLC' , topflx, pcols, lchnk )