From fa69b875ca03e801463b7f23a2c04bd5f9722aa2 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Wed, 11 Dec 2024 13:56:30 -0700 Subject: [PATCH 01/15] more sane way to control nitrogen deposition to surface models modified: bld/build-namelist modified: bld/namelist_files/namelist_defaults_cam.xml modified: bld/namelist_files/namelist_definition.xml modified: bld/namelist_files/use_cases/1850_cam_lt.xml modified: bld/namelist_files/use_cases/1850_cam_mt.xml modified: bld/namelist_files/use_cases/hist_cam_lt.xml modified: bld/namelist_files/use_cases/hist_cam_mt.xml modified: cime_config/buildnml modified: cime_config/config_component.xml modified: src/chemistry/mozart/chemistry.F90 modified: src/chemistry/mozart/mo_chm_diags.F90 modified: src/chemistry/pp_none/chemistry.F90 modified: src/control/camsrfexch.F90 modified: src/control/runtime_opts.F90 modified: src/cpl/nuopc/atm_import_export.F90 modified: src/cpl/nuopc/atm_stream_ndep.F90 modified: src/physics/cam/cam_diagnostics.F90 modified: src/utils/srf_field_check.F90 --- bld/build-namelist | 8 --- bld/namelist_files/namelist_defaults_cam.xml | 7 ++ bld/namelist_files/namelist_definition.xml | 19 ++--- bld/namelist_files/use_cases/1850_cam_lt.xml | 7 ++ bld/namelist_files/use_cases/1850_cam_mt.xml | 7 ++ bld/namelist_files/use_cases/hist_cam_lt.xml | 7 ++ bld/namelist_files/use_cases/hist_cam_mt.xml | 7 ++ cime_config/buildnml | 12 ---- cime_config/config_component.xml | 73 ------------------- src/chemistry/mozart/chemistry.F90 | 15 ++-- src/chemistry/mozart/mo_chm_diags.F90 | 5 ++ src/chemistry/pp_none/chemistry.F90 | 35 ++++----- src/control/camsrfexch.F90 | 30 ++++---- src/control/runtime_opts.F90 | 2 + src/cpl/nuopc/atm_import_export.F90 | 76 ++++++++------------ src/cpl/nuopc/atm_stream_ndep.F90 | 67 +++++++++-------- src/physics/cam/cam_diagnostics.F90 | 10 +++ src/utils/srf_field_check.F90 | 12 ---- 18 files changed, 170 insertions(+), 229 deletions(-) diff --git a/bld/build-namelist b/bld/build-namelist index 66c3574a62..6dd96595d9 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -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'); diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index 462570da4a..ab2707290c 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -2060,6 +2060,13 @@ atm/cam/dst/dst_source2x2tuned-cam4-06132012.nc atm/cam/dst/dst_source1x1tuned-cam4-06202012.nc + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +2000 +2000 +1 + .false. .true. diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index bd003c779a..4aaa038224 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -7609,40 +7609,29 @@ Bubble-mediated sea-air transfer. See ocean_emis.F90 for details. Default: FALSE - -List of nitrogen deposition fluxes to be sent from CAM to surface models. -Default: set by build-namelist. - - -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. Year last to use in nitrogen deposition stream data. -Set by case xml variable CAM_STREAM_NDEP_YEAR_LAST -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. -NDEP stream data filename. -Set by case xml variable CAM_STREAM_NDEP_DATA_FILENAME. +Nitrogen deposition stream data filename. -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. CYCLICAL 1850 + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +1850 +1 + diff --git a/bld/namelist_files/use_cases/1850_cam_mt.xml b/bld/namelist_files/use_cases/1850_cam_mt.xml index 5a535f27be..df05241070 100644 --- a/bld/namelist_files/use_cases/1850_cam_mt.xml +++ b/bld/namelist_files/use_cases/1850_cam_mt.xml @@ -56,4 +56,11 @@ CYCLICAL 1850 + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +1850 +1 + diff --git a/bld/namelist_files/use_cases/hist_cam_lt.xml b/bld/namelist_files/use_cases/hist_cam_lt.xml index c436b97c1f..a7cd6c0e9c 100644 --- a/bld/namelist_files/use_cases/hist_cam_lt.xml +++ b/bld/namelist_files/use_cases/hist_cam_lt.xml @@ -42,4 +42,11 @@ INTERP_MISSING_MONTHS SERIAL + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +2015 +1850 + diff --git a/bld/namelist_files/use_cases/hist_cam_mt.xml b/bld/namelist_files/use_cases/hist_cam_mt.xml index c100cc6e85..63b6691929 100644 --- a/bld/namelist_files/use_cases/hist_cam_mt.xml +++ b/bld/namelist_files/use_cases/hist_cam_mt.xml @@ -37,4 +37,11 @@ INTERP_MISSING_MONTHS SERIAL + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +2015 +1850 + diff --git a/cime_config/buildnml b/cime_config/buildnml index 9c156b66d5..674d1a29ea 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -48,12 +48,6 @@ def buildnml(case, caseroot, compname): RUN_REFTOD = case.get_value("RUN_REFTOD") COMP_INTERFACE = case.get_value("COMP_INTERFACE") - stream_ndep_year_first = case.get_value("CAM_STREAM_NDEP_YEAR_FIRST") - stream_ndep_year_last = case.get_value("CAM_STREAM_NDEP_YEAR_LAST") - stream_ndep_year_align = case.get_value("CAM_STREAM_NDEP_YEAR_ALIGN") - stream_ndep_data_filename = case.get_value("CAM_STREAM_NDEP_DATA_FILENAME") - stream_ndep_mesh_filename = case.get_value("CAM_STREAM_NDEP_MESH_FILENAME") - testsrc = os.path.join(srcroot, "components", "cam") if os.path.exists(testsrc): srcroot = testsrc @@ -173,12 +167,6 @@ def buildnml(case, caseroot, compname): buildnl_opts += ["-inputdata", input_data_list] - CAM_NAMELIST_OPTS += " stream_ndep_year_first=" + stream_ndep_year_first - CAM_NAMELIST_OPTS += " stream_ndep_year_last=" + stream_ndep_year_last - CAM_NAMELIST_OPTS += " stream_ndep_year_align=" + stream_ndep_year_align - CAM_NAMELIST_OPTS += " stream_ndep_data_filename='" + stream_ndep_data_filename.strip() + "'" - CAM_NAMELIST_OPTS += " stream_ndep_mesh_filename='" + stream_ndep_mesh_filename.strip() + "'" - buildnl_opts += ["-namelist", '" &atmexp ' + CAM_NAMELIST_OPTS + '/" '] diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 2ab0a50558..ef718404f5 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -383,79 +383,6 @@ User mods to apply to specific compset matches. - - - - char - 2000 - - 1850 - 2010 - 1850 - 2015 - - run_component_cam - env_run.xml - Nitrogen deposition data year first - - - - char - 2000 - - 2010 - 1850 - 2015 - 2101 - - run_component_cam - env_run.xml - Nitrogen deposition data year last - - - - char - 1 - - 1850 - 2015 - - run_component_cam - env_run.xml - Nitrogen deposition align CAM_STREAM_NDEP_YEAR_FIRST with this model year - - - - - char - UNSET - - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_f09_g17.CMIP6-SSP5-8.5-WACCM_1849-2101_monthly_c191007.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_f09_g17.CMIP6-SSP1-2.6-WACCM_1849-2101_monthly_c191007.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_f09_g17.CMIP6-SSP2-4.5-WACCM_1849-2101_monthly_c191007.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.002_1849-2101_monthly_0.9x1.25_c211216.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc - $DIN_LOC_ROOT/lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc - - run_component_cam - env_run.xml - Nitrogen deposition data filename - - - - char - $DIN_LOC_ROOT/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc - run_component_cam - env_run.xml - Nitrogen deposition mesh filename (corresponding to the CAM_STREAM_NDEP_DATA_FILENAME) - - ========================================= CAM naming conventions diff --git a/src/chemistry/mozart/chemistry.F90 b/src/chemistry/mozart/chemistry.F90 index 085bd2237b..6527b0ccc1 100644 --- a/src/chemistry/mozart/chemistry.F90 +++ b/src/chemistry/mozart/chemistry.F90 @@ -24,6 +24,7 @@ module chemistry use ref_pres, only : ptop_ref use phys_control, only : waccmx_is ! WACCM-X switch query function use phys_control, only : use_hemco ! HEMCO switch logical + use mo_chm_diags, only : chem_has_ndep_flx => chm_prod_ndep_flx implicit none private @@ -46,6 +47,7 @@ module chemistry public :: chem_read_restart public :: chem_init_restart public :: chem_emissions + public :: chem_has_ndep_flx integer, public :: imozart = -1 ! index of 1st constituent @@ -1147,6 +1149,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o) use mo_neu_wetdep, only : neu_wetdep_tend use aerodep_flx, only : aerodep_flx_prescribed use short_lived_species, only : short_lived_species_writeic + use atm_stream_ndep, only : ndep_stream_active implicit none @@ -1265,11 +1268,13 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o) cam_out%precc, cam_out%precl, cam_in%snowhland, ghg_chem, state%latmapback, & drydepflx, wetdepflx, cam_in%cflx, cam_in%fireflx, cam_in%fireztop, & nhx_nitrogen_flx, noy_nitrogen_flx, use_hemco, ptend%q, pbuf ) - if (associated(cam_out%nhx_nitrogen_flx)) then - cam_out%nhx_nitrogen_flx(:ncol) = nhx_nitrogen_flx(:ncol) - endif - if (associated(cam_out%noy_nitrogen_flx)) then - cam_out%noy_nitrogen_flx(:ncol) = noy_nitrogen_flx(:ncol) + if (.not.ndep_stream_active) then + if (associated(cam_out%nhx_nitrogen_flx)) then + cam_out%nhx_nitrogen_flx(:ncol) = nhx_nitrogen_flx(:ncol) + endif + if (associated(cam_out%noy_nitrogen_flx)) then + cam_out%noy_nitrogen_flx(:ncol) = noy_nitrogen_flx(:ncol) + endif endif call t_stopf( 'chemdr' ) diff --git a/src/chemistry/mozart/mo_chm_diags.F90 b/src/chemistry/mozart/mo_chm_diags.F90 index 5650403fee..1a11b2b39d 100644 --- a/src/chemistry/mozart/mo_chm_diags.F90 +++ b/src/chemistry/mozart/mo_chm_diags.F90 @@ -18,6 +18,7 @@ module mo_chm_diags public :: chm_diags_inti public :: chm_diags public :: het_diags + public :: chm_prod_ndep_flx integer :: id_n,id_no,id_no2,id_no3,id_n2o5,id_hno3,id_ho2no2,id_clono2,id_brono2 integer :: id_isopfdn, id_isopfdnc, id_terpfdn !these are dinitrates @@ -55,6 +56,8 @@ module mo_chm_diags real(r8), parameter :: N_molwgt = 14.00674_r8 real(r8), parameter :: S_molwgt = 32.066_r8 + logical, protected :: chm_prod_ndep_flx =.false. + contains subroutine chm_diags_inti @@ -330,6 +333,8 @@ subroutine chm_diags_inti toth_species = (/ id_ch4, id_h2o, id_h2 /) + chm_prod_ndep_flx = any(noy_species>0) .or. any(nhx_species>0) + call addfld( 'NOX', (/ 'lev' /), 'A', 'mol/mol', 'nox (N+NO+NO2)' ) call addfld( 'NOY', (/ 'lev' /), 'A', 'mol/mol', & 'noy = total nitrogen (N+NO+NO2+NO3+2N2O5+HNO3+HO2NO2+ORGNOY+NH4NO3)' ) diff --git a/src/chemistry/pp_none/chemistry.F90 b/src/chemistry/pp_none/chemistry.F90 index 7e67fadb6e..9da9aa0852 100644 --- a/src/chemistry/pp_none/chemistry.F90 +++ b/src/chemistry/pp_none/chemistry.F90 @@ -7,7 +7,7 @@ module chemistry use shr_kind_mod, only: r8 => shr_kind_r8 use physics_types, only: physics_state, physics_ptend use ppgrid, only: begchunk, endchunk, pcols - + implicit none private @@ -27,9 +27,10 @@ module chemistry public :: chem_write_restart public :: chem_read_restart public :: chem_init_restart - public :: chem_readnl ! read chem namelist + public :: chem_readnl ! read chem namelist public :: chem_reset_fluxes public :: chem_emissions + public :: chem_has_ndep_flx interface chem_write_restart module procedure chem_write_restart_bin @@ -40,6 +41,8 @@ module chemistry module procedure chem_read_restart_pio end interface + logical, parameter :: chem_has_ndep_flx = .false. + ! Private data !================================================================================================ @@ -61,10 +64,10 @@ end function chem_is subroutine chem_register use aero_model, only : aero_model_register - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: register advected constituents for parameterized greenhouse gas chemistry - ! + ! !----------------------------------------------------------------------- ! for prescribed aerosols @@ -95,12 +98,12 @@ end function chem_is_active !================================================================================================ function chem_implements_cnst(name) - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: return true if specified constituent is implemented by this package - ! + ! ! Author: B. Eaton - ! + ! !----------------------------------------------------------------------- implicit none !-----------------------------Arguments--------------------------------- @@ -115,11 +118,11 @@ end function chem_implements_cnst !=============================================================================== subroutine chem_init(phys_state, pbuf2d) - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: initialize parameterized greenhouse gas chemistry ! (declare history variables) - ! + ! !----------------------------------------------------------------------- use physics_buffer, only : physics_buffer_desc use aero_model, only : aero_model_init @@ -138,7 +141,7 @@ subroutine chem_timestep_init(phys_state, pbuf2d) use physics_buffer, only : physics_buffer_desc use time_manager, only: get_curr_date, get_perp_date, get_curr_calday, & is_perpetual - type(physics_state), intent(in):: phys_state(begchunk:endchunk) + type(physics_state), intent(in):: phys_state(begchunk:endchunk) type(physics_buffer_desc), pointer :: pbuf2d(:,:) @@ -162,7 +165,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o) type(cam_out_t), intent(in) :: cam_out type(physics_buffer_desc), pointer :: pbuf(:) real(r8), optional, intent(out) :: fh2o(pcols) ! h2o flux to balance source from chemistry - + return end subroutine chem_timestep_tend @@ -215,7 +218,7 @@ subroutine chem_init_restart(File) end subroutine chem_init_restart !================================================================================ subroutine chem_reset_fluxes( fptr, cam_in ) - use camsrfexch, only : cam_in_t + use camsrfexch, only : cam_in_t real(r8), pointer :: fptr(:,:) ! pointer into array data type(cam_in_t), intent(inout) :: cam_in(begchunk:endchunk) @@ -223,7 +226,7 @@ subroutine chem_reset_fluxes( fptr, cam_in ) end subroutine chem_reset_fluxes !================================================================================ subroutine chem_emissions( state, cam_in, pbuf ) - use camsrfexch, only: cam_in_t + use camsrfexch, only: cam_in_t use physics_buffer, only: physics_buffer_desc ! Arguments: diff --git a/src/control/camsrfexch.F90 b/src/control/camsrfexch.F90 index 0357ba3128..8111785cd1 100644 --- a/src/control/camsrfexch.F90 +++ b/src/control/camsrfexch.F90 @@ -9,14 +9,12 @@ module camsrfexch use constituents, only: pcnst use ppgrid, only: pcols, begchunk, endchunk use phys_grid, only: get_ncols_p, phys_grid_initialized - use infnan, only: posinf, assignment(=) + use infnan, only: nan, posinf, assignment(=) use cam_abortutils, only: endrun use cam_logfile, only: iulog use srf_field_check, only: active_Sl_ram1, active_Sl_fv, active_Sl_soilw, & - active_Fall_flxdst1, active_Fall_flxvoc, active_Fall_flxfire, & - active_Faxa_nhx, active_Faxa_noy - - + active_Fall_flxdst1, active_Fall_flxvoc, active_Fall_flxfire + use cam_control_mod, only: aqua_planet, simple_phys implicit none private @@ -100,7 +98,7 @@ module camsrfexch real(r8) :: tref(pcols) ! ref height surface air temp real(r8) :: qref(pcols) ! ref height specific humidity real(r8) :: u10(pcols) ! 10m wind speed - real(r8) :: ugustOut(pcols) ! gustiness added + real(r8) :: ugustOut(pcols) ! gustiness added real(r8) :: u10withGusts(pcols) ! 10m wind speed with gusts added real(r8) :: ts(pcols) ! merged surface temp real(r8) :: sst(pcols) ! sea surface temp @@ -325,14 +323,20 @@ subroutine atm2hub_alloc( cam_out ) cam_out(c)%dstwet4(:) = 0._r8 nullify(cam_out(c)%nhx_nitrogen_flx) - allocate (cam_out(c)%nhx_nitrogen_flx(pcols), stat=ierror) - if ( ierror /= 0 ) call endrun(sub//': allocation error nhx_nitrogen_flx') - cam_out(c)%nhx_nitrogen_flx(:) = 0._r8 - nullify(cam_out(c)%noy_nitrogen_flx) - allocate (cam_out(c)%noy_nitrogen_flx(pcols), stat=ierror) - if ( ierror /= 0 ) call endrun(sub//': allocation error noy_nitrogen_flx') - cam_out(c)%noy_nitrogen_flx(:) = 0._r8 + + if (.not.(simple_phys .or. aqua_planet)) then + + allocate (cam_out(c)%nhx_nitrogen_flx(pcols), stat=ierror) + if ( ierror /= 0 ) call endrun(sub//': allocation error nhx_nitrogen_flx') + cam_out(c)%nhx_nitrogen_flx(:) = nan + + allocate (cam_out(c)%noy_nitrogen_flx(pcols), stat=ierror) + if ( ierror /= 0 ) call endrun(sub//': allocation error noy_nitrogen_flx') + cam_out(c)%noy_nitrogen_flx(:) = nan + + endif + end do end subroutine atm2hub_alloc diff --git a/src/control/runtime_opts.F90 b/src/control/runtime_opts.F90 index 915664cdb9..f7bc2a40ff 100644 --- a/src/control/runtime_opts.F90 +++ b/src/control/runtime_opts.F90 @@ -102,6 +102,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon) use cam_budget, only: cam_budget_readnl use phys_grid_ctem, only: phys_grid_ctem_readnl use mo_lightning, only: lightning_readnl + use atm_stream_ndep, only: stream_ndep_readnl !---------------------------Arguments----------------------------------- @@ -205,6 +206,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon) call hemco_readnl(nlfilename) call cam_budget_readnl(nlfilename) call phys_grid_ctem_readnl(nlfilename) + call stream_ndep_readnl(nlfilename) end subroutine read_namelist diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index b3e16bee8c..b5b56b8112 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -22,10 +22,10 @@ module atm_import_export use srf_field_check , only : set_active_Fall_flxfire use srf_field_check , only : set_active_Fall_fco2_lnd use srf_field_check , only : set_active_Faoo_fco2_ocn - use srf_field_check , only : set_active_Faxa_nhx - use srf_field_check , only : set_active_Faxa_noy - use srf_field_check , only : active_Faxa_nhx, active_Faxa_noy - use atm_stream_ndep , only : stream_ndep_init, stream_ndep_interp, stream_ndep_is_initialized, use_ndep_stream + use atm_stream_ndep , only : stream_ndep_init, stream_ndep_interp, stream_ndep_is_initialized + use atm_stream_ndep , only : ndep_stream_active + use chemistry , only : chem_has_ndep_flx + use cam_control_mod , only : aqua_planet, simple_phys implicit none private ! except @@ -60,7 +60,6 @@ module atm_import_export integer :: drydep_nflds = -huge(1) ! number of dry deposition velocity fields lnd-> atm integer :: megan_nflds = -huge(1) ! number of MEGAN voc fields from lnd-> atm integer :: emis_nflds = -huge(1) ! number of fire emission fields from lnd-> atm - integer, public :: ndep_nflds = -huge(1) ! number of nitrogen deposition fields from atm->lnd/ocn logical :: atm_provides_lightning = .false. ! cld to grnd lightning flash freq (min-1) character(*),parameter :: F01 = "('(cam_import_export) ',a,i8,2x,i8,2x,d21.14)" character(*),parameter :: F02 = "('(cam_import_export) ',a,i8,2x,i8,2x,i8,2x,d21.14)" @@ -79,13 +78,11 @@ subroutine read_surface_fields_namelists() use shr_megan_mod , only : shr_megan_readnl use shr_fire_emis_mod , only : shr_fire_emis_readnl use shr_carma_mod , only : shr_carma_readnl - use shr_ndep_mod , only : shr_ndep_readnl use shr_lightning_coupling_mod, only : shr_lightning_coupling_readnl character(len=*), parameter :: nl_file_name = 'drv_flds_in' ! read mediator fields options - call shr_ndep_readnl(nl_file_name, ndep_nflds) call shr_drydep_readnl(nl_file_name, drydep_nflds) call shr_megan_readnl(nl_file_name, megan_nflds) call shr_fire_emis_readnl(nl_file_name, emis_nflds) @@ -194,16 +191,7 @@ subroutine advertise_fields(gcomp, flds_scalar_name, rc) call fldlist_add(fldsFrAtm_num, fldsFrAtm, 'Sa_co2diag' ) end if - if (ndep_nflds > 0) then - ! The following is when CAM/WACCM computes ndep - call set_active_Faxa_nhx(.true.) - call set_active_Faxa_noy(.true.) - else - ! The following is used for reading in stream data, or for aquaplanet or simple model - ! cases where the ndep fluxes are not used. - call set_active_Faxa_nhx(.false.) - call set_active_Faxa_noy(.false.) - end if + ! Nitrogen deposition fluxes ! Assume that 2 fields are always sent as part of Faxa_ndep call fldlist_add(fldsFrAtm_num, fldsFrAtm, 'Faxa_ndep', ungridded_lbound=1, ungridded_ubound=2) @@ -1121,10 +1109,8 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) call state_getfldptr(exportState, 'Faxa_ndep', fldptr2d=fldptr_ndep, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - if (.not. active_Faxa_nhx .and. .not. active_Faxa_noy) then - ! ndep fields not active (i.e., not computed by WACCM). Either they are not needed, - ! or they are obtained from the ndep input stream. + if (.not. (simple_phys .or. aqua_planet)) then ! The ndep_stream_nl namelist group is read in stream_ndep_init. This sets whether ! or not the stream will be used. @@ -1134,45 +1120,43 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) stream_ndep_is_initialized = .true. end if - if (use_ndep_stream) then + if (ndep_stream_active.or.chem_has_ndep_flx) then + ! Nitrogen dep fluxes are obtained from the ndep input stream if input data is available + ! otherwise computed by chemistry + if (ndep_stream_active) then + + ! get ndep fluxes from the stream + call stream_ndep_interp(cam_out, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + ! NDEP read from forcing is expected to be in units of gN/m2/sec - but the mediator + ! expects units of kgN/m2/sec + scale_ndep = .001_r8 + + else if (chem_has_ndep_flx) then - ! get ndep fluxes from the stream - call stream_ndep_interp(cam_out, rc) - if (ChkErr(rc,__LINE__,u_FILE_u)) return - ! NDEP read from forcing is expected to be in units of gN/m2/sec - but the mediator - ! expects units of kgN/m2/sec - scale_ndep = .001_r8 + ! Assume chemistry computes ndep fluxes, then its in units of kgN/m2/s - and the mediator expects + ! units of kgN/m2/sec, so the following conversion needs to happen + scale_ndep = 1._r8 - else + end if - ! ndep fluxes not used. Set to zero. + g = 1 do c = begchunk,endchunk do i = 1,get_ncols_p(c) - cam_out(c)%nhx_nitrogen_flx(i) = 0._r8 - cam_out(c)%noy_nitrogen_flx(i) = 0._r8 + fldptr_ndep(1,g) = cam_out(c)%nhx_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) + fldptr_ndep(2,g) = cam_out(c)%noy_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) + g = g + 1 end do end do - scale_ndep = 1._r8 - end if + else - else + fldptr_ndep(:,:) = 0._r8 - ! If waccm computes ndep, then its in units of kgN/m2/s - and the mediator expects - ! units of kgN/m2/sec, so the following conversion needs to happen - scale_ndep = 1._r8 + end if end if - g = 1 - do c = begchunk,endchunk - do i = 1,get_ncols_p(c) - fldptr_ndep(1,g) = cam_out(c)%nhx_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) - fldptr_ndep(2,g) = cam_out(c)%noy_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) - g = g + 1 - end do - end do - end subroutine export_fields !=============================================================================== diff --git a/src/cpl/nuopc/atm_stream_ndep.F90 b/src/cpl/nuopc/atm_stream_ndep.F90 index a393b27f05..eed6ac619e 100644 --- a/src/cpl/nuopc/atm_stream_ndep.F90 +++ b/src/cpl/nuopc/atm_stream_ndep.F90 @@ -21,52 +21,46 @@ module atm_stream_ndep implicit none private + public :: stream_ndep_readnl ! read runtime options public :: stream_ndep_init ! position datasets for dynamic ndep public :: stream_ndep_interp ! interpolates between two years of ndep file data private :: stream_ndep_check_units ! Check the units and make sure they can be used ! The ndep stream is not needed for aquaplanet or simple model configurations. It - ! is disabled by setting the namelist variable stream_ndep_data_filename to blank. - logical, public, protected :: use_ndep_stream = .true. + ! is disabled by setting the namelist variable stream_ndep_data_filename to 'UNSET' or empty string. + logical, public, protected :: ndep_stream_active = .false. type(shr_strdata_type) :: sdat_ndep ! input data stream logical, public :: stream_ndep_is_initialized = .false. character(len=CS) :: stream_varlist_ndep(2) type(ESMF_Clock) :: model_clock - character(len=*), parameter :: sourcefile = & - __FILE__ + character(len=*), parameter :: sourcefile = __FILE__ + + character(len=CL) :: stream_ndep_data_filename + character(len=CL) :: stream_ndep_mesh_filename + integer :: stream_ndep_year_first ! first year in stream to use + integer :: stream_ndep_year_last ! last year in stream to use + integer :: stream_ndep_year_align ! align stream_year_firstndep with !============================================================================== contains !============================================================================== - subroutine stream_ndep_init(model_mesh, model_clock, rc) - ! - ! Initialize data stream information. + subroutine stream_ndep_readnl(nlfile) ! Uses: - use cam_instance , only: inst_suffix - use shr_nl_mod , only: shr_nl_find_group_name - use dshr_strdata_mod , only: shr_strdata_init_from_inline + use shr_nl_mod, only: shr_nl_find_group_name ! input/output variables - type(ESMF_CLock), intent(in) :: model_clock - type(ESMF_Mesh) , intent(in) :: model_mesh - integer , intent(out) :: rc + character(len=*), intent(in) :: nlfile ! local variables integer :: nu_nml ! unit for namelist file integer :: nml_error ! namelist i/o error flag - character(len=CL) :: stream_ndep_data_filename - character(len=CL) :: stream_ndep_mesh_filename - character(len=CL) :: filein ! atm namelist file - integer :: stream_ndep_year_first ! first year in stream to use - integer :: stream_ndep_year_last ! last year in stream to use - integer :: stream_ndep_year_align ! align stream_year_firstndep with integer :: ierr - character(*), parameter :: subName = "('stream_ndep_init')" + character(*), parameter :: subName = "('stream_ndep_readnl')" !----------------------------------------------------------------------- namelist /ndep_stream_nl/ & @@ -76,8 +70,6 @@ subroutine stream_ndep_init(model_mesh, model_clock, rc) stream_ndep_year_last, & stream_ndep_year_align - rc = ESMF_SUCCESS - ! Default values for namelist stream_ndep_data_filename = ' ' stream_ndep_mesh_filename = ' ' @@ -90,10 +82,9 @@ subroutine stream_ndep_init(model_mesh, model_clock, rc) ! Read ndep_stream namelist if (masterproc) then - filein = "atm_in" // trim(inst_suffix) - open( newunit=nu_nml, file=trim(filein), status='old', iostat=nml_error ) + open( newunit=nu_nml, file=trim(nlfile), status='old', iostat=nml_error ) if (nml_error /= 0) then - call endrun(subName//': ERROR opening '//trim(filein)//errMsg(sourcefile, __LINE__)) + call endrun(subName//': ERROR opening '//trim(nlfile)//errMsg(sourcefile, __LINE__)) end if call shr_nl_find_group_name(nu_nml, 'ndep_stream_nl', status=nml_error) if (nml_error == 0) then @@ -101,8 +92,6 @@ subroutine stream_ndep_init(model_mesh, model_clock, rc) if (nml_error /= 0) then call endrun(' ERROR reading ndep_stream_nl namelist'//errMsg(sourcefile, __LINE__)) end if - else - call endrun(' ERROR finding ndep_stream_nl namelist'//errMsg(sourcefile, __LINE__)) end if close(nu_nml) endif @@ -117,9 +106,10 @@ subroutine stream_ndep_init(model_mesh, model_clock, rc) call mpi_bcast(stream_ndep_year_align, 1, mpi_integer, 0, mpicom, ierr) if (ierr /= 0) call endrun(trim(subname)//": FATAL: mpi_bcast: stream_ndep_year_align") + ndep_stream_active = len_trim(stream_ndep_data_filename)>0 .and. stream_ndep_data_filename/='UNSET' + ! Check whether the stream is being used. - if (stream_ndep_data_filename == ' '.or.stream_ndep_data_filename == 'UNSET') then - use_ndep_stream = .false. + if (.not.ndep_stream_active) then if (masterproc) then write(iulog,'(a)') ' ' write(iulog,'(a)') 'NDEP STREAM IS NOT USED.' @@ -140,6 +130,25 @@ subroutine stream_ndep_init(model_mesh, model_clock, rc) write(iulog,'(a)' ) ' ' endif + end subroutine stream_ndep_readnl + + subroutine stream_ndep_init(model_mesh, model_clock, rc) + use dshr_strdata_mod, only: shr_strdata_init_from_inline + + ! input/output variables + type(ESMF_CLock), intent(in) :: model_clock + type(ESMF_Mesh) , intent(in) :: model_mesh + integer , intent(out) :: rc + + ! local variables + character(*), parameter :: subName = "('stream_ndep_init')" + + rc = ESMF_SUCCESS + if (.not.ndep_stream_active) then + return + end if + ! + ! Initialize data stream information. ! Read in units call stream_ndep_check_units(stream_ndep_data_filename) diff --git a/src/physics/cam/cam_diagnostics.F90 b/src/physics/cam/cam_diagnostics.F90 index 97dad2ba01..3a01d9536e 100644 --- a/src/physics/cam/cam_diagnostics.F90 +++ b/src/physics/cam/cam_diagnostics.F90 @@ -568,6 +568,9 @@ subroutine diag_init_moist(pbuf2d) call addfld('a2x_DSTWET4', horiz_only, 'A', 'kg/m2/s', 'wetdep of dust (bin4)') call addfld('a2x_DSTDRY4', horiz_only, 'A', 'kg/m2/s', 'drydep of dust (bin4)') + call addfld('a2x_NOYDEP', horiz_only, 'A', 'kg/m2/s', 'NOy Deposition Flux') + call addfld('a2x_NHXDEP', horiz_only, 'A', 'kg/m2/s', 'NHx Deposition Flux') + ! defaults if (history_amwg) then call add_default (cnst_name(1), 1, ' ') @@ -1903,6 +1906,13 @@ subroutine diag_export(cam_out) call outfld('a2x_DSTDRY4', cam_out%dstdry4, pcols, lchnk) end if + if (associated(cam_out%nhx_nitrogen_flx)) then + call outfld('a2x_NHXDEP', cam_out%nhx_nitrogen_flx, pcols, lchnk) + end if + if (associated(cam_out%noy_nitrogen_flx)) then + call outfld('a2x_NOYDEP', cam_out%noy_nitrogen_flx, pcols, lchnk) + end if + end subroutine diag_export !####################################################################### diff --git a/src/utils/srf_field_check.F90 b/src/utils/srf_field_check.F90 index d1c0adfbca..a0aa0cb0f5 100644 --- a/src/utils/srf_field_check.F90 +++ b/src/utils/srf_field_check.F90 @@ -29,8 +29,6 @@ module srf_field_check public :: set_active_Fall_flxfire public :: set_active_Fall_fco2_lnd public :: set_active_Faoo_fco2_ocn - public :: set_active_Faxa_nhx - public :: set_active_Faxa_noy !=============================================================================== contains @@ -76,14 +74,4 @@ subroutine set_active_Faoo_fco2_ocn(is_active) active_Faoo_fco2_ocn = is_active end subroutine set_active_Faoo_fco2_ocn - subroutine set_active_Faxa_nhx(is_active) - logical, intent(in) :: is_active - active_Faxa_nhx = is_active - end subroutine set_active_Faxa_nhx - - subroutine set_active_Faxa_noy(is_active) - logical, intent(in) :: is_active - active_Faxa_noy = is_active - end subroutine set_active_Faxa_noy - end module srf_field_check From b70cfeaf6a2e6aa3511cc469a53d8de080b112c3 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 19 Dec 2024 13:24:28 -0700 Subject: [PATCH 02/15] fix some issues in derecho regression tests modified: bld/build-namelist modified: bld/namelist_files/namelist_defaults_cam.xml modified: bld/namelist_files/namelist_definition.xml modified: bld/namelist_files/use_cases/2010_cam6.xml modified: bld/namelist_files/use_cases/sd_cam6.xml modified: bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml modified: src/chemistry/geoschem/chemistry.F90 modified: src/chemistry/pp_terminator/chemistry.F90 modified: src/control/camsrfexch.F90 --- bld/build-namelist | 13 +++++ bld/namelist_files/namelist_defaults_cam.xml | 3 ++ bld/namelist_files/namelist_definition.xml | 6 +++ bld/namelist_files/use_cases/2010_cam6.xml | 4 ++ bld/namelist_files/use_cases/sd_cam6.xml | 6 ++- .../use_cases/waccm_sc_1850_cam6.xml | 7 +++ src/chemistry/geoschem/chemistry.F90 | 31 ++++++------ src/chemistry/pp_terminator/chemistry.F90 | 49 ++++++++++--------- src/control/camsrfexch.F90 | 6 +-- 9 files changed, 84 insertions(+), 41 deletions(-) diff --git a/bld/build-namelist b/bld/build-namelist index 6dd96595d9..22be75b310 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -509,6 +509,19 @@ if ($phys_mode_flags > 1) { my $simple_phys = 0; if ($adia_mode or $ideal_mode) { $simple_phys = 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) { + add_default($nl, 'stream_ndep_data_filename'); + add_default($nl, 'stream_ndep_mesh_filename'); + add_default($nl, 'stream_ndep_year_first'); + add_default($nl, 'stream_ndep_year_last'); + add_default($nl, 'stream_ndep_year_align'); + } +} + # Single column mode my $scam = $cfg->get('scam'); my $scam_iop = $cfg->get('scam_iop'); diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index ab2707290c..501047a1bc 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -2063,6 +2063,9 @@ lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +2015 +1850 2000 2000 1 diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index 4aaa038224..185edfa81e 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -7609,6 +7609,12 @@ Bubble-mediated sea-air transfer. See ocean_emis.F90 for details. Default: FALSE + +List of nitrogen deposition fluxes to be sent from CAM to surface models. +Default: set by build-namelist. + + Year first to use in nitrogen deposition stream data. diff --git a/bld/namelist_files/use_cases/2010_cam6.xml b/bld/namelist_files/use_cases/2010_cam6.xml index 239f5436f6..d392d2b76e 100644 --- a/bld/namelist_files/use_cases/2010_cam6.xml +++ b/bld/namelist_files/use_cases/2010_cam6.xml @@ -83,4 +83,8 @@ 'CYCLICAL' 2010 +2010 +2010 +1 + diff --git a/bld/namelist_files/use_cases/sd_cam6.xml b/bld/namelist_files/use_cases/sd_cam6.xml index 146268c62b..9a89255e88 100644 --- a/bld/namelist_files/use_cases/sd_cam6.xml +++ b/bld/namelist_files/use_cases/sd_cam6.xml @@ -28,7 +28,7 @@ 'SERIAL' 'atm/cam/ozone_strataero' - 'ozone_strataero_WACCM_L70_zm5day_18500101-20150103_CMIP6ensAvg_c180923.nc' + 'ozone_strataero_WACCM_L70_zm5day_18500101-20150103_CMIP6ensAvg_c180923.nc' .true. 'CHEM_LBC_FILE' @@ -36,4 +36,8 @@ 'SERIAL' 'CO2','CH4','N2O','CFC11eq','CFC12' + 1850 + 2015 + 1850 + diff --git a/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml b/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml index dbc6b0921b..691150a417 100644 --- a/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml @@ -88,4 +88,11 @@ 'UTEND4', 'UTEND5', 'FRONTGF', 'FRONTGFA', 'EKGW', 'QNO', 'QRLNLTE', 'QRL_TOT', 'DUV', 'DVV', 'TTPXMLC' + +lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc +share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc +1850 +1850 +1 + diff --git a/src/chemistry/geoschem/chemistry.F90 b/src/chemistry/geoschem/chemistry.F90 index fbb99e4b8f..e46bda2c4e 100644 --- a/src/chemistry/geoschem/chemistry.F90 +++ b/src/chemistry/geoschem/chemistry.F90 @@ -22,7 +22,7 @@ module chemistry #if defined( MODAL_AERO ) use modal_aero_data, only : ntot_amode #endif - + ! GEOS-Chem derived types USE DiagList_Mod, ONLY : DgnList ! Diagnostics list object use GeosChem_History_Mod, ONLY : HistoryConfigObj ! History diagnostic object @@ -59,6 +59,7 @@ module chemistry public :: chem_readnl ! read chem namelist public :: chem_emissions public :: chem_timestep_init + public :: chem_has_ndep_flx ! ! Private routines: @@ -166,6 +167,8 @@ module chemistry ! For dry deposition character(len=shr_kind_cl) :: depvel_lnd_file = 'depvel_lnd_file' + ! for nitrogen deposition fluxes to surface models + logical, parameter :: chem_has_ndep_flx = .false. contains @@ -515,11 +518,11 @@ subroutine chem_register CALL cnst_get_ind('Q', cQ, abort=.True.) CALL cnst_get_ind('H2O', cH2O, abort=.True.) CALL cnst_get_ind('H2SO4', cH2SO4, abort=.True.) - + !------------------------------------------------------------ ! Get mapping between dry deposition species and species set !------------------------------------------------------------ - + nIgnored = 0 if (debug .and. masterproc) write(iulog,'(a,i4,a)') 'chem_register: looping over gas dry deposition list with ', nddvels, ' species' @@ -831,7 +834,7 @@ subroutine chem_readnl(nlfile) ! Now go through the KPP mechanism and add any species not ! implemented by the tracer list in geoschem_config.yml !---------------------------------------------------------- - + IF ( nSpec > nSlsMax ) THEN CALL ENDRUN('chem_readnl: too many species - increase nSlsmax') ENDIF @@ -1022,7 +1025,7 @@ subroutine chem_init(phys_state, pbuf2d) use Time_Mod, only : Accept_External_Date_Time use Ucx_Mod, only : Init_Ucx use Unitconv_Mod, only : MOLES_SPECIES_PER_MOLES_DRY_AIR - use Vdiff_Mod, only : Max_PblHt_For_Vdiff + use Vdiff_Mod, only : Max_PblHt_For_Vdiff TYPE(physics_state), INTENT(IN ) :: phys_state(BEGCHUNK:ENDCHUNK) TYPE(physics_buffer_desc), POINTER, INTENT(INOUT) :: pbuf2d(:,:) @@ -1143,7 +1146,7 @@ subroutine chem_init(phys_state, pbuf2d) ! on State_Grid(BEGCHUNK). ! To go around this, we define all of GEOS-Chem arrays with ! size PCOLS x PVER, which is the largest possible number of - ! grid cells. + ! grid cells. CALL Init_State_Grid( Input_Opt = Input_Opt, & State_Grid = maxGrid, & RC = RC ) @@ -1484,7 +1487,7 @@ subroutine chem_init(phys_state, pbuf2d) ! Init_Drydep ! Thibaud M. Fritz - 04 Mar 2020 !---------------------------------------------------------- - + ALLOCATE(map2GC_dryDep(nddvels), STAT=IERR) IF ( IERR .NE. 0 ) CALL ENDRUN('Failed to allocate map2GC_dryDep') @@ -1754,7 +1757,7 @@ subroutine chem_timestep_init(phys_state, pbuf2d) use mo_flbc, only : flbc_chk use mo_ghg_chem, only : ghg_chem_timestep_init use physics_buffer, only : physics_buffer_desc - + TYPE(physics_state), INTENT(IN):: phys_state(begchunk:endchunk) TYPE(physics_buffer_desc), POINTER :: pbuf2d(:,:) @@ -2019,7 +2022,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o ) REAL(r8) :: mmr_tend(state%NCOL,PVER,gas_pcnst) REAL(r8) :: wk_out(state%NCOL) LOGICAL :: Found - + CHARACTER(LEN=shr_kind_cl) :: tagName REAL(r8), PARAMETER :: zlnd = 0.01_r8 ! Roughness length for soil [m] @@ -2364,7 +2367,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o ) ENDDO ! Deal with secondary organic aerosols (SOAs). This mapping is using the - ! complex SOA option in GEOS-Chem. + ! complex SOA option in GEOS-Chem. ! MAM uses five volatility bins spanning saturation concentrations from 0.01 ! to 100 ug/m3 (logarithmically). The complex SOA option has four volatility ! bins that 0.1 to 100 ug/m3. We lump the lowest two bins in CESM2 to the @@ -3692,7 +3695,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o ) ! Compute the surface flux for the non-local mixing, ! (which means getting emissions & drydep from HEMCO) ! and store it in State_Chm%Surface_Flux - ! + ! ! For CESM-GC, Surface_Flux will be equal to the opposite of the ! dry deposition flux since emissions are loaded externally ! ( SurfaceFlux = eflx - dflx = - dflx ) @@ -3739,10 +3742,10 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o ) ! Get the species ID from the drydep ID N = State_Chm(BEGCHUNK)%Map_DryDep(ND) IF ( N <= 0 ) CYCLE - + M = map2GCinv(N) IF ( M <= 0 ) CYCLE - + cam_in%cflx(1:nY,M) = cam_in%cflx(1:nY,M) & + State_Chm(LCHNK)%SurfaceFlux(1,1:nY,N) ENDDO @@ -3763,7 +3766,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o ) new_units = KG_SPECIES_PER_M2, & previous_units = previous_units, & RC = RC ) - + IF ( RC /= GC_SUCCESS ) THEN ErrMsg = 'Error encountered in "Convert_Spc_Units"!' diff --git a/src/chemistry/pp_terminator/chemistry.F90 b/src/chemistry/pp_terminator/chemistry.F90 index 11fbf5e0c9..b1e82d8d65 100644 --- a/src/chemistry/pp_terminator/chemistry.F90 +++ b/src/chemistry/pp_terminator/chemistry.F90 @@ -32,9 +32,10 @@ module chemistry public :: chem_write_restart public :: chem_read_restart public :: chem_init_restart - public :: chem_readnl ! read chem namelist + public :: chem_readnl ! read chem namelist public :: chem_reset_fluxes public :: chem_emissions + public :: chem_has_ndep_flx interface chem_write_restart module procedure chem_write_restart_bin @@ -45,9 +46,11 @@ module chemistry module procedure chem_read_restart_pio end interface + logical, parameter :: chem_has_ndep_flx = .false. + ! Private data integer, parameter :: nspecies = 3 - + integer :: idx_cl =-1 integer :: idx_cl2=-1 @@ -75,10 +78,10 @@ end function chem_is !================================================================================================ subroutine chem_register - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: register advected constituents for parameterized greenhouse gas chemistry - ! + ! !----------------------------------------------------------------------- real(r8), parameter :: cptmp = 666._r8 @@ -86,10 +89,10 @@ subroutine chem_register logical :: camout integer :: i, n - + do i = 1, nspecies camout = trim(species(i)) .eq. 'RHO' - call cnst_add( species(i), adv_mass(i), cptmp, qmin, n, & + call cnst_add( species(i), adv_mass(i), cptmp, qmin, n, & readiv=.true.,mixtype='dry',cam_outfld=camout) indices(i) = n map2chm(n) = i @@ -123,12 +126,12 @@ end function chem_is_active !================================================================================================ function chem_implements_cnst(name) - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: return true if specified constituent is implemented by this package - ! + ! ! Author: B. Eaton - ! + ! !----------------------------------------------------------------------- implicit none !-----------------------------Arguments--------------------------------- @@ -137,7 +140,7 @@ function chem_implements_cnst(name) logical :: chem_implements_cnst ! return value integer :: i - + chem_implements_cnst = .false. do i = 1, nspecies @@ -150,13 +153,13 @@ function chem_implements_cnst(name) end function chem_implements_cnst !=============================================================================== - + subroutine chem_init(phys_state, pbuf2d) - !----------------------------------------------------------------------- - ! + !----------------------------------------------------------------------- + ! ! Purpose: initialize parameterized greenhouse gas chemistry ! (declare history variables) - ! + ! !----------------------------------------------------------------------- use physics_buffer, only: physics_buffer_desc use cam_history, only: addfld, add_default, horiz_only @@ -196,7 +199,7 @@ end subroutine chem_init subroutine chem_timestep_init(phys_state, pbuf2d) use physics_buffer, only: physics_buffer_desc - type(physics_state), intent(in):: phys_state(begchunk:endchunk) + type(physics_state), intent(in):: phys_state(begchunk:endchunk) type(physics_buffer_desc), pointer :: pbuf2d(:,:) end subroutine chem_timestep_init @@ -222,7 +225,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o ) real(r8), optional, intent(out) :: fh2o(pcols) ! h2o flux to balance source from chemistry real(r8) :: a(pver),b(pver),c(pver),d(pver) - + real(r8) :: k1(pcols) real(r8) :: k2(pcols) @@ -278,7 +281,7 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dt, pbuf, fh2o ) l(i,:) = (1._r8 - e(i,:))/det(i,:)/dt elsewhere l(i,:) = 4._r8*k2(i) - endwhere + endwhere cl_f(i,:) = -l(i,:)*(cl(i,:) - det(i,:) + r(i) )*(cl(i,:) + det(i,:) + r(i)) / ( 1._r8 +e(i,:) + dt*l(i,:)*(cl(i,:) + r(i))) cl2_f(i,:) = -cl_f(i,:) / 2._r8 @@ -325,7 +328,7 @@ subroutine chem_init_cnst(name, latvals, lonvals, mask, q) real(r8) :: q_vmr(size(q, 1)) ! volume mixing ratio (ncol) real(r8) :: det(size(q, 1)) real(r8) :: krat(size(q, 1)) - + real(r8) :: k1(size(q, 1)) real(r8) :: k2(size(q, 1)) @@ -347,7 +350,7 @@ subroutine chem_init_cnst(name, latvals, lonvals, mask, q) krat(:) = k1(:) / (4._r8 * k2(:)) h = init_vmr_cl + 2._r8 * init_vmr_cl2 - + det(:) = sqrt(krat(:) * krat(:) + 2._r8 * h * krat(:)) if (trim(name) == trim(species(1)) ) then @@ -412,7 +415,7 @@ subroutine chem_init_restart(File) end subroutine chem_init_restart !================================================================================ subroutine chem_reset_fluxes( fptr, cam_in ) - use camsrfexch, only : cam_in_t + use camsrfexch, only : cam_in_t real(r8), pointer :: fptr(:,:) ! pointer into array data type(cam_in_t), intent(inout) :: cam_in(begchunk:endchunk) @@ -420,7 +423,7 @@ subroutine chem_reset_fluxes( fptr, cam_in ) end subroutine chem_reset_fluxes !================================================================================ subroutine chem_emissions( state, cam_in, pbuf ) - use camsrfexch, only: cam_in_t + use camsrfexch, only: cam_in_t use physics_buffer, only: physics_buffer_desc ! Arguments: diff --git a/src/control/camsrfexch.F90 b/src/control/camsrfexch.F90 index 8111785cd1..1470c46198 100644 --- a/src/control/camsrfexch.F90 +++ b/src/control/camsrfexch.F90 @@ -9,7 +9,7 @@ module camsrfexch use constituents, only: pcnst use ppgrid, only: pcols, begchunk, endchunk use phys_grid, only: get_ncols_p, phys_grid_initialized - use infnan, only: nan, posinf, assignment(=) + use infnan, only: posinf, assignment(=) use cam_abortutils, only: endrun use cam_logfile, only: iulog use srf_field_check, only: active_Sl_ram1, active_Sl_fv, active_Sl_soilw, & @@ -329,11 +329,11 @@ subroutine atm2hub_alloc( cam_out ) allocate (cam_out(c)%nhx_nitrogen_flx(pcols), stat=ierror) if ( ierror /= 0 ) call endrun(sub//': allocation error nhx_nitrogen_flx') - cam_out(c)%nhx_nitrogen_flx(:) = nan + cam_out(c)%nhx_nitrogen_flx(:) = 0._r8 allocate (cam_out(c)%noy_nitrogen_flx(pcols), stat=ierror) if ( ierror /= 0 ) call endrun(sub//': allocation error noy_nitrogen_flx') - cam_out(c)%noy_nitrogen_flx(:) = nan + cam_out(c)%noy_nitrogen_flx(:) = 0._r8 endif From 24e012d6790b73ac78e47821ee970100cbbcd2b3 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 26 Dec 2024 11:03:59 -0700 Subject: [PATCH 03/15] ChangeLog start; code clean up; add ndep diags to reg test modified: cime_config/testdefs/testmods_dirs/cam/outfrq9s_Leung_dust/user_nl_cam modified: doc/ChangeLog modified: src/utils/srf_field_check.F90 --- .../cam/outfrq9s_Leung_dust/user_nl_cam | 2 +- doc/ChangeLog | 131 ++++++++++++++++++ src/utils/srf_field_check.F90 | 4 - 3 files changed, 132 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_Leung_dust/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_Leung_dust/user_nl_cam index 351fe92801..01d1b71f8f 100644 --- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_Leung_dust/user_nl_cam +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_Leung_dust/user_nl_cam @@ -1,6 +1,6 @@ dust_emis_method = 'Leung_2023' -fincl2 = 'dst_a1SF', 'dst_a2SF', 'dst_a3SF' +fincl2 = 'dst_a1SF', 'dst_a2SF', 'dst_a3SF', 'a2x_NHXDEP','a2x_NOYDEP' mfilt=1,1,1,1,1,1 ndens=1,1,1,1,1,1 diff --git a/doc/ChangeLog b/doc/ChangeLog index 746fead140..b535adc98e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,136 @@ =============================================================== +Tag name: cam6_4_??? +Originator(s): fvitt +Date: +One-line Summary: +Github PR URL: + +Purpose of changes (include the issue number and title text for each relevant GitHub issue): + + Change logical determinations on how to set nitrogen deposition fluxes which are sent to + surface models through the NUOPC mediator. This sets the nitrogen deposition fluxes to + prescribed CDEP input stream fluxes if corresponding namelist options are set. Otherwise, + the nitrogen deposition fluxes set to chemistry computed fluxes if the chemistry is capable + of providing the fluxes. (Github issue #1196) + +Describe any changes made to build system: + +Describe any changes made to the namelist: + +List any changes to the defaults for the boundary datasets: + +Describe any substantial timing or memory changes: + +Code reviewed by: + +List all files eliminated: + +List all files added and what they do: + +List all existing files that have been modified, and describe the changes: + +M bld/build-namelist + - change how default ndep_stream namelist options are set + . check if chemistry is capable of producing nitrogen deposition fluxes + . set defaults only if not simple physics nor aqua-planet configuration + +M bld/namelist_files/namelist_defaults_cam.xml + - default ndep_stream namelist settings for perpetual year 2000 configuration + +M bld/namelist_files/namelist_definition.xml + - updates to stream_ndep_* namelist descriptions + +M bld/namelist_files/use_cases/1850_cam_lt.xml +M bld/namelist_files/use_cases/1850_cam_mt.xml +M bld/namelist_files/use_cases/2010_cam6.xml +M bld/namelist_files/use_cases/hist_cam_lt.xml +M bld/namelist_files/use_cases/hist_cam_mt.xml +M bld/namelist_files/use_cases/sd_cam6.xml +M bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml + - stream_ndep_* namelist settings for use cases + +M cime_config/buildnml + - remove the use of CAM_STREAM_NDEP* xml vars to set stream_ndep* namelist options + +M cime_config/config_component.xml + - remove CAM_STREAM_NDEP* xml vars + +M src/chemistry/geoschem/chemistry.F90 +M src/chemistry/pp_none/chemistry.F90 +M src/chemistry/pp_terminator/chemistry.F90 + - add chem_has_ndep_flx flag -- set to .FALSE. for these chem pckgs + +M src/chemistry/mozart/chemistry.F90 + - add chem_has_ndep_flx flag + - add check for prescribed nitrogen depostion fluxes + +M src/chemistry/mozart/mo_chm_diags.F90 + - check for NOy and NHx species in chemistry to determine if + chemistry can produce nitrogen deposition fluxes + +M src/control/camsrfexch.F90 + - allocate cam_out nitro dep flx arrays only if not simple phys and not aqua-planet + +M src/control/runtime_opts.F90 + - invoke stream_ndep_readnl sooner in the initialization phase -- from read_namelist + +M src/cpl/nuopc/atm_import_export.F90 + - set out going ndep fluxes only if not simple physics and not aqua-planet + - set out going ndep fluxes to prescribed ndep stream fields, otherwise, + set chemistry computed fluxes if available. + +M src/cpl/nuopc/atm_stream_ndep.F90 + - add readnl routine -- seperated from init routine which can be invoked from + runtime_opts -- earlier in initialization + - set default use_ndep_stream flag to .false. + +M src/physics/cam/cam_diagnostics.F90 + - add 'a2x_NOYDEP' and 'a2x_NHXDEP' history fields + +M src/utils/srf_field_check.F90 + - removed active_Faxa_nhx and active_Faxa_noy routine flags which were not useful + +If there were any failures reported from running test_driver.sh on any test +platform, and checkin with these failures has been OK'd by the gatekeeper, +then copy the lines from the td.*.status files for the failed tests to the +appropriate machine below. All failed tests must be justified. + +derecho/intel/aux_cam: + +derecho/nvhpc/aux_cam: + +izumi/nag/aux_cam: + +izumi/gnu/aux_cam: + +CAM tag used for the baseline comparison tests if different than previous +tag: + +Summarize any changes to answers, i.e., +- what code configurations: +- what platforms/compilers: +- nature of change (roundoff; larger than roundoff but same climate; new + climate): + +If bitwise differences were observed, how did you show they were no worse +than roundoff? + +If this tag changes climate describe the run(s) done to evaluate the new +climate in enough detail that it(they) could be reproduced, i.e., +- source tag (all code used must be in the repository): +- platform/compilers: +- configure commandline: +- build-namelist command (or complete namelist): +- MSS location of output: + +MSS location of control simulations used to validate new climate: + +URL for AMWG diagnostics output used to validate new climate: + +=============================================================== +=============================================================== + Tag name: cam6_4_047 Originator(s): jedwards4b, fvitt Date: 19 November 2024 diff --git a/src/utils/srf_field_check.F90 b/src/utils/srf_field_check.F90 index a0aa0cb0f5..97d210bb5e 100644 --- a/src/utils/srf_field_check.F90 +++ b/src/utils/srf_field_check.F90 @@ -17,10 +17,6 @@ module srf_field_check logical, public, protected :: active_Fall_fco2_lnd = .false. logical, public, protected :: active_Faoo_fco2_ocn = .false. - ! output from atm - logical, public, protected :: active_Faxa_nhx = .false. - logical, public, protected :: active_Faxa_noy = .false. - public :: set_active_Sl_ram1 public :: set_active_Sl_fv public :: set_active_Sl_soilw From 82a3c9c6ac8827352dc2b3eea558ea8bb9972e07 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 26 Dec 2024 12:41:35 -0700 Subject: [PATCH 04/15] fix restart problem with nitrogen flux history fields modified: src/physics/cam/cam_diagnostics.F90 modified: src/physics/cam/physpkg.F90 --- src/physics/cam/cam_diagnostics.F90 | 7 ------- src/physics/cam/physpkg.F90 | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/physics/cam/cam_diagnostics.F90 b/src/physics/cam/cam_diagnostics.F90 index 3a01d9536e..d351ec05f8 100644 --- a/src/physics/cam/cam_diagnostics.F90 +++ b/src/physics/cam/cam_diagnostics.F90 @@ -1906,13 +1906,6 @@ subroutine diag_export(cam_out) call outfld('a2x_DSTDRY4', cam_out%dstdry4, pcols, lchnk) end if - if (associated(cam_out%nhx_nitrogen_flx)) then - call outfld('a2x_NHXDEP', cam_out%nhx_nitrogen_flx, pcols, lchnk) - end if - if (associated(cam_out%noy_nitrogen_flx)) then - call outfld('a2x_NOYDEP', cam_out%noy_nitrogen_flx, pcols, lchnk) - end if - end subroutine diag_export !####################################################################### diff --git a/src/physics/cam/physpkg.F90 b/src/physics/cam/physpkg.F90 index ba36670ce8..a9ffeb91e5 100644 --- a/src/physics/cam/physpkg.F90 +++ b/src/physics/cam/physpkg.F90 @@ -1988,6 +1988,14 @@ subroutine tphysac (ztodt, cam_in, & call clybry_fam_set( ncol, lchnk, map2chm, state%q, pbuf ) + ! output these here -- after updates by chem_timestep_tend or export_fields within the current time step + if (associated(cam_out%nhx_nitrogen_flx)) then + call outfld('a2x_NHXDEP', cam_out%nhx_nitrogen_flx, pcols, lchnk) + end if + if (associated(cam_out%noy_nitrogen_flx)) then + call outfld('a2x_NOYDEP', cam_out%noy_nitrogen_flx, pcols, lchnk) + end if + end subroutine tphysac subroutine tphysbc (ztodt, state, & From bba4e59ceeb7d17fe6bac0738e066811aa20996c Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 26 Dec 2024 15:08:14 -0700 Subject: [PATCH 05/15] add addfld calls to cam7 phys modified: src/physics/cam7/physpkg.F90 --- src/physics/cam7/physpkg.F90 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/physics/cam7/physpkg.F90 b/src/physics/cam7/physpkg.F90 index 83d03c46d1..d0e00b4673 100644 --- a/src/physics/cam7/physpkg.F90 +++ b/src/physics/cam7/physpkg.F90 @@ -2470,6 +2470,14 @@ subroutine tphysac (ztodt, cam_in, & call clybry_fam_set( ncol, lchnk, map2chm, state%q, pbuf ) + ! output these here -- after updates by chem_timestep_tend or export_fields within the current time step + if (associated(cam_out%nhx_nitrogen_flx)) then + call outfld('a2x_NHXDEP', cam_out%nhx_nitrogen_flx, pcols, lchnk) + end if + if (associated(cam_out%noy_nitrogen_flx)) then + call outfld('a2x_NOYDEP', cam_out%noy_nitrogen_flx, pcols, lchnk) + end if + end subroutine tphysac subroutine tphysbc (ztodt, state, & From 9066aee7bdef48926fb02b81bed604329c2ff8cf Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 26 Dec 2024 16:23:47 -0700 Subject: [PATCH 06/15] units correction in diagnostics modified: src/cpl/nuopc/atm_import_export.F90 modified: src/cpl/nuopc/atm_stream_ndep.F90 modified: src/physics/cam/cam_diagnostics.F90 --- src/cpl/nuopc/atm_import_export.F90 | 15 +++------------ src/cpl/nuopc/atm_stream_ndep.F90 | 9 +++++++-- src/physics/cam/cam_diagnostics.F90 | 4 ++-- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index b5b56b8112..fa2a91d943 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -923,7 +923,6 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) integer :: ncols ! Number of columns integer :: nstep logical :: exists - real(r8) :: scale_ndep ! 2d pointers real(r8), pointer :: fldptr_ndep(:,:) real(r8), pointer :: fldptr_bcph(:,:) , fldptr_ocph(:,:) @@ -1121,6 +1120,7 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) end if if (ndep_stream_active.or.chem_has_ndep_flx) then + ! Nitrogen dep fluxes are obtained from the ndep input stream if input data is available ! otherwise computed by chemistry if (ndep_stream_active) then @@ -1128,23 +1128,14 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) ! get ndep fluxes from the stream call stream_ndep_interp(cam_out, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - ! NDEP read from forcing is expected to be in units of gN/m2/sec - but the mediator - ! expects units of kgN/m2/sec - scale_ndep = .001_r8 - - else if (chem_has_ndep_flx) then - - ! Assume chemistry computes ndep fluxes, then its in units of kgN/m2/s - and the mediator expects - ! units of kgN/m2/sec, so the following conversion needs to happen - scale_ndep = 1._r8 end if g = 1 do c = begchunk,endchunk do i = 1,get_ncols_p(c) - fldptr_ndep(1,g) = cam_out(c)%nhx_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) - fldptr_ndep(2,g) = cam_out(c)%noy_nitrogen_flx(i) * scale_ndep * mod2med_areacor(g) + fldptr_ndep(1,g) = cam_out(c)%nhx_nitrogen_flx(i) * mod2med_areacor(g) + fldptr_ndep(2,g) = cam_out(c)%noy_nitrogen_flx(i) * mod2med_areacor(g) g = g + 1 end do end do diff --git a/src/cpl/nuopc/atm_stream_ndep.F90 b/src/cpl/nuopc/atm_stream_ndep.F90 index eed6ac619e..f54509b269 100644 --- a/src/cpl/nuopc/atm_stream_ndep.F90 +++ b/src/cpl/nuopc/atm_stream_ndep.F90 @@ -246,6 +246,11 @@ subroutine stream_ndep_interp(cam_out, rc) integer :: mcdate ! Current model date (yyyymmdd) real(r8), pointer :: dataptr1d_nhx(:) real(r8), pointer :: dataptr1d_noy(:) + + ! NDEP read from forcing is expected to be in units of gN/m2/sec - but the mediator + ! expects units of kgN/m2/sec + real(r8), parameter :: scale_ndep = .001_r8 + !----------------------------------------------------------------------- ! Advance sdat stream @@ -269,8 +274,8 @@ subroutine stream_ndep_interp(cam_out, rc) g = 1 do c = begchunk,endchunk do i = 1,get_ncols_p(c) - cam_out(c)%nhx_nitrogen_flx(i) = dataptr1d_nhx(g) - cam_out(c)%noy_nitrogen_flx(i) = dataptr1d_noy(g) + cam_out(c)%nhx_nitrogen_flx(i) = dataptr1d_nhx(g) * scale_ndep + cam_out(c)%noy_nitrogen_flx(i) = dataptr1d_noy(g) * scale_ndep g = g + 1 end do end do diff --git a/src/physics/cam/cam_diagnostics.F90 b/src/physics/cam/cam_diagnostics.F90 index d351ec05f8..6006a6e8c8 100644 --- a/src/physics/cam/cam_diagnostics.F90 +++ b/src/physics/cam/cam_diagnostics.F90 @@ -568,8 +568,8 @@ subroutine diag_init_moist(pbuf2d) call addfld('a2x_DSTWET4', horiz_only, 'A', 'kg/m2/s', 'wetdep of dust (bin4)') call addfld('a2x_DSTDRY4', horiz_only, 'A', 'kg/m2/s', 'drydep of dust (bin4)') - call addfld('a2x_NOYDEP', horiz_only, 'A', 'kg/m2/s', 'NOy Deposition Flux') - call addfld('a2x_NHXDEP', horiz_only, 'A', 'kg/m2/s', 'NHx Deposition Flux') + call addfld('a2x_NOYDEP', horiz_only, 'A', 'kgN/m2/s', 'NOy Deposition Flux') + call addfld('a2x_NHXDEP', horiz_only, 'A', 'kgN/m2/s', 'NHx Deposition Flux') ! defaults if (history_amwg) then From 97fd80156c96244d769593f3ad8b8a8bbb614e82 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Sat, 28 Dec 2024 11:26:00 -0700 Subject: [PATCH 07/15] set fldptr_ndep to zero for no flux cases modified: src/cpl/nuopc/atm_import_export.F90 --- src/cpl/nuopc/atm_import_export.F90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index fa2a91d943..c5ad5c253d 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -1109,6 +1109,8 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) call state_getfldptr(exportState, 'Faxa_ndep', fldptr2d=fldptr_ndep, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + fldptr_ndep(:,:) = 0._r8 + if (.not. (simple_phys .or. aqua_planet)) then ! The ndep_stream_nl namelist group is read in stream_ndep_init. This sets whether @@ -1140,10 +1142,6 @@ subroutine export_fields( gcomp, model_mesh, model_clock, cam_out, rc) end do end do - else - - fldptr_ndep(:,:) = 0._r8 - end if end if From 31796b2677e6389862948a832f075011f3ca08d2 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Sat, 28 Dec 2024 14:18:58 -0700 Subject: [PATCH 08/15] namelist fixes modified: bld/namelist_files/namelist_defaults_cam.xml modified: bld/namelist_files/use_cases/1850_cam6.xml modified: bld/namelist_files/use_cases/hist_cam6.xml --- bld/namelist_files/namelist_defaults_cam.xml | 3 --- bld/namelist_files/use_cases/1850_cam6.xml | 5 +++++ bld/namelist_files/use_cases/hist_cam6.xml | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index 501047a1bc..ab2707290c 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -2063,9 +2063,6 @@ lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -2015 -1850 2000 2000 1 diff --git a/bld/namelist_files/use_cases/1850_cam6.xml b/bld/namelist_files/use_cases/1850_cam6.xml index 7f4cf09a5c..14d0c61526 100644 --- a/bld/namelist_files/use_cases/1850_cam6.xml +++ b/bld/namelist_files/use_cases/1850_cam6.xml @@ -52,6 +52,11 @@ atm/cam/chem/emis/elev/H2O_emission_CH4_oxidationx2_elev_3DmonthlyL70_1850climoCMIP6piControl001_y21-50avg_c180802.nc +lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc +1850 +1850 +1 + 1850 diff --git a/bld/namelist_files/use_cases/hist_cam6.xml b/bld/namelist_files/use_cases/hist_cam6.xml index ac93a56a62..fff3618c07 100644 --- a/bld/namelist_files/use_cases/hist_cam6.xml +++ b/bld/namelist_files/use_cases/hist_cam6.xml @@ -30,6 +30,10 @@ 'SERIAL' 'CO2','CH4','N2O','CFC11eq','CFC12' + 1850 + 2015 + 1850 + 1850-2000 From 9848f15a3c71ef78ec5f3fd7568adddb23f5644c Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Wed, 8 Jan 2025 14:54:19 -0700 Subject: [PATCH 09/15] use sim_year to determine stream_ndep settings; remove deprecated ndep_list modified: bld/build-namelist modified: bld/namelist_files/namelist_defaults_cam.xml modified: bld/namelist_files/namelist_definition.xml modified: bld/namelist_files/use_cases/1850_cam6.xml modified: bld/namelist_files/use_cases/1850_cam_lt.xml modified: bld/namelist_files/use_cases/1850_cam_mt.xml modified: bld/namelist_files/use_cases/2000_geoschem.xml modified: bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml modified: bld/namelist_files/use_cases/2010_cam6.xml modified: bld/namelist_files/use_cases/2010_geoschem.xml modified: bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml modified: bld/namelist_files/use_cases/hist_cam6.xml modified: bld/namelist_files/use_cases/hist_cam_lt.xml modified: bld/namelist_files/use_cases/hist_cam_mt.xml modified: bld/namelist_files/use_cases/hist_geoschem.xml modified: bld/namelist_files/use_cases/hist_geoschem_nudged.xml modified: bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml modified: bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml modified: bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml modified: bld/namelist_files/use_cases/sd_cam6.xml modified: bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml modified: bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml modified: bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml modified: bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml modified: bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml modified: bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml modified: bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml modified: bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml modified: bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml modified: bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml --- bld/build-namelist | 26 +++++++-------- bld/namelist_files/namelist_defaults_cam.xml | 20 +++++++++--- bld/namelist_files/namelist_definition.xml | 6 ---- bld/namelist_files/use_cases/1850_cam6.xml | 5 --- bld/namelist_files/use_cases/1850_cam_lt.xml | 8 ++--- bld/namelist_files/use_cases/1850_cam_mt.xml | 8 ++--- .../use_cases/2000_geoschem.xml | 3 -- .../use_cases/2000_trop_strat_vbs_cam6.xml | 2 -- bld/namelist_files/use_cases/2010_cam6.xml | 5 ++- .../use_cases/2010_geoschem.xml | 1 - .../use_cases/2010_trop_strat_vbs_cam6.xml | 2 -- bld/namelist_files/use_cases/hist_cam6.xml | 6 +--- bld/namelist_files/use_cases/hist_cam_lt.xml | 8 ++--- bld/namelist_files/use_cases/hist_cam_mt.xml | 8 ++--- .../use_cases/hist_geoschem.xml | 2 -- .../use_cases/hist_geoschem_nudged.xml | 2 -- .../use_cases/hist_trop_strat_nudged_cam6.xml | 2 -- .../use_cases/hist_trop_strat_vbsext_cam6.xml | 12 +++---- .../hist_trop_strat_vbsfire_cam6.xml | 2 -- bld/namelist_files/use_cases/sd_cam6.xml | 4 +-- .../use_cases/sd_trop_strat2_cam6.xml | 32 +++++++++---------- .../use_cases/sd_trop_strat_vbs_cam6.xml | 2 -- .../use_cases/sd_waccm_tsmlt_cam6.xml | 2 -- .../use_cases/waccm_ma_1850_cam6.xml | 2 -- .../use_cases/waccm_ma_hist_cam6.xml | 2 -- .../use_cases/waccm_sc_1850_cam6.xml | 8 ++--- .../use_cases/waccm_tsmlt_1850_cam6.xml | 2 -- .../use_cases/waccm_tsmlt_2000_cam6.xml | 2 -- .../use_cases/waccm_tsmlt_2010_cam6.xml | 2 -- .../use_cases/waccm_tsmlt_hist_cam6.xml | 2 -- 30 files changed, 63 insertions(+), 125 deletions(-) diff --git a/bld/build-namelist b/bld/build-namelist index 22be75b310..7a66796964 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -509,19 +509,6 @@ if ($phys_mode_flags > 1) { my $simple_phys = 0; if ($adia_mode or $ideal_mode) { $simple_phys = 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) { - add_default($nl, 'stream_ndep_data_filename'); - add_default($nl, 'stream_ndep_mesh_filename'); - add_default($nl, 'stream_ndep_year_first'); - add_default($nl, 'stream_ndep_year_last'); - add_default($nl, 'stream_ndep_year_align'); - } -} - # Single column mode my $scam = $cfg->get('scam'); my $scam_iop = $cfg->get('scam_iop'); @@ -710,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) { + 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'); diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index ab2707290c..486b3a9fe0 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -2061,11 +2061,23 @@ atm/cam/dst/dst_source1x1tuned-cam4-06202012.nc -lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -2000 -2000 -1 + +lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc +lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc + +2000 +1850 +1850 +2010 + +2000 +1850 +2015 +2010 + +1 +1850 .false. diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index 185edfa81e..4aaa038224 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -7609,12 +7609,6 @@ Bubble-mediated sea-air transfer. See ocean_emis.F90 for details. Default: FALSE - -List of nitrogen deposition fluxes to be sent from CAM to surface models. -Default: set by build-namelist. - - Year first to use in nitrogen deposition stream data. diff --git a/bld/namelist_files/use_cases/1850_cam6.xml b/bld/namelist_files/use_cases/1850_cam6.xml index 14d0c61526..7f4cf09a5c 100644 --- a/bld/namelist_files/use_cases/1850_cam6.xml +++ b/bld/namelist_files/use_cases/1850_cam6.xml @@ -52,11 +52,6 @@ atm/cam/chem/emis/elev/H2O_emission_CH4_oxidationx2_elev_3DmonthlyL70_1850climoCMIP6piControl001_y21-50avg_c180802.nc -lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc -1850 -1850 -1 - 1850 diff --git a/bld/namelist_files/use_cases/1850_cam_lt.xml b/bld/namelist_files/use_cases/1850_cam_lt.xml index fe0fef33e6..d046c8bec7 100644 --- a/bld/namelist_files/use_cases/1850_cam_lt.xml +++ b/bld/namelist_files/use_cases/1850_cam_lt.xml @@ -61,11 +61,7 @@ CYCLICAL 1850 - -lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc -share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -1850 -1 + +1850 diff --git a/bld/namelist_files/use_cases/1850_cam_mt.xml b/bld/namelist_files/use_cases/1850_cam_mt.xml index df05241070..68e7ca4a1a 100644 --- a/bld/namelist_files/use_cases/1850_cam_mt.xml +++ b/bld/namelist_files/use_cases/1850_cam_mt.xml @@ -56,11 +56,7 @@ CYCLICAL 1850 - -lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc -share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -1850 -1 + +1850 diff --git a/bld/namelist_files/use_cases/2000_geoschem.xml b/bld/namelist_files/use_cases/2000_geoschem.xml index 3d2c5507b5..384d46b42a 100644 --- a/bld/namelist_files/use_cases/2000_geoschem.xml +++ b/bld/namelist_files/use_cases/2000_geoschem.xml @@ -36,9 +36,6 @@ - - - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml b/bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml index 47d97d6249..039685230f 100644 --- a/bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml +++ b/bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml @@ -131,8 +131,6 @@ 2000 -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/2010_cam6.xml b/bld/namelist_files/use_cases/2010_cam6.xml index d392d2b76e..641a8a8689 100644 --- a/bld/namelist_files/use_cases/2010_cam6.xml +++ b/bld/namelist_files/use_cases/2010_cam6.xml @@ -83,8 +83,7 @@ 'CYCLICAL' 2010 -2010 -2010 -1 + +2010 diff --git a/bld/namelist_files/use_cases/2010_geoschem.xml b/bld/namelist_files/use_cases/2010_geoschem.xml index b1b0f9f2eb..36c6eea697 100644 --- a/bld/namelist_files/use_cases/2010_geoschem.xml +++ b/bld/namelist_files/use_cases/2010_geoschem.xml @@ -34,7 +34,6 @@ - diff --git a/bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml b/bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml index a0b07f3248..7cd77b9b58 100644 --- a/bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml +++ b/bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml @@ -322,8 +322,6 @@ 2010 -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/hist_cam6.xml b/bld/namelist_files/use_cases/hist_cam6.xml index fff3618c07..9b79a04132 100644 --- a/bld/namelist_files/use_cases/hist_cam6.xml +++ b/bld/namelist_files/use_cases/hist_cam6.xml @@ -30,11 +30,7 @@ 'SERIAL' 'CO2','CH4','N2O','CFC11eq','CFC12' - 1850 - 2015 - 1850 - - 1850-2000 + 1850-2015 diff --git a/bld/namelist_files/use_cases/hist_cam_lt.xml b/bld/namelist_files/use_cases/hist_cam_lt.xml index a7cd6c0e9c..8f071a149b 100644 --- a/bld/namelist_files/use_cases/hist_cam_lt.xml +++ b/bld/namelist_files/use_cases/hist_cam_lt.xml @@ -42,11 +42,7 @@ INTERP_MISSING_MONTHS SERIAL - -lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc -share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -2015 -1850 + +1850-2015 diff --git a/bld/namelist_files/use_cases/hist_cam_mt.xml b/bld/namelist_files/use_cases/hist_cam_mt.xml index 63b6691929..0c8e2e85fb 100644 --- a/bld/namelist_files/use_cases/hist_cam_mt.xml +++ b/bld/namelist_files/use_cases/hist_cam_mt.xml @@ -37,11 +37,7 @@ INTERP_MISSING_MONTHS SERIAL - -lnd/clm2/ndepdata/fndep_clm_hist_b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.ensmean_1849-2015_monthly_0.9x1.25_c180926.nc -share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -2015 -1850 + +1850-2015 diff --git a/bld/namelist_files/use_cases/hist_geoschem.xml b/bld/namelist_files/use_cases/hist_geoschem.xml index 1cfff4a8a9..2b3a158400 100644 --- a/bld/namelist_files/use_cases/hist_geoschem.xml +++ b/bld/namelist_files/use_cases/hist_geoschem.xml @@ -31,8 +31,6 @@ SERIAL -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/hist_geoschem_nudged.xml b/bld/namelist_files/use_cases/hist_geoschem_nudged.xml index 3c87bcb4fc..51105cd460 100644 --- a/bld/namelist_files/use_cases/hist_geoschem_nudged.xml +++ b/bld/namelist_files/use_cases/hist_geoschem_nudged.xml @@ -31,8 +31,6 @@ SERIAL -'noy', 'nhx' - .true. diff --git a/bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml b/bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml index ff2a92b3ef..026e329d7a 100644 --- a/bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml +++ b/bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml @@ -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' -'noy', 'nhx' - .true. 'atm/cam/met/nudging/MERRA2_fv09_32L/' diff --git a/bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml b/bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml index 38e1439ed0..1605081d6d 100644 --- a/bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml +++ b/bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml @@ -26,8 +26,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 @@ -44,9 +42,9 @@ .false. .false. - + - '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', @@ -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', diff --git a/bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml b/bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml index 7219cf0322..791b6f3737 100644 --- a/bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml +++ b/bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml @@ -67,8 +67,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/sd_cam6.xml b/bld/namelist_files/use_cases/sd_cam6.xml index 9a89255e88..2e81857089 100644 --- a/bld/namelist_files/use_cases/sd_cam6.xml +++ b/bld/namelist_files/use_cases/sd_cam6.xml @@ -36,8 +36,6 @@ 'SERIAL' 'CO2','CH4','N2O','CFC11eq','CFC12' - 1850 - 2015 - 1850 + 1850-2015 diff --git a/bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml b/bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml index 4075ad584c..4d32182f8a 100644 --- a/bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml +++ b/bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml @@ -31,8 +31,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1, 1 @@ -49,7 +47,7 @@ .false. .false. - + 'CFC11STAR', 'AODDUST', 'AODDUST02', 'T', 'U', 'V', 'O3', 'OH', 'NO3', 'HO2', 'LNO_COL_PROD', 'NO2_CLXF', 'SFNO', 'SFNH3', 'BRO', 'CH3CL', @@ -161,46 +159,46 @@ 'DF_BIGALD4', 'DF_BIGALK', 'DF_BIGENE', 'DF_BZALD', 'DF_C2H2', 'DF_C2H4', 'DF_C2H6', 'DF_C3H6', 'DF_C3H8', 'DF_CRESOL', 'DF_DMS', 'DF_GLYOXAL', 'DF_ISOP', 'DF_MACR', 'DF_MEK', 'DF_MVK', 'DF_N2O5', 'DF_PBZNIT', 'DF_PHENOL', 'DF_TEPOMUC', 'DF_TOLUENE', 'DF_XYLENES', 'DF_XYLOL', - 'WD_BCARY', 'WD_BENZENE', 'WD_BEPOMUC', 'WD_BIGALD1', 'WD_BIGALD2', 'WD_BIGALD3', 'WD_BIGALD4', + 'WD_BCARY', 'WD_BENZENE', 'WD_BEPOMUC', 'WD_BIGALD1', 'WD_BIGALD2', 'WD_BIGALD3', 'WD_BIGALD4', 'WD_BIGALK', 'WD_BIGENE', 'WD_BZALD', - 'WD_C2H2', 'WD_C2H4', 'WD_C2H6', 'WD_C3H6', 'WD_C3H8', 'WD_CO', 'WD_CRESOL', 'WD_DMS', 'WD_GLYOXAL', 'WD_ISOP', + 'WD_C2H2', 'WD_C2H4', 'WD_C2H6', 'WD_C3H6', 'WD_C3H8', 'WD_CO', 'WD_CRESOL', 'WD_DMS', 'WD_GLYOXAL', 'WD_ISOP', 'WD_MEK', 'WD_MPAN', 'WD_N2O5', 'WD_NO', 'WD_NO2', 'WD_PAN', 'WD_PBZNIT', 'WD_PHENOL', 'WD_TEPOMUC','WD_TOLUENE', 'WD_XYLENES', 'WD_XYLOL' 'MEG_APIN','MEG_BPIN','MEG_LIMON','MEG_MYRC', - 'ISOPFDN', 'ISOPFNP', 'ISOPN3B', 'ISOPN2B', 'ISOPN1D', 'ISOPN4D', + 'ISOPFDN', 'ISOPFNP', 'ISOPN3B', 'ISOPN2B', 'ISOPN1D', 'ISOPN4D', 'ISOPNBNO3', 'ISOPNOOHB', 'ISOPNOOHD', 'INHEB','INHED', 'HPALD1','HPALD4','ISOPHFP', - 'MVKN', 'MACRN', 'HMHP', 'NO3CH2CHO', 'HYPERACET', 'HCOCH2OOH', + 'MVKN', 'MACRN', 'HMHP', 'NO3CH2CHO', 'HYPERACET', 'HCOCH2OOH', 'DHPMPAL', 'MVKOOH', 'ISOPOH', 'HPALDB1C','HPALDB4C','ICHE','ISOPFDNC','ISOPFNC', - 'TERPNT', 'TERPNS','TERPNT1', 'TERPNS1', 'TERPNPT', 'TERPNPS', 'TERPNPT1', + 'TERPNT', 'TERPNS','TERPNT1', 'TERPNS1', 'TERPNPT', 'TERPNPS', 'TERPNPT1', 'TERPNPS1', 'TERPFDN', 'SQTN', 'TERPHFN', - 'TERP1OOH', 'TERPDHDP', 'TERPF2', 'TERPF1', 'TERPA', 'TERPA2', 'TERPK', 'TERPAPAN', + 'TERP1OOH', 'TERPDHDP', 'TERPF2', 'TERPF1', 'TERPA', 'TERPA2', 'TERPK', 'TERPAPAN', 'TERPACID', 'TERPA2PAN', 'TERPACID2','TERPACID3','TERPA3PAN','TERPOOHL','TERPA3', 'APIN','BPIN','LIMON','MYRC', 'DF_ISOPFDN', 'DF_ISOPFNP', 'DF_ISOPN3B', 'DF_ISOPN2B', 'DF_ISOPN1D', 'DF_ISOPN4D', 'DF_ISOPNBNO3', 'DF_ISOPNOOHB', 'DF_ISOPNOOHD', - 'DF_INHEB','DF_INHED', + 'DF_INHEB','DF_INHED', 'DF_HPALD1','DF_HPALD4','DF_ISOPHFP','DF_MVKN', 'DF_MACRN', 'DF_HMHP' 'DF_NO3CH2CHO', 'DF_HYPERACET', 'DF_HCOCH2OOH', 'DF_DHPMPAL', 'DF_MVKOOH', 'DF_ISOPOH', 'DF_HPALDB1C','DF_HPALDB4C','DF_ICHE','DF_ISOPFDNC','DF_ISOPFNC', - 'DF_TERPNT', 'DF_TERPNS','DF_TERPNT1', 'DF_TERPNS1', 'DF_TERPNPT', 'DF_TERPNPS', + 'DF_TERPNT', 'DF_TERPNS','DF_TERPNT1', 'DF_TERPNS1', 'DF_TERPNPT', 'DF_TERPNPS', 'DF_TERPNPT1', 'DF_TERPNPS1', 'DF_TERPFDN', 'DF_SQTN', 'DF_TERPHFN', - 'DF_TERP1OOH', 'DF_TERPDHDP', 'DF_TERPF2', 'DF_TERPF1', 'DF_TERPA', - 'DF_TERPA2', 'DF_TERPK', 'DF_TERPAPAN', 'DF_TERPACID', 'DF_TERPA2PAN', + 'DF_TERP1OOH', 'DF_TERPDHDP', 'DF_TERPF2', 'DF_TERPF1', 'DF_TERPA', + 'DF_TERPA2', 'DF_TERPK', 'DF_TERPAPAN', 'DF_TERPACID', 'DF_TERPA2PAN', 'DF_TERPACID2','DF_TERPACID3','DF_TERPA3PAN','DF_TERPOOHL','DF_TERPA3', 'DF_APIN','DF_BPIN','DF_LIMON','DF_MYRC', - 'WD_ISOPFDN', 'WD_ISOPFNP', 'WD_ISOPN3B', 'WD_ISOPN2B', 'WD_ISOPN1D', 'WD_ISOPN4D', + 'WD_ISOPFDN', 'WD_ISOPFNP', 'WD_ISOPN3B', 'WD_ISOPN2B', 'WD_ISOPN1D', 'WD_ISOPN4D', 'WD_ISOPNBNO3', 'WD_ISOPNOOHB', 'WD_ISOPNOOHD', - 'WD_INHEB','WD_INHED', + 'WD_INHEB','WD_INHED', 'WD_HPALD1','WD_HPALD4','WD_ISOPHFP','WD_MVKN', 'WD_MACRN', 'WD_HMHP' 'WD_NO3CH2CHO', 'WD_HYPERACET', 'WD_HCOCH2OOH', 'WD_DHPMPAL', 'WD_MVKOOH', 'WD_ISOPOH', 'WD_HPALDB1C','WD_HPALDB4C','WD_ICHE','WD_ISOPFDNC','WD_ISOPFNC', - 'WD_TERPNT', 'WD_TERPNS','WD_TERPNT1', 'WD_TERPNS1', 'WD_TERPNPT', 'WD_TERPNPS', + 'WD_TERPNT', 'WD_TERPNS','WD_TERPNT1', 'WD_TERPNS1', 'WD_TERPNPT', 'WD_TERPNPS', 'WD_TERPNPT1', 'WD_TERPNPS1', 'WD_TERPFDN', 'WD_SQTN', 'WD_TERPHFN', - 'WD_TERP1OOH', 'WD_TERPDHDP', 'WD_TERPF2', 'WD_TERPF1', 'WD_TERPA', + 'WD_TERP1OOH', 'WD_TERPDHDP', 'WD_TERPF2', 'WD_TERPF1', 'WD_TERPA', 'WD_TERPA2', 'WD_TERPK', 'WD_TERPAPAN','WD_TERPACID','WD_TERPA2PAN', 'WD_TERPACID2','WD_TERPACID3','WD_TERPA3PAN','WD_TERPOOHL','WD_TERPA3', 'WD_APIN','WD_BPIN','WD_LIMON','WD_MYRC' diff --git a/bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml b/bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml index 2fe99cb0eb..29c41758ca 100644 --- a/bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml +++ b/bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml @@ -41,8 +41,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1,30,365,240,240,480,365,73,30 diff --git a/bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml b/bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml index 9da740a7ae..f096415e31 100644 --- a/bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml +++ b/bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml @@ -47,8 +47,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1, 5, 20, 40, 120, 240, 365, 73, 365 diff --git a/bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml b/bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml index 24b55facc2..fbd7423680 100644 --- a/bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml @@ -46,8 +46,6 @@ CYCLICAL 1850 -'noy', 'nhx' - 1, 30, 120, 240, 240, 480, 365, 73, 30 diff --git a/bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml b/bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml index 042a153fe4..3bc7948bce 100644 --- a/bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml @@ -40,8 +40,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1, 30, 120, 240, 240, 480, 365, 73, 30 diff --git a/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml b/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml index 691150a417..77184615a1 100644 --- a/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml @@ -88,11 +88,7 @@ 'UTEND4', 'UTEND5', 'FRONTGF', 'FRONTGFA', 'EKGW', 'QNO', 'QRLNLTE', 'QRL_TOT', 'DUV', 'DVV', 'TTPXMLC' - -lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc -share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc -1850 -1850 -1 + +1850 diff --git a/bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml b/bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml index 86e6af3bab..eefbf88163 100644 --- a/bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml @@ -45,8 +45,6 @@ CYCLICAL 1850 -'noy', 'nhx' - 1, 5, 20, 40, 120, 240, 365, 73, 365 diff --git a/bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml b/bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml index efc485e990..fa5848ea40 100644 --- a/bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml @@ -242,8 +242,6 @@ 'so4_a2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/CMIP6_emissions_2000climo_2deg/emissions-cmip6_so4_a2_anthro-res_surface_2000climo_1.9x2.5_c20200422.nc' -'noy', 'nhx' - 1, 5, 20, 40, 120, 240, 365, 73, 365 diff --git a/bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml b/bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml index fa65883ce1..ee6715c914 100644 --- a/bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml @@ -142,8 +142,6 @@ 'so4_a2 -> $INPUTDATA_ROOT/atm/cam/chem/emis/CMIP6_emissions_2010climo/emissions-cmip6_so4_a2_anthro-res_surface_2010climo_0.9x1.25_c20180918.nc' -'noy', 'nhx' - 1, 5, 20, 40, 120, 240, 365, 73, 365 diff --git a/bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml b/bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml index 00fb808a52..623d08bc95 100644 --- a/bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml +++ b/bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml @@ -38,8 +38,6 @@ INTERP_MISSING_MONTHS -'noy', 'nhx' - 1, 5, 20, 40, 120, 240, 365, 73, 365 From e106d4ff450bf1e6715f158ea1122c6561749f47 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 9 Jan 2025 08:32:04 -0700 Subject: [PATCH 10/15] update ChangeLog --- doc/ChangeLog | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index b535adc98e..5ebbb9ada8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -12,7 +12,8 @@ Purpose of changes (include the issue number and title text for each relevant Gi surface models through the NUOPC mediator. This sets the nitrogen deposition fluxes to prescribed CDEP input stream fluxes if corresponding namelist options are set. Otherwise, the nitrogen deposition fluxes set to chemistry computed fluxes if the chemistry is capable - of providing the fluxes. (Github issue #1196) + of providing the fluxes. Deprecated ndep_list option in drv_flds_in has beed removed. + (Github issue #1196) Describe any changes made to build system: @@ -34,11 +35,13 @@ M bld/build-namelist - change how default ndep_stream namelist options are set . check if chemistry is capable of producing nitrogen deposition fluxes . set defaults only if not simple physics nor aqua-planet configuration + . pass sim_year to add_default to select appriate stream_ndep settings M bld/namelist_files/namelist_defaults_cam.xml - - default ndep_stream namelist settings for perpetual year 2000 configuration + - add default ndep_stream namelist settings M bld/namelist_files/namelist_definition.xml + - remote deprecated ndep_list namelist variable - updates to stream_ndep_* namelist descriptions M bld/namelist_files/use_cases/1850_cam_lt.xml @@ -48,7 +51,30 @@ M bld/namelist_files/use_cases/hist_cam_lt.xml M bld/namelist_files/use_cases/hist_cam_mt.xml M bld/namelist_files/use_cases/sd_cam6.xml M bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml - - stream_ndep_* namelist settings for use cases + - added sim_year + +M bld/namelist_files/use_cases/hist_cam6.xml + - changed sim_year to "1850-2015" + +M bld/namelist_files/use_cases/2000_geoschem.xml +M bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml +M bld/namelist_files/use_cases/2010_geoschem.xml +M bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml +M bld/namelist_files/use_cases/hist_geoschem.xml +M bld/namelist_files/use_cases/hist_geoschem_nudged.xml +M bld/namelist_files/use_cases/hist_trop_strat_nudged_cam6.xml +M bld/namelist_files/use_cases/hist_trop_strat_vbsext_cam6.xml +M bld/namelist_files/use_cases/hist_trop_strat_vbsfire_cam6.xml +M bld/namelist_files/use_cases/sd_trop_strat2_cam6.xml +M bld/namelist_files/use_cases/sd_trop_strat_vbs_cam6.xml +M bld/namelist_files/use_cases/sd_waccm_tsmlt_cam6.xml +M bld/namelist_files/use_cases/waccm_ma_1850_cam6.xml +M bld/namelist_files/use_cases/waccm_ma_hist_cam6.xml +M bld/namelist_files/use_cases/waccm_tsmlt_1850_cam6.xml +M bld/namelist_files/use_cases/waccm_tsmlt_2000_cam6.xml +M bld/namelist_files/use_cases/waccm_tsmlt_2010_cam6.xml +M bld/namelist_files/use_cases/waccm_tsmlt_hist_cam6.xml + - removed deprecated ndep_list M cime_config/buildnml - remove the use of CAM_STREAM_NDEP* xml vars to set stream_ndep* namelist options From b30e9485906eabc06e59d6d4d09eb0e4a8ee7006 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 9 Jan 2025 12:43:11 -0700 Subject: [PATCH 11/15] add sim_year valid values of 2010 and 1850-2015 modified: bld/namelist_files/namelist_definition.xml --- bld/namelist_files/namelist_definition.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index 4aaa038224..86f993a93d 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -8763,7 +8763,7 @@ Default: "." + 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. From 450312bd22f091613c754a761a56dfcd89976561 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Wed, 15 Jan 2025 09:04:39 -0700 Subject: [PATCH 12/15] Add sim_year to geoschem use case files; ChangeLog updates modified: bld/build-namelist modified: bld/namelist_files/use_cases/2010_geoschem.xml modified: bld/namelist_files/use_cases/hist_geoschem.xml modified: bld/namelist_files/use_cases/hist_geoschem_nudged.xml modified: doc/ChangeLog --- bld/build-namelist | 2 +- bld/namelist_files/use_cases/2010_geoschem.xml | 2 ++ bld/namelist_files/use_cases/hist_geoschem.xml | 2 ++ .../use_cases/hist_geoschem_nudged.xml | 2 ++ doc/ChangeLog | 12 ++++++++++-- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bld/build-namelist b/bld/build-namelist index 7a66796964..6c14b26bbd 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -701,7 +701,7 @@ if ($sim_year =~ /(\d+)-(\d+)/) { # 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) { + 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); diff --git a/bld/namelist_files/use_cases/2010_geoschem.xml b/bld/namelist_files/use_cases/2010_geoschem.xml index 36c6eea697..8f50e0321d 100644 --- a/bld/namelist_files/use_cases/2010_geoschem.xml +++ b/bld/namelist_files/use_cases/2010_geoschem.xml @@ -165,4 +165,6 @@ 'so4_a3', +2010 + diff --git a/bld/namelist_files/use_cases/hist_geoschem.xml b/bld/namelist_files/use_cases/hist_geoschem.xml index 2b3a158400..587ec4c1a4 100644 --- a/bld/namelist_files/use_cases/hist_geoschem.xml +++ b/bld/namelist_files/use_cases/hist_geoschem.xml @@ -161,4 +161,6 @@ 'so4_a3', +1850-2015 + diff --git a/bld/namelist_files/use_cases/hist_geoschem_nudged.xml b/bld/namelist_files/use_cases/hist_geoschem_nudged.xml index 51105cd460..6d6e94c6c5 100644 --- a/bld/namelist_files/use_cases/hist_geoschem_nudged.xml +++ b/bld/namelist_files/use_cases/hist_geoschem_nudged.xml @@ -216,4 +216,6 @@ 'so4_a3', +1850-2015 + diff --git a/doc/ChangeLog b/doc/ChangeLog index 5ebbb9ada8..18463609ac 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -12,9 +12,12 @@ Purpose of changes (include the issue number and title text for each relevant Gi surface models through the NUOPC mediator. This sets the nitrogen deposition fluxes to prescribed CDEP input stream fluxes if corresponding namelist options are set. Otherwise, the nitrogen deposition fluxes set to chemistry computed fluxes if the chemistry is capable - of providing the fluxes. Deprecated ndep_list option in drv_flds_in has beed removed. + of providing the fluxes. Deprecated ndep_list option in drv_flds_in has been removed. (Github issue #1196) + Currently there are no SSP scenario type compsets in CESM3 that use CAM atmosphere component. + Therefore, the specifications of the NDEP stream files for the SSP compsets are carried forward. + Describe any changes made to build system: Describe any changes made to the namelist: @@ -56,9 +59,14 @@ M bld/namelist_files/use_cases/waccm_sc_1850_cam6.xml M bld/namelist_files/use_cases/hist_cam6.xml - changed sim_year to "1850-2015" +M bld/namelist_files/use_cases/2010_geoschem.xml +M bld/namelist_files/use_cases/hist_geoschem.xml +M bld/namelist_files/use_cases/hist_geoschem_nudged.xml + - added sim_year + - removed deprecated ndep_list + M bld/namelist_files/use_cases/2000_geoschem.xml M bld/namelist_files/use_cases/2000_trop_strat_vbs_cam6.xml -M bld/namelist_files/use_cases/2010_geoschem.xml M bld/namelist_files/use_cases/2010_trop_strat_vbs_cam6.xml M bld/namelist_files/use_cases/hist_geoschem.xml M bld/namelist_files/use_cases/hist_geoschem_nudged.xml From c819813d8713daa89fd72128164915a02aab1fd3 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 16 Jan 2025 09:13:48 -0700 Subject: [PATCH 13/15] adjust sim_years for co2_cycle file defaults modified: bld/namelist_files/namelist_defaults_cam.xml --- bld/namelist_files/namelist_defaults_cam.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_cam.xml b/bld/namelist_files/namelist_defaults_cam.xml index bf9105db4a..3dfdca36f2 100644 --- a/bld/namelist_files/namelist_defaults_cam.xml +++ b/bld/namelist_files/namelist_defaults_cam.xml @@ -690,13 +690,13 @@ atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc -atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc +atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_1.9x2.5_c20181011.nc ac_CO2_filelist_175001-201512_fv_0.9x1.25_c20181011.txt ac_CO2_filelist_175001-201512_fv_1.9x2.5_c20181011.txt From fa37cb5e0cef6626ba89615ebe23d63ca975a197 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 16 Jan 2025 17:25:35 -0700 Subject: [PATCH 14/15] ChangeLog update --- doc/ChangeLog | 71 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 71107e68e2..a6428bdc91 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,10 +1,10 @@ =============================================================== -Tag name: cam6_4_??? +Tag name: cam6_4_056 Originator(s): fvitt Date: -One-line Summary: -Github PR URL: +One-line Summary: Nitrogen depostion fluxes to surface models +Github PR URL: https://github.com/ESCOMP/CAM/pull/1216 Purpose of changes (include the issue number and title text for each relevant GitHub issue): @@ -18,19 +18,21 @@ Purpose of changes (include the issue number and title text for each relevant Gi Currently there are no SSP scenario type compsets in CESM3 that use CAM atmosphere component. Therefore, the specifications of the NDEP stream files for the SSP compsets are carried forward. -Describe any changes made to build system: +Describe any changes made to build system: N/A Describe any changes made to the namelist: -List any changes to the defaults for the boundary datasets: + Removed ndep_list drv_flds_in namelist variable -Describe any substantial timing or memory changes: +List any changes to the defaults for the boundary datasets: N/A -Code reviewed by: +Describe any substantial timing or memory changes: N/A -List all files eliminated: +Code reviewed by: brian-eaton, cacraigucar -List all files added and what they do: +List all files eliminated: N/A + +List all files added and what they do: N/A List all existing files that have been modified, and describe the changes: @@ -132,7 +134,58 @@ appropriate machine below. All failed tests must be justified. derecho/intel/aux_cam: + FAIL ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s + DIFF SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h + - pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856 + + FAIL SMS_D_Ln9.f19_f19_mg17.FXHIST.derecho_intel.cam-outfrq9s_amie + FAIL SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s + - pre-existing failures due to build-namelist error requiring CLM/CTSM external update + + NLFAIL ERC_D_Ln9.f19_f19_mg17.QPC6.derecho_intel.cam-outfrq3s_cosp + NLFAIL ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s + NLFAIL ERC_D_Ln9.f19_f19_mg17.QPX2000.derecho_intel.cam-outfrq3s + NLFAIL ERC_D_Ln9.ne16_ne16_mg17.FADIAB.derecho_intel.cam-terminator + NLFAIL ERC_D_Ln9.ne16_ne16_mg17.QPC5HIST.derecho_intel.cam-outfrq3s_usecase + NLFAIL ERC_D_Ln9_P144x1.ne16pg3_ne16pg3_mg17.QPC6HIST.derecho_intel.cam-outfrq3s_ttrac_usecase + NLFAIL ERC_D_Ln9.T42_T42_mg17.FDABIP04.derecho_intel.cam-outfrq3s_usecase + NLFAIL ERC_D_Ln9.T42_T42_mg17.FHS94.derecho_intel.cam-outfrq3s_usecase + NLFAIL ERI_D_Ln18.f45_f45_mg37.QPC41850.derecho_intel.cam-co2rmp_usecase + NLFAIL ERP_D_Ln9.ne30pg3_ne30pg3_mg17.QPLT.derecho_intel.cam-outfrq3s_cosp + NLFAIL ERP_D_Ln9.ne30pg3_ne30pg3_mg17.QPMT.derecho_intel.cam-outfrq9s + NLFAIL ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s + NLFAIL ERS_Ln9.ne0TESTONLYne5x4_ne0TESTONLYne5x4_mg37.FADIAB.derecho_intel.cam-outfrq3s_refined + NLFAIL SCT_D_Ln7.ne3_ne3_mg37.QPC5.derecho_intel.cam-scm_prep + NLFAIL SCT_D_Ln7.T42_T42_mg17.QPC5.derecho_intel.cam-scm_prep + NLFAIL SMS_D_Ld2.f19_f19_mg17.QPC5HIST.derecho_intel.cam-volc_usecase + NLFAIL SMS_D_Ln9.f19_f19_mg17.QPC5M7.derecho_intel.cam-outfrq9s + NLFAIL SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s + - expected namelist compare failures due to removal of stream_ndep namelist opts + + DIFF ERP_Ld3.f09_f09_mg17.FWHIST.derecho_intel.cam-reduced_hist1d + DIFF ERP_Ld3.ne30pg3_ne30pg3_mg17.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa + DIFF ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h + DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s + DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s + DIFF ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s + DIFF ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s + DIFF SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday + DIFF SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s + DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s + DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 + DIFF SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase + DIFF SMS_D_Ln9.ne16pg3_ne16pg3_mg17.FX2000.derecho_intel.cam-outfrq9s + DIFF SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mg17.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust + DIFF SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d + DIFF SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d + DIFF SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d + DIFF SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s + DIFF SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp + - expected differences due to currections to ndep fluxes + derecho/nvhpc/aux_cam: + FAIL ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default COMPARE_base_rest + - pre-existing failure -- issue #1220 izumi/nag/aux_cam: From 4328f4e7fada667a33b20df7febd5d781a80b255 Mon Sep 17 00:00:00 2001 From: Francis Vitt Date: Thu, 16 Jan 2025 19:22:20 -0700 Subject: [PATCH 15/15] ChangeLog update --- doc/ChangeLog | 94 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 23 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index a6428bdc91..d9a7a43b73 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,7 +2,7 @@ Tag name: cam6_4_056 Originator(s): fvitt -Date: +Date: 16 Jan 2025 One-line Summary: Nitrogen depostion fluxes to surface models Github PR URL: https://github.com/ESCOMP/CAM/pull/1216 @@ -184,36 +184,84 @@ derecho/intel/aux_cam: - expected differences due to currections to ndep fluxes derecho/nvhpc/aux_cam: + FAIL ERS_Ln9.ne30pg3_ne30pg3_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s_gpu_default COMPARE_base_rest - pre-existing failure -- issue #1220 izumi/nag/aux_cam: -izumi/gnu/aux_cam: - -CAM tag used for the baseline comparison tests if different than previous -tag: - -Summarize any changes to answers, i.e., -- what code configurations: -- what platforms/compilers: -- nature of change (roundoff; larger than roundoff but same climate; new - climate): - -If bitwise differences were observed, how did you show they were no worse -than roundoff? + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-carma_sea_salt + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_cosp + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_subcol + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_am + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_cospsathist + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s + NLFAIL ERC_D_Ln9.f10_f10_mg37.QSPCAMS.izumi_nag.cam-outfrq3s + NLFAIL ERC_D_Ln9.mpasa480z32_mpasa480.FHS94.izumi_nag.cam-outfrq3s_usecase + NLFAIL ERC_D_Ln9.ne16_ne16_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase + NLFAIL ERC_D_Ln9.ne16pg3_ne16pg3_mg17.QPC4.izumi_nag.cam-outfrq3s_usecase + NLFAIL ERC_D_Ln9.ne5_ne5_mg37.QPC5.izumi_nag.cam-outfrq3s_ttrac + NLFAIL ERC_D_Ln9.T5_T5_mg37.QPC4.izumi_nag.cam-outfrq3s_usecase + NLFAIL ERI_D_Ln18.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_eoyttrac + NLFAIL ERI_D_Ln18.f19_f19_mg17.QPC6.izumi_nag.cam-ghgrmp_e8 + NLFAIL ERI_D_Ln18.ne5_ne5_mg37.FADIAB.izumi_nag.cam-outfrq3s_bwic + NLFAIL ERI_D_Ln18.ne5pg3_ne5pg3_mg37.FADIAB.izumi_nag.cam-outfrq3s_bwic + NLFAIL ERP_Ln9.ne5pg3_ne5pg3_mg37.QPC6.izumi_nag.cam-outfrq9s_clubbmf + NLFAIL ERS_Ln27.ne5pg3_ne5pg3_mg37.FKESSLER.izumi_nag.cam-outfrq9s + NLFAIL ERS_Ln9.ne5_ne5_mg37.FADIAB.izumi_nag.cam-outfrq9s + NLFAIL PEM_D_Ln9.ne5_ne5_mg37.FADIAB.izumi_nag.cam-outfrq3s + NLFAIL PLB_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal0 + NLFAIL PLB_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal1 + NLFAIL PLB_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal3 + NLFAIL PLB_D_Ln9.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal0 + NLFAIL PLB_D_Ln9.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal1 + NLFAIL PLB_D_Ln9.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal3 + NLFAIL SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s + NLFAIL SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem + NLFAIL SMS_D_Ln7.T42_T42_mg17.QPSCAMC5.izumi_nag.cam-scmarm + NLFAIL SMS_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-rad_diag_mam + NLFAIL SMS_D_Ln9.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_ba + NLFAIL SMS_D_Ln9_P1x1.ne5_ne5_mg37.FADIAB.izumi_nag.cam-outfrq3s + NLFAIL SMS_P48x1_D_Ln3.f09_f09_mg17.QPC6HIST.izumi_nag.cam-outfrq3s_co2cycle_usecase + NLFAIL SUB_D_Ln9.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s + NLFAIL TMC_D.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_eoyttrac + NLFAIL TMC_D.T5_T5_mg37.QPC5.izumi_nag.cam-ghgrmp_e8 + - expected namelist compare failures due to removal of stream_ndep namelist opts -If this tag changes climate describe the run(s) done to evaluate the new -climate in enough detail that it(they) could be reproduced, i.e., -- source tag (all code used must be in the repository): -- platform/compilers: -- configure commandline: -- build-namelist command (or complete namelist): -- MSS location of output: +izumi/gnu/aux_cam: + NLFAIL ERC_D_Ln9.f10_f10_mg37.FADIAB.izumi_gnu.cam-terminator + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC4.izumi_gnu.cam-outfrq3s_diags + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_gnu.cam-outfrq3s_unicon + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_gnu.cam-rad_diag + NLFAIL ERC_D_Ln9.f10_f10_mg37.QPSPCAMM.izumi_gnu.cam-outfrq3s + NLFAIL ERC_D_Ln9.ne5_ne5_mg37.QPC4.izumi_gnu.cam-outfrq3s_nudging_ne5_L26 + NLFAIL ERC_D_Ln9.ne5_ne5_mg37.QPC5.izumi_gnu.cam-outfrq3s_ba + NLFAIL ERC_D_Ln9.ne5pg2_ne5pg2_mg37.FADIAB.izumi_gnu.cam-outfrq3s + NLFAIL ERC_D_Ln9.ne5pg3_ne5pg3_mg37.FADIAB.izumi_gnu.cam-outfrq3s + NLFAIL ERI_D_Ln18.T5_T5_mg37.QPC4.izumi_gnu.cam-co2rmp + NLFAIL ERP_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s + NLFAIL ERP_D_Ln9.ne3pg3_ne3pg3_mg37.QPLT.izumi_gnu.cam-outfrq9s + NLFAIL ERP_D_Ln9.ne3pg3_ne3pg3_mg37.QPMT.izumi_gnu.cam-outfrq9s + NLFAIL ERP_Ln9.ne5_ne5_mg37.FHS94.izumi_gnu.cam-outfrq9s + NLFAIL ERP_Ln9.ne5_ne5_mg37.QPC5.izumi_gnu.cam-outfrq9s + NLFAIL ERP_Ln9_P24x2.f45_f45_mg37.QPWmaC6.izumi_gnu.cam-outfrq9s_mee_fluxes + NLFAIL PEM_D_Ln9.ne5pg3_ne5pg3_mg37.FADIAB.izumi_gnu.cam-outfrq3s + NLFAIL PLB_D_Ln9.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal0 + NLFAIL PLB_D_Ln9.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal1 + NLFAIL PLB_D_Ln9.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal3 + NLFAIL SCT_D_Ln7.ne3_ne3_mg37.QPC6.izumi_gnu.cam-scm_prep_c6 + NLFAIL SCT_D_Ln7.T42_T42_mg17.QPC4.izumi_gnu.cam-scm_prep + NLFAIL SCT_D_Ln7.T42_T42_mg17.QPC6.izumi_gnu.cam-scm_prep_c6 + NLFAIL SMS_D_Ln3.f10_f10_mg37.QPMOZ.izumi_gnu.cam-outfrq3s_chemproc + NLFAIL SMS_D_Ln9.f10_f10_mg37.QPWmaC4.izumi_gnu.cam-outfrq9s_apmee + NLFAIL SMS_D_Ln9.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-outfrq3s_ttrac + - expected namelist compare failures due to removal of stream_ndep namelist opts -MSS location of control simulations used to validate new climate: + DIFF SMS_P48x1_D_Ln9.f19_f19_mg17.FW4madSD.izumi_gnu.cam-outfrq9s + - expected differences due to currections to ndep fluxes -URL for AMWG diagnostics output used to validate new climate: +Summarize any changes to answers: bit-for-bit unchanged =============================================================== ===============================================================