Skip to content

Commit 027902e

Browse files
Merge remote-tracking branch 'odiazib/eamxx/data_interpolation_microphysics' (PR #7501)
EAMxx: Data interpolation for MAM4 microphysics. Our current implementation of the reader for Linoz, invariants, and vertical emission files uses an approach based on the former SPA reader. @bartgol implemented the DataInterpolation class, which provides more flexibility to handle different types of files. Here, we are using this DataInterpolation class to read the necessary files for the MAM4 microphysics interface. Because MAM4 still uses the vertical interpolation from EAM (the ported version), I have added three new vertical interpolation types to this class and created a VerticalRemapperMAM4 class for MAM4 vertical interpolation. This PR also fixes the time interpolation issue for Linoz, invariant, and vertical emission fields. Because we will use single-year NetCDF files for elevated emissions, invariants, and Linoz, the following namelist parameters were deleted: mam4_linoz_ymd, mam4_oxid_ymd, and elevated_emiss_ymd. I implemented the VerticalRemapperMAM4 class, which inherits from VerticalRemapper, to invoke MAM4xx vertical interpolation routines that were ported from EAM. The DataInterpolation class handles VerticalRemapperMAM4 as a custom vertical remapper. In particular, VerticalRemapperMAM4 supports three types of vertical interpolation: Details 1. `VerticalRemapperMAM4::MAM4_PSRef` This is equivalent to `DataInterpolation::VRemapType::Dynamic3DRef`, where the source pressure field is computed as: psrc​(icol,k)=ps_v(icol)⋅hybm(k)+P0​⋅hyam(k) The main difference is that MAM4_PSRef invokes the mam4::vertical_interpolation::vert_interp routine. I added a boolean parameter, mam4_use_mam4xx_oxi_vert_remap, to allow users to switch between MAM4_PSRef and DataInterpolation::VRemapType::Dynamic3DRef. Currently, this parameter is hardcoded to true, meaning oxidant vertical interpolation will be performed using the MAM4xx routine. However, if the evaluation team is interested in testing the use of DataInterpolation::VRemapType::Dynamic3DRef, this parameter can be moved to the namelist. VerticalRemapperMAM4::MAM4_ZONAL This vertical interpolation type is similar to DataInterpolation::Static1D, where a 1D variable is used as the independent variable. In the case of MAM4_ZONAL, the independent variable is lev with units of mbar. The main difference is that MAM4_ZONAL invokes the mam4::vertical_interpolation::vert_interp routine. Note that in this case, unit conversion from mbar to Pascals is handled by mam4::vertical_interpolation::vert_interp. 3. VerticalRemapperMAM4::MAM4_ELEVATED_EMISSIONS This vertical interpolation type uses altitude as the independent variable. There is no equivalent in the VerticalRemapper for this case. Tests (DataInterpolation for elevated emissions) I tested this PR using only the DataInterpolation for elevated emissions. In this case, we expect the tests to pass, including baselines (BFB). However, I noted that the single-precision tests fail for gcc-openmp and gcc-cuda during the baseline comparison. Additionally, the test REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl-cpu_gnu is also failing in the baseline comparison. gcc-cuda/sp and gcc-openmp/sp Click to view detailed comparison Most of the standalone tests are passing, except for gcc-cuda/sp and gcc-openmp/sp. It is important to note that the double-precision tests are passing, which means this implementation using the DataInterpolation class is producing BFB results consistent with the former reader (using @TaufiqHassan's correction for time interpolation). REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl-cpu_gnu Click to view detailed comparison This test is failing with DIFFs, and these DIFFs increase as the number of time steps increases. I carefully reviewed this test and concluded that these DIFFs are very small in the first iteration. However, as MAM4 affects host model variables (in particular, temperature), these DIFFs increase over time. I conducted a couple of experiments where I ran both the old and new readers, and I found that the DIFFs remain small. For example: Sector BFB Hash Value forc_new_8_sector_0 12e765df7450c4b7 243788.7310767502 forc_old_8_sector_0 12e765df7450e328 243788.7310767502 forc_new_8_sector_1 4805cb37e8068d23 151464.7675245383 forc_old_8_sector_1 4805cb37e80691e7 151464.7675245383 forc_new_8_sector_2 3e98c5625d38c1fd 262341.6782332305 forc_old_8_sector_2 3e98c5625d38caa5 262341.6782332306 Using preprocessor directives (USE_OLD_LINOZ_FILE_READ and USE_OLD_VERTICAL_FILE_READ) was causing confusion for the evaluation team. Therefore, I decided to delete the former reader. Tests (DataInterpolation for both invariants and linoz) Before this PR, we knew there was a time interpolation issue inherited from the former SPA reader. Therefore, using the DataInterpolation class for invariants and Linoz will produce NBFB results in all tests where microphysics processes are involved. Thus, baseline tests are expected to fail for gcc-cuda, gcc-openmp, and REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl-cpu_gnu. During the testing of DataInterpolation for invariants and Linoz, we found a bug in the former reader and noted that the DataInterpolation class only works for files containing single-year data. The bug in the former reader involved selecting the wrong year for interpolation during a restart, which caused the restart to be NBFB. This bug was fixed by replacing the NetCDF files for oxidants and Linoz. The new files contain only single-year data to accommodate the current features of the DataInterpolation class. NC files Elevated emissions The DataInterpolation class relies on the time variable for time interpolation. In the elevated emission files currently used in the master branch, the time variable is not present. Instead, these files have the date variable. @meng630 helped add the time variable to these files. Note that we do not expect any changes due to these file updates. Invariants We are using new invariant files for the year 2015. We note that the current files do not contain data from 2010. Linoz We are using a single-year file for Linoz for the year 2010. In addition, we replaced the time variable and created a new time variable that does not assume years of 365 days and months of 30 days, which was causing interpolation issues in the DataInterpolation class. Note that the DataInterpolation class uses time instead of date for time interpolation. NBFB This PR introduces modifications that, in theory, should not produce significant changes and is expected to be a BFB PR. However, we have identified a few tests that are failing due to baseline comparisons. As a result, this PR will be classified as NBFB. These tests are failing because of the baselines: gcc-openmp/sp and gcc-cuda/dbg mam4_aero_microphys_standalone_baseline_cmp DIFF REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl-cpu_gnu.eamxx-L72 (phase BASELINE) Key Findings @singhbalwinder and @odiazib investigated the cause of the BFB behavior and found that the issues primarily arise from the alpha parameter involved in the linear interpolation. In the `DataInterpolation` class, our current implementation for reading tracers in `mam4xx` utilizes the following linear interpolation formula: x_interpolated = x1 * alpha + x2 * (1 - alpha) where: x1 is the value at time 1, x2 is the value at time 2, x_interpolated is the value at the current time, and alpha = (t_now - t1) / (t2 - t1). DIFFs in Standalone Tests: We noted that DIFFs in standalone tests are only present in the single precision cases (CUDA and OpenMP). In these instances, the alpha parameter is hard-coded to double in the DataInterpolation class, leading to the observed DIFFs. For reference, see the implementation here. Impact on t_now: In the case of REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl-cpu_gnu.eamxx-L72, we found that the changes in this PR are producing small variations in the value of t_now. These differences are in the last digits of t_now and propagate to alpha. [NBFB] * odiazib/eamxx/data_interpolation_microphysics: (29 commits) EAMxx:Fixes made after rebase. EAMxx: Add info to logger. EAMxx: Fixes after rebasing. EAMxx: Adding oxid_ to avoid conflicts with gases treated as tracers. EAMxx: Update linoz and oxid files in cmake and input.yaml. EAMxx: Removing unused code; including mam4_linoz_ymd, mam4_oxid_ymd, and elevated_emiss_ymd from namelist. EAMxx: Removing code from tracer_reader_utils. EAMxx: Deleting code for former reader (Linoz and invariants). EAMxx: Deleting code for former reader. EAMxx: Using one year files for linoz and invariants. EAMxx: Using z_mam4_int. EAMxx: Rename z_iface to z_int. EAMxx: Using (1,1,1) as ref_ts. EAMxx: Fixing after rebasing against master. EAMxx: Fixing variable names and add comments. EAMxx: Do not run test on AT2. EAMxx: Removing unused code. EAMx: Fixing dynamics_physics test for microphysics. EAMxx: Adding z_iface to namelist. EAMxx: Adding z_iface : 0.0 to yaml file in standalone tests. ...
2 parents 10a423d + 0b7ff29 commit 027902e

File tree

28 files changed

+481
-1113
lines changed

28 files changed

+481
-1113
lines changed

components/eamxx/cime_config/namelist_defaults_eamxx.xml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -319,43 +319,39 @@ be lost if SCREAM_HACK_XML is not enabled.
319319
<mam4_o3_sfc type="real" doc="Linoz surface parameter">3.0E-008</mam4_o3_sfc>
320320
<mam4_o3_lbl type="integer" doc="Linoz lbl parameter">4</mam4_o3_lbl>
321321
<mam4_psc_T type="real" doc="Linoz psc ozone loss temperature (K) threshold">193.0</mam4_psc_T>
322-
<mam4_linoz_ymd type="integer" > 20100101</mam4_linoz_ymd>
323322
<mam4_linoz_file_name type="file" doc="LINOZ chemistry file"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/linoz/ne30pg2/linoz2010_2010JPL_CMIP6_10deg_58km_ne30pg2_c20250826.nc</mam4_linoz_file_name>
324323
<mam4_linoz_file_name hgrid="ne4np4.pg2" type="file" doc="LINOZ chemistry file"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/linoz/ne4pg2/linoz2010_2010JPL_CMIP6_10deg_58km_ne4pg2_c20250826.nc</mam4_linoz_file_name>
325324
<!--Invariants-->
326-
<mam4_oxid_ymd type="integer" > 20150101 </mam4_oxid_ymd>
327325
<mam4_oxid_file_name type="file" doc="File containing oxidants data">${DIN_LOC_ROOT}/atm/scream/mam4xx/invariants/ne30pg2/oxid_1.9x2.5_L26_2015_ne30pg2_c20250813.nc</mam4_oxid_file_name>
328326
<mam4_oxid_file_name hgrid="ne4np4.pg2" type="file" doc="File containing oxidants data">${DIN_LOC_ROOT}/atm/scream/mam4xx/invariants/ne4pg2/oxid_1.9x2.5_L26_2015_ne4pg2_c20250813.nc</mam4_oxid_file_name>
329327
<mam4_chlorine_loading_ymd type="integer" doc="Cycle year for chlorine"> 20100101 </mam4_chlorine_loading_ymd>
330328
<mam4_linoz_chlorine_file type="file" doc="File containing chlorine data"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/linoz/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc</mam4_linoz_chlorine_file>
331329
<!--Photolysis-->
332330
<mam4_rsf_file type="file" doc="File containing photolysis data"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/photolysis/RSF_GT200nm_v3.0_c080811.nc</mam4_rsf_file>
333331
<mam4_xs_long_file type="file" doc="File containing photolysis data"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/photolysis/temp_prs_GT200nm_JPL10_c130206.nc</mam4_xs_long_file>
334-
<!--Elevated emissions-->
335-
<elevated_emiss_ymd type="integer"> 20100101 </elevated_emiss_ymd>
336332
<!--Dry gas deposition-->
337333
<mam4_season_wes_file type="file" doc="File containing season_wes data"> ${DIN_LOC_ROOT}/atm/scream/mam4xx/drydep/season_wes.nc</mam4_season_wes_file>
338334
<!-- For all other grids -->
339-
<mam4_so2_elevated_emiss_file_name type="file" doc="elevated emissions for so2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so2_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_so2_elevated_emiss_file_name>
340-
<mam4_so4_a1_elevated_emiss_file_name type="file" doc="elevated emissions for so4_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so4_a1_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_so4_a1_elevated_emiss_file_name>
341-
<mam4_so4_a2_elevated_emiss_file_name type="file" doc="elevated emissions for ao4_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so4_a2_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_so4_a2_elevated_emiss_file_name>
342-
<mam4_pom_a4_elevated_emiss_file_name type="file" doc="elevated emissions for pom_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_pom_a4_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_pom_a4_elevated_emiss_file_name>
343-
<mam4_bc_a4_elevated_emiss_file_name type="file" doc="elevated emissions for bc_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_bc_a4_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_bc_a4_elevated_emiss_file_name>
344-
<mam4_num_a1_elevated_emiss_file_name type="file" doc="elevated emissions for num_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a1_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_num_a1_elevated_emiss_file_name>
345-
<mam4_num_a2_elevated_emiss_file_name type="file" doc="elevated emissions for num_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a2_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_num_a2_elevated_emiss_file_name>
346-
<mam4_num_a4_elevated_emiss_file_name type="file" doc="elevated emissions for num_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a4_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_num_a4_elevated_emiss_file_name>
347-
<mam4_soag_elevated_emiss_file_name type="file" doc="elevated emissions for soag">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_soag_elev_1x1_2010_clim_ne30pg2_c20241008.nc</mam4_soag_elevated_emiss_file_name>
335+
<mam4_so2_elevated_emiss_file_name type="file" doc="elevated emissions for so2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so2_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_so2_elevated_emiss_file_name>
336+
<mam4_so4_a1_elevated_emiss_file_name type="file" doc="elevated emissions for so4_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so4_a1_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_so4_a1_elevated_emiss_file_name>
337+
<mam4_so4_a2_elevated_emiss_file_name type="file" doc="elevated emissions for ao4_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_so4_a2_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_so4_a2_elevated_emiss_file_name>
338+
<mam4_pom_a4_elevated_emiss_file_name type="file" doc="elevated emissions for pom_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_pom_a4_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_pom_a4_elevated_emiss_file_name>
339+
<mam4_bc_a4_elevated_emiss_file_name type="file" doc="elevated emissions for bc_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_bc_a4_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_bc_a4_elevated_emiss_file_name>
340+
<mam4_num_a1_elevated_emiss_file_name type="file" doc="elevated emissions for num_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a1_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_num_a1_elevated_emiss_file_name>
341+
<mam4_num_a2_elevated_emiss_file_name type="file" doc="elevated emissions for num_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a2_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_num_a2_elevated_emiss_file_name>
342+
<mam4_num_a4_elevated_emiss_file_name type="file" doc="elevated emissions for num_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_num_a4_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_num_a4_elevated_emiss_file_name>
343+
<mam4_soag_elevated_emiss_file_name type="file" doc="elevated emissions for soag">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne30pg2/elevated/cmip6_mam4_soag_elev_1x1_2010_clim_ne30pg2_c20250630.nc</mam4_soag_elevated_emiss_file_name>
348344

349345
<!-- For ne4 grids -->
350-
<mam4_so2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so2_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_so2_elevated_emiss_file_name>
351-
<mam4_so4_a1_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so4_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so4_a1_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_so4_a1_elevated_emiss_file_name>
352-
<mam4_so4_a2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so4_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so4_a2_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_so4_a2_elevated_emiss_file_name>
353-
<mam4_pom_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for pom_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_pom_a4_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_pom_a4_elevated_emiss_file_name>
354-
<mam4_bc_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for bc_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_bc_a4_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_bc_a4_elevated_emiss_file_name>
355-
<mam4_num_a1_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a1_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_num_a1_elevated_emiss_file_name>
356-
<mam4_num_a2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a2_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_num_a2_elevated_emiss_file_name>
357-
<mam4_num_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a4_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_num_a4_elevated_emiss_file_name>
358-
<mam4_soag_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for soag">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_soag_elev_1x1_2010_clim_ne4pg2_c20241008.nc</mam4_soag_elevated_emiss_file_name>
346+
<mam4_so2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so2_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_so2_elevated_emiss_file_name>
347+
<mam4_so4_a1_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so4_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so4_a1_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_so4_a1_elevated_emiss_file_name>
348+
<mam4_so4_a2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for so4_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_so4_a2_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_so4_a2_elevated_emiss_file_name>
349+
<mam4_pom_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for pom_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_pom_a4_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_pom_a4_elevated_emiss_file_name>
350+
<mam4_bc_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for bc_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_bc_a4_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_bc_a4_elevated_emiss_file_name>
351+
<mam4_num_a1_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a1">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a1_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_num_a1_elevated_emiss_file_name>
352+
<mam4_num_a2_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a2">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a2_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_num_a2_elevated_emiss_file_name>
353+
<mam4_num_a4_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for num_a4">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_num_a4_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_num_a4_elevated_emiss_file_name>
354+
<mam4_soag_elevated_emiss_file_name hgrid="ne4np4.pg2" type="file" doc="elevated emissions for soag">${DIN_LOC_ROOT}/atm/scream/mam4xx/emissions/ne4pg2/elevated/cmip6_mam4_soag_elev_1x1_2010_clim_ne4pg2_c20250701.nc</mam4_soag_elevated_emiss_file_name>
359355

360356
<!-- Mapping Files for finer resolutions -->
361357
<aero_microphys_remap_file type="file" doc="File containing mapping data from the grid of frac land use files to the model grid. Unused if the grid is the same.">none</aero_microphys_remap_file>
@@ -711,6 +707,7 @@ be lost if SCREAM_HACK_XML is not enabled.
711707
<num_c2 type="real">0.0</num_c2>
712708
<num_c3 type="real">0.0</num_c3>
713709
<num_c4 type="real">0.0</num_c4>
710+
<z_mam4_int type="real">0.0</z_mam4_int>
714711
<!-- Surface fluxes for the land model from MAM4xx wet scavenging-->
715712
<wetdep_hydrophilic_bc type="real">1e-5</wetdep_hydrophilic_bc>
716713
<drydep_hydrophilic_bc type="real">1e-5</drydep_hydrophilic_bc>

components/eamxx/src/physics/mam/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ add_subdirectory(${EXTERNALS_SOURCE_DIR}/mam4xx ${CMAKE_BINARY_DIR}/externals/ma
4141

4242
# EAMxx mam4xx-based atmospheric processes
4343
add_library(mam
44+
readfiles/vertical_remapper_mam4.cpp
4445
eamxx_mam_generic_process_interface.cpp
4546
eamxx_mam_microphysics_process_interface.cpp
4647
${SCREAM_BASE_DIR}/src/physics/rrtmgp/shr_orb_mod_c2f.F90

components/eamxx/src/physics/mam/eamxx_mam_generic_process_interface.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void MAMGenericInterface::add_tracers_interstitial_aerosol() {
170170
// ================================================================
171171

172172
void MAMGenericInterface::add_tracers_gases() {
173-
//Note that the gas list in MAM4 is:
173+
//Note that the gas list in MAM4 is:
174174
//{"O3", "H2O2", "H2SO4", "SO2", "DMS", "SOAG"}
175175
using namespace ekat::units;
176176
constexpr auto q_unit = kg / kg; // units of mass mixing ratios of tracers
@@ -356,7 +356,7 @@ void MAMGenericInterface::populate_dry_atm(mam_coupling::DryAtmosphere &dry_atm,
356356
dry_atm.dz = buffer.dz;
357357

358358
// geopotential height above surface at interface levels (m)
359-
dry_atm.z_iface = buffer.z_iface;
359+
dry_atm.z_iface = get_field_out("z_mam4_int").get_view< Real **>();
360360

361361
// geopotential height above surface at mid levels (m)
362362
dry_atm.z_mid = buffer.z_mid;
@@ -426,6 +426,9 @@ void MAMGenericInterface::add_fields_dry_atm() {
426426

427427
// cloud fraction [nondimensional] computed by eamxx_cld_fraction_process
428428
add_field<Required>("cldfrac_tot", scalar3d_mid, nondim, grid_name);
429+
430+
// geopotential height above surface at interface levels (m)
431+
add_field<Updated>("z_mam4_int", scalar3d_int, m, grid_name);
429432
}
430433

431434
// ================================================================

0 commit comments

Comments
 (0)