Skip to content

Commit

Permalink
Merge branch 'cam_development' into RFccpp_updates_1224
Browse files Browse the repository at this point in the history
  • Loading branch information
Katetc committed Feb 4, 2025
2 parents a9c58fb + 014626a commit 5580696
Show file tree
Hide file tree
Showing 65 changed files with 1,323 additions and 591 deletions.
84 changes: 0 additions & 84 deletions CODE_OF_CONDUCT.md

This file was deleted.

29 changes: 16 additions & 13 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,6 @@ if ($phys_mode_flags > 1) {
my $simple_phys = 0;
if ($adia_mode or $ideal_mode) { $simple_phys = 1; }

# If running either a simple physics or an aquaplanet configuration, the nitrogen
# deposition data is not used. These files are set in buildnml and can't be overridden
# via user_nl_cam. So provide an override here.
if ($simple_phys or $aqua_mode) {
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_data_filename', '" "');
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_mesh_filename', '" "');
}

# Single column mode
my $scam = $cfg->get('scam');
my $scam_iop = $cfg->get('scam_iop');
Expand Down Expand Up @@ -705,6 +697,19 @@ if ($sim_year =~ /(\d+)-(\d+)/) {
$sim_year_start = $1;
}

# Setup default ndep streams only if not simple_phys or aqua_mode and
# the chemistry cannot produce the nitrogen depostion fluxes
if (!($simple_phys or $aqua_mode)) {
my $chem_nitrodep = chem_has_species($cfg, 'NO') and chem_has_species($cfg, 'NH3');
if ((!$chem_nitrodep) or ($chem =~ /geoschem/)) {
add_default($nl, 'stream_ndep_mesh_filename');
add_default($nl, 'stream_ndep_data_filename', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_first', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_last', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_align', 'sim_year'=>$sim_year);
}
}

# Topography
add_default($nl, 'use_topo_file');
my $use_topo_file = $nl->get_value('use_topo_file');
Expand Down Expand Up @@ -755,11 +760,9 @@ if ($rad_pkg =~ /rrtmg/ or $chem =~ /waccm/) {
# use solar data file as the default for rrtmg and waccm_ma
add_default($nl, 'solar_irrad_data_file');

# This option only used by camrt and rrtmg radiation schemes.
# The solar spectral scaling is done internal to RRTMGP code.
if ($rad_pkg ne 'rrtmgp') {
add_default($nl, 'solar_htng_spctrl_scl', 'val'=>'.true.');
}
# The solar spectral scaling is done based on the distribution from
# the solar_irrad_data_file.
add_default($nl, 'solar_htng_spctrl_scl', 'val'=>'.true.');

}
elsif (!$simple_phys) {
Expand Down
37 changes: 27 additions & 10 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@
<ncdata dyn="se" hgrid="ne120np4" nlev="30" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/ape_cam5_ne120np4_L30_c170419.nc</ncdata>

<ncdata dyn="se" hgrid="ne3np4" nlev="32" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_aqua_ne3pg3_mg37_L32_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="58" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_aqua_ne3pg3_mg37_L58_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="93" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/cam6_QPC6_aqua_ne3pg3_mg37_L93_01_02_01_c240518.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="32" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/ape_cam6_ne5np4_L32_c170517.nc</ncdata>
<ncdata dyn="se" hgrid="ne16np4" nlev="32" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/ape_cam6_ne16np4_L32_c170509.nc</ncdata>
<ncdata dyn="se" hgrid="ne30np4" nlev="32" aquaplanet="1" ic_ymd="101" >atm/cam/inic/se/ape_cam6_ne30np4_L32_c170509.nc</ncdata>
Expand Down Expand Up @@ -692,13 +690,13 @@
<flbc_file chem="ghg_mam4">atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc</flbc_file>

<!-- Time-variant CO2 fossil fuel emissions -->
<co2flux_fuel_file hgrid="0.9x1.25" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="1.9x2.5" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C384" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C192" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C96" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C48" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C24" sim_year="1850-2000">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="0.9x1.25" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="1.9x2.5" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C384" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C192" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C96" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C48" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>
<co2flux_fuel_file hgrid="C24" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc</co2flux_fuel_file>

<ac_CO2_emis hgrid="0.9x1.25">ac_CO2_filelist_175001-201512_fv_0.9x1.25_c20181011.txt</ac_CO2_emis>
<ac_CO2_emis hgrid="1.9x2.5" >ac_CO2_filelist_175001-201512_fv_1.9x2.5_c20181011.txt</ac_CO2_emis>
Expand Down Expand Up @@ -2060,6 +2058,25 @@
<soil_erod_file phys="cam4" >atm/cam/dst/dst_source2x2tuned-cam4-06132012.nc</soil_erod_file>
<soil_erod_file phys="cam4" hgrid="0.9x1.25">atm/cam/dst/dst_source1x1tuned-cam4-06202012.nc</soil_erod_file>

<!-- nitrogen deposition to surface models -->
<stream_ndep_mesh_filename>share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</stream_ndep_mesh_filename>

<stream_ndep_data_filename >lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc</stream_ndep_data_filename>
<stream_ndep_data_filename sim_year="1850">lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc</stream_ndep_data_filename>

<stream_ndep_year_first >2000</stream_ndep_year_first>
<stream_ndep_year_first sim_year="1850">1850</stream_ndep_year_first>
<stream_ndep_year_first sim_year="1850-2015">1850</stream_ndep_year_first>
<stream_ndep_year_first sim_year="2010">2010</stream_ndep_year_first>

<stream_ndep_year_last >2000</stream_ndep_year_last>
<stream_ndep_year_last sim_year="1850">1850</stream_ndep_year_last>
<stream_ndep_year_last sim_year="1850-2015">2015</stream_ndep_year_last>
<stream_ndep_year_last sim_year="2010">2010</stream_ndep_year_last>

<stream_ndep_year_align >1</stream_ndep_year_align>
<stream_ndep_year_align sim_year="1850-2015">1850</stream_ndep_year_align>

<!-- Turbulent Mountain Stress -->
<do_tms > .false. </do_tms>
<do_tms waccm_phys="1" phys="cam4" > .true. </do_tms>
Expand Down Expand Up @@ -2197,7 +2214,7 @@
<clubb_l_intr_sfc_flux_smooth phys="cam7" > .true. </clubb_l_intr_sfc_flux_smooth>
<clubb_l_lmm_stepping > .false. </clubb_l_lmm_stepping>
<clubb_l_lscale_plume_centered > .false. </clubb_l_lscale_plume_centered>
<clubb_l_min_wp2_from_corr_wx > .true. </clubb_l_min_wp2_from_corr_wx>
<clubb_l_min_wp2_from_corr_wx > .false. </clubb_l_min_wp2_from_corr_wx>
<clubb_l_min_xp2_from_corr_wx > .true. </clubb_l_min_xp2_from_corr_wx>
<clubb_l_mono_flux_lim_rtm > .true. </clubb_l_mono_flux_lim_rtm>
<clubb_l_mono_flux_lim_spikefix > .true. </clubb_l_mono_flux_lim_spikefix>
Expand Down
21 changes: 5 additions & 16 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7626,40 +7626,29 @@ Bubble-mediated sea-air transfer. See ocean_emis.F90 for details.
Default: FALSE
</entry>

<entry id="ndep_list" type="char*16(2)" category="Nitrogen Deposition"
group="ndep_inparm" valid_values="" >
List of nitrogen deposition fluxes to be sent from CAM to surface models.
Default: set by build-namelist.
</entry>

<entry id="stream_ndep_year_first" type="integer" category="Nitrogen Deposition"
group="ndep_stream_nl" valid_values="" >
Year first to use in nitrogen deposition stream data. Set by case xml variable
CAM_STREAM_NDEP_YEAR_FIRST
Year first to use in nitrogen deposition stream data.
</entry>

<entry id="stream_ndep_year_last" type="integer" category="Nitrogen Deposition"
group="ndep_stream_nl" valid_values="" >
Year last to use in nitrogen deposition stream data.
Set by case xml variable CAM_STREAM_NDEP_YEAR_LAST
</entry>

<entry id="stream_ndep_year_align" type="integer" category="Nitrogen Deposition"
group="ndep_stream_nl" valid_values="" >
Model year to align with CAM_STREAM_NDEP_YEAR_FIRST.
Set by case xml variable CAM_STREAM_NDEP_YEAR_ALIGN
Model year to align with stream_ndep_year_first.
</entry>

<entry id="stream_ndep_data_filename" type="char*256" input_pathname="abs" category="Nitrogen Deposition"
group="ndep_stream_nl" valid_values="" >
NDEP stream data filename.
Set by case xml variable CAM_STREAM_NDEP_DATA_FILENAME.
Nitrogen deposition stream data filename.
</entry>

<entry id="stream_ndep_mesh_filename" type="char*256" input_pathname="abs" category="Nitrogen Deposition"
group="ndep_stream_nl" valid_values="" >
NDEP mesh file corresponding to sream_ndep_data_filename.
Set by case xml variable CAM_STREAM_NDEP_MESH_FILENAME.
Grid mesh file corresponding to stream_ndep_data_filename.
</entry>

<entry id="megan_factors_file" type="char*256" input_pathname="abs" category="VOC_emissions"
Expand Down Expand Up @@ -8791,7 +8780,7 @@ Default: "."
</entry>

<entry id="sim_year" type="char*9" category="cam"
group="camexp" valid_values="1850,2000,1850-2000">
group="camexp" valid_values="1850,2000,2010,1850-2000,1850-2015">
This varible is only used internally by build-namelist to determine
appropriate defaults for climatological or transient forcing datasets.
Default: set by build-namelist.
Expand Down
3 changes: 3 additions & 0 deletions bld/namelist_files/use_cases/1850_cam_lt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@
<csw_time_type>CYCLICAL</csw_time_type>
<csw_cycle_yr>1850 </csw_cycle_yr>

<!-- for prescribed nitrogen deposition fluxes -->
<sim_year>1850</sim_year>

</namelist_defaults>
3 changes: 3 additions & 0 deletions bld/namelist_files/use_cases/1850_cam_mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@
<csw_time_type>CYCLICAL</csw_time_type>
<csw_cycle_yr>1850 </csw_cycle_yr>

<!-- for prescribed nitrogen deposition fluxes -->
<sim_year>1850</sim_year>

</namelist_defaults>
3 changes: 0 additions & 3 deletions bld/namelist_files/use_cases/2000_geoschem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<!-- The below line is not commented out in 2000_trop_strat_vbs_cam6.xml -->
<!-- <prescribed_strataero_cycle_yr>2000</prescribed_strataero_cycle_yr> -->

<!-- The below line is not commented out in 2000_trop_strat_vbs_cam6.xml -->
<!-- <ndep_list>'noy', 'nhx'</ndep_list> -->

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand Down
2 changes: 0 additions & 2 deletions bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@
<!-- HEMCO emissions -->
<hemco_emission_year>2000</hemco_emission_year>

<ndep_list>'noy', 'nhx'</ndep_list>

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand Down
3 changes: 3 additions & 0 deletions bld/namelist_files/use_cases/2010_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@
<flbc_type> 'CYCLICAL' </flbc_type>
<flbc_cycle_yr> 2010 </flbc_cycle_yr>

<!-- sim_year -->
<sim_year>2010</sim_year>

</namelist_defaults>
3 changes: 2 additions & 1 deletion bld/namelist_files/use_cases/2010_geoschem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

<!-- The below lines are not commented out in 2010_trop_strat_vbs_cam6.xml (*=many pointers) -->
<!-- <prescribed_strataero_cycle_yr>2010</prescribed_strataero_cycle_yr> -->
<!-- <ndep_list>'noy', 'nhx'</ndep_list>-->

<!-- History Files -->

Expand Down Expand Up @@ -166,4 +165,6 @@
'so4_a3',
</fincl1>

<sim_year>2010</sim_year>

</namelist_defaults>
2 changes: 0 additions & 2 deletions bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@
<!-- HEMCO emissions -->
<hemco_emission_year>2010</hemco_emission_year>

<ndep_list>'noy', 'nhx'</ndep_list>

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand Down
Loading

0 comments on commit 5580696

Please sign in to comment.