Skip to content

Commit ea101b3

Browse files
authored
Merge pull request #1216 from fvitt/nitro_dep_fluxes
cam6_4_056: Nitrogen deposition fluxes
2 parents 7de26a3 + 4328f4e commit ea101b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+540
-341
lines changed

bld/build-namelist

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,6 @@ if ($phys_mode_flags > 1) {
509509
my $simple_phys = 0;
510510
if ($adia_mode or $ideal_mode) { $simple_phys = 1; }
511511

512-
# If running either a simple physics or an aquaplanet configuration, the nitrogen
513-
# deposition data is not used. These files are set in buildnml and can't be overridden
514-
# via user_nl_cam. So provide an override here.
515-
if ($simple_phys or $aqua_mode) {
516-
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_data_filename', '" "');
517-
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_mesh_filename', '" "');
518-
}
519-
520512
# Single column mode
521513
my $scam = $cfg->get('scam');
522514
my $scam_iop = $cfg->get('scam_iop');
@@ -705,6 +697,19 @@ if ($sim_year =~ /(\d+)-(\d+)/) {
705697
$sim_year_start = $1;
706698
}
707699

700+
# Setup default ndep streams only if not simple_phys or aqua_mode and
701+
# the chemistry cannot produce the nitrogen depostion fluxes
702+
if (!($simple_phys or $aqua_mode)) {
703+
my $chem_nitrodep = chem_has_species($cfg, 'NO') and chem_has_species($cfg, 'NH3');
704+
if ((!$chem_nitrodep) or ($chem =~ /geoschem/)) {
705+
add_default($nl, 'stream_ndep_mesh_filename');
706+
add_default($nl, 'stream_ndep_data_filename', 'sim_year'=>$sim_year);
707+
add_default($nl, 'stream_ndep_year_first', 'sim_year'=>$sim_year);
708+
add_default($nl, 'stream_ndep_year_last', 'sim_year'=>$sim_year);
709+
add_default($nl, 'stream_ndep_year_align', 'sim_year'=>$sim_year);
710+
}
711+
}
712+
708713
# Topography
709714
add_default($nl, 'use_topo_file');
710715
my $use_topo_file = $nl->get_value('use_topo_file');

bld/namelist_files/namelist_defaults_cam.xml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -690,13 +690,13 @@
690690
<flbc_file chem="ghg_mam4">atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc</flbc_file>
691691

692692
<!-- Time-variant CO2 fossil fuel emissions -->
693-
<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>
694-
<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>
695-
<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>
696-
<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>
697-
<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>
698-
<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>
699-
<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>
693+
<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>
694+
<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>
695+
<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>
696+
<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>
697+
<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>
698+
<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>
699+
<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>
700700

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

2061+
<!-- nitrogen deposition to surface models -->
2062+
<stream_ndep_mesh_filename>share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</stream_ndep_mesh_filename>
2063+
2064+
<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>
2065+
<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>
2066+
2067+
<stream_ndep_year_first >2000</stream_ndep_year_first>
2068+
<stream_ndep_year_first sim_year="1850">1850</stream_ndep_year_first>
2069+
<stream_ndep_year_first sim_year="1850-2015">1850</stream_ndep_year_first>
2070+
<stream_ndep_year_first sim_year="2010">2010</stream_ndep_year_first>
2071+
2072+
<stream_ndep_year_last >2000</stream_ndep_year_last>
2073+
<stream_ndep_year_last sim_year="1850">1850</stream_ndep_year_last>
2074+
<stream_ndep_year_last sim_year="1850-2015">2015</stream_ndep_year_last>
2075+
<stream_ndep_year_last sim_year="2010">2010</stream_ndep_year_last>
2076+
2077+
<stream_ndep_year_align >1</stream_ndep_year_align>
2078+
<stream_ndep_year_align sim_year="1850-2015">1850</stream_ndep_year_align>
2079+
20612080
<!-- Turbulent Mountain Stress -->
20622081
<do_tms > .false. </do_tms>
20632082
<do_tms waccm_phys="1" phys="cam4" > .true. </do_tms>

bld/namelist_files/namelist_definition.xml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7626,40 +7626,29 @@ Bubble-mediated sea-air transfer. See ocean_emis.F90 for details.
76267626
Default: FALSE
76277627
</entry>
76287628

7629-
<entry id="ndep_list" type="char*16(2)" category="Nitrogen Deposition"
7630-
group="ndep_inparm" valid_values="" >
7631-
List of nitrogen deposition fluxes to be sent from CAM to surface models.
7632-
Default: set by build-namelist.
7633-
</entry>
7634-
76357629
<entry id="stream_ndep_year_first" type="integer" category="Nitrogen Deposition"
76367630
group="ndep_stream_nl" valid_values="" >
7637-
Year first to use in nitrogen deposition stream data. Set by case xml variable
7638-
CAM_STREAM_NDEP_YEAR_FIRST
7631+
Year first to use in nitrogen deposition stream data.
76397632
</entry>
76407633

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

76477639
<entry id="stream_ndep_year_align" type="integer" category="Nitrogen Deposition"
76487640
group="ndep_stream_nl" valid_values="" >
7649-
Model year to align with CAM_STREAM_NDEP_YEAR_FIRST.
7650-
Set by case xml variable CAM_STREAM_NDEP_YEAR_ALIGN
7641+
Model year to align with stream_ndep_year_first.
76517642
</entry>
76527643

76537644
<entry id="stream_ndep_data_filename" type="char*256" input_pathname="abs" category="Nitrogen Deposition"
76547645
group="ndep_stream_nl" valid_values="" >
7655-
NDEP stream data filename.
7656-
Set by case xml variable CAM_STREAM_NDEP_DATA_FILENAME.
7646+
Nitrogen deposition stream data filename.
76577647
</entry>
76587648

76597649
<entry id="stream_ndep_mesh_filename" type="char*256" input_pathname="abs" category="Nitrogen Deposition"
76607650
group="ndep_stream_nl" valid_values="" >
7661-
NDEP mesh file corresponding to sream_ndep_data_filename.
7662-
Set by case xml variable CAM_STREAM_NDEP_MESH_FILENAME.
7651+
Grid mesh file corresponding to stream_ndep_data_filename.
76637652
</entry>
76647653

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

87938782
<entry id="sim_year" type="char*9" category="cam"
8794-
group="camexp" valid_values="1850,2000,1850-2000">
8783+
group="camexp" valid_values="1850,2000,2010,1850-2000,1850-2015">
87958784
This varible is only used internally by build-namelist to determine
87968785
appropriate defaults for climatological or transient forcing datasets.
87978786
Default: set by build-namelist.

bld/namelist_files/use_cases/1850_cam_lt.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,7 @@
6161
<csw_time_type>CYCLICAL</csw_time_type>
6262
<csw_cycle_yr>1850 </csw_cycle_yr>
6363

64+
<!-- for prescribed nitrogen deposition fluxes -->
65+
<sim_year>1850</sim_year>
66+
6467
</namelist_defaults>

bld/namelist_files/use_cases/1850_cam_mt.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@
5656
<csw_time_type>CYCLICAL</csw_time_type>
5757
<csw_cycle_yr>1850 </csw_cycle_yr>
5858

59+
<!-- for prescribed nitrogen deposition fluxes -->
60+
<sim_year>1850</sim_year>
61+
5962
</namelist_defaults>

bld/namelist_files/use_cases/2000_geoschem.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
<!-- The below line is not commented out in 2000_trop_strat_vbs_cam6.xml -->
3737
<!-- <prescribed_strataero_cycle_yr>2000</prescribed_strataero_cycle_yr> -->
3838

39-
<!-- The below line is not commented out in 2000_trop_strat_vbs_cam6.xml -->
40-
<!-- <ndep_list>'noy', 'nhx'</ndep_list> -->
41-
4239
<!-- History Files -->
4340

4441
<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>

bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@
131131
<!-- HEMCO emissions -->
132132
<hemco_emission_year>2000</hemco_emission_year>
133133

134-
<ndep_list>'noy', 'nhx'</ndep_list>
135-
136134
<!-- History Files -->
137135

138136
<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>

bld/namelist_files/use_cases/2010_cam6.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,7 @@
8383
<flbc_type> 'CYCLICAL' </flbc_type>
8484
<flbc_cycle_yr> 2010 </flbc_cycle_yr>
8585

86+
<!-- sim_year -->
87+
<sim_year>2010</sim_year>
88+
8689
</namelist_defaults>

bld/namelist_files/use_cases/2010_geoschem.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

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

3938
<!-- History Files -->
4039

@@ -166,4 +165,6 @@
166165
'so4_a3',
167166
</fincl1>
168167

168+
<sim_year>2010</sim_year>
169+
169170
</namelist_defaults>

bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,6 @@
322322
<!-- HEMCO emissions -->
323323
<hemco_emission_year>2010</hemco_emission_year>
324324

325-
<ndep_list>'noy', 'nhx'</ndep_list>
326-
327325
<!-- History Files -->
328326

329327
<mfilt> 1,30,365,240,240,480,365,73,30 </mfilt>

0 commit comments

Comments
 (0)