Skip to content

Commit

Permalink
Merge pull request #1216 from fvitt/nitro_dep_fluxes
Browse files Browse the repository at this point in the history
cam6_4_056: Nitrogen deposition fluxes
  • Loading branch information
fvitt authored Jan 17, 2025
2 parents 7de26a3 + 4328f4e commit ea101b3
Show file tree
Hide file tree
Showing 46 changed files with 540 additions and 341 deletions.
21 changes: 13 additions & 8 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
33 changes: 26 additions & 7 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -690,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 @@ -2058,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
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
2 changes: 1 addition & 1 deletion bld/namelist_files/use_cases/hist_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
<flbc_list>'CO2','CH4','N2O','CFC11eq','CFC12'</flbc_list>

<!-- sim_year used for CO2 cycle namelist settings -->
<sim_year>1850-2000</sim_year>
<sim_year>1850-2015</sim_year>

</namelist_defaults>
3 changes: 3 additions & 0 deletions bld/namelist_files/use_cases/hist_cam_lt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@
<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>
<csw_time_type>SERIAL</csw_time_type>

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

</namelist_defaults>
3 changes: 3 additions & 0 deletions bld/namelist_files/use_cases/hist_cam_mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@
<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>
<csw_time_type>SERIAL</csw_time_type>

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

</namelist_defaults>
4 changes: 2 additions & 2 deletions bld/namelist_files/use_cases/hist_geoschem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

<prescribed_strataero_type>SERIAL</prescribed_strataero_type>

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

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand Down Expand Up @@ -163,4 +161,6 @@
'so4_a3',
</fincl1>

<sim_year>1850-2015</sim_year>

</namelist_defaults>
4 changes: 2 additions & 2 deletions bld/namelist_files/use_cases/hist_geoschem_nudged.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

<prescribed_strataero_type>SERIAL</prescribed_strataero_type>

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

<!-- nudging. this section is added over hist_geoschem.xml to match hist_trop_strat_nudged_cam6.xml -->

<Nudge_Model>.true.</Nudge_Model>
Expand Down Expand Up @@ -218,4 +216,6 @@
'so4_a3',
</fincl1>

<sim_year>1850-2015</sim_year>

</namelist_defaults>
2 changes: 0 additions & 2 deletions bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@
'so4_a2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/emissions_ssp585/emissions-cmip6-ScenarioMIP_IAMC-REMIND-MAGPIE-ssp585-1-1_so4_a2_anthro-res_surface_mol_175001-210101_0.9x1.25_c20190224.nc'
</srf_emis_specifier>

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

<!-- nudging -->
<Nudge_Model>.true.</Nudge_Model>
<Nudge_Path hgrid="0.9x1.25" nlev="32">'atm/cam/met/nudging/MERRA2_fv09_32L/'</Nudge_Path>
Expand Down
12 changes: 5 additions & 7 deletions bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>

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

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand All @@ -44,9 +42,9 @@
<history_cesm_forcing>.false.</history_cesm_forcing>
<history_scwaccm_forcing>.false.</history_scwaccm_forcing>

<!-- Monthly -->
<!-- Monthly -->
<fincl1>
'CFC11STAR', 'AODDUST', 'AODDUST02', 'T', 'U', 'V', 'O3', 'OH', 'O3S',
'CFC11STAR', 'AODDUST', 'AODDUST02', 'T', 'U', 'V', 'O3', 'OH', 'O3S',
'NO3', 'HO2', 'LNO_COL_PROD', 'NO2_CLXF', 'SFNO', 'SFNH3', 'BRO', 'CH3CL',
'CLO', 'CO2', 'HCL', 'HO2', 'HOCL', 'H2O', 'PHIS', 'Z3',
'BENZENE', 'C2H2', 'C2H4', 'C2H6', 'C3H8', 'CCL4', 'CFC11', 'CFC113',
Expand Down Expand Up @@ -85,14 +83,14 @@
'AODNIRstdn', 'AODUVstdn', 'AODdn_accum', 'AODdn_coarse', 'AODdnDUST01', 'AODdnDUST02', 'AODdnDUST03', 'AODVISstdn',
'AODUVstdn', 'AODNIRstdn', 'AODNIRstdn', 'AODVISdn', 'AODUVdn', 'EXTINCTdn', 'EXTxASYMdn', 'EXTINCTNIRdn',
'EXTINCTUVdn', 'WD_NC4CH2OH', 'WD_NC4CHO', 'WD_NDEP', 'WD_NH3', 'WD_NH4', 'WD_NHDEP',
'WD_NOA', 'WD_NTERPOOH', 'WD_ONITR', 'WD_PHENOOH', 'WD_POOH', 'WD_ROOH', 'WD_SO2',
'WD_NOA', 'WD_NTERPOOH', 'WD_ONITR', 'WD_PHENOOH', 'WD_POOH', 'WD_ROOH', 'WD_SO2',
'WD_SOAGbb0', 'WD_SOAGbb1', 'WD_SOAGbb2', 'WD_SOAGbb3', 'WD_SOAGbb4',
'WD_SOAGbg0', 'WD_SOAGbg1', 'WD_SOAGbg2', 'WD_SOAGbg3', 'WD_SOAGbg4',
'WD_SOAGff0', 'WD_SOAGff1', 'WD_SOAGff2', 'WD_SOAGff3', 'WD_SOAGff4',
'WD_SVOCbb','WD_SVOCff', 'WD_TERP2OOH', 'WD_TERPNIT', 'WD_TERPOOH',
'DF_CO', 'DF_GLYALD',
'DF_CO', 'DF_GLYALD',
'dry_deposition_NHx_as_N', 'DF_NH3', 'DF_NH4', 'DF_NO', 'DF_NO2', 'DF_NOA', 'DF_NTERPOOH', 'DF_O3',
'DF_ONITR', 'DF_PAN', 'DF_PHENOOH', 'DF_POOH', 'DF_ROOH', 'DF_SO2',
'DF_ONITR', 'DF_PAN', 'DF_PHENOOH', 'DF_POOH', 'DF_ROOH', 'DF_SO2',
'DF_SOAGbb0', 'DF_SOAGbb1', 'DF_SOAGbb2', 'DF_SOAGbb3', 'DF_SOAGbb4',
'DF_SOAGbg0', 'DF_SOAGbg1', 'DF_SOAGbg2', 'DF_SOAGbg3', 'DF_SOAGbg4', 'DF_SOAGff0', 'DF_SOAGff1', 'DF_SOAGff2', 'DF_SOAGff3', 'DF_SOAGff4',
'DF_SVOCbb','DF_SVOCff', 'DF_TERP2OOH', 'DF_TERPNIT', 'DF_TERPOOH', 'DF_TERPROD1',
Expand Down
2 changes: 0 additions & 2 deletions bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@

<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>

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

<!-- History Files -->

<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>
Expand Down
4 changes: 3 additions & 1 deletion bld/namelist_files/use_cases/sd_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@

<prescribed_strataero_type > 'SERIAL' </prescribed_strataero_type>
<prescribed_strataero_datapath> 'atm/cam/ozone_strataero' </prescribed_strataero_datapath>
<prescribed_strataero_file> 'ozone_strataero_WACCM_L70_zm5day_18500101-20150103_CMIP6ensAvg_c180923.nc' </prescribed_strataero_file>
<prescribed_strataero_file> 'ozone_strataero_WACCM_L70_zm5day_18500101-20150103_CMIP6ensAvg_c180923.nc' </prescribed_strataero_file>
<prescribed_strataero_use_chemtrop> .true. </prescribed_strataero_use_chemtrop>

<scenario_ghg > 'CHEM_LBC_FILE' </scenario_ghg>
<flbc_file>atm/waccm/lb/LBC_1750-2015_CMIP6_GlobAnnAvg_c180926.nc</flbc_file>
<flbc_type>'SERIAL'</flbc_type>
<flbc_list>'CO2','CH4','N2O','CFC11eq','CFC12'</flbc_list>

<sim_year>1850-2015</sim_year>

</namelist_defaults>
Loading

0 comments on commit ea101b3

Please sign in to comment.