Skip to content

EAMxx: MAM4xx + DPxx#8517

Draft
odiazib wants to merge 8 commits into
masterfrom
odiazib/eamxx/mam4xx_dpxx
Draft

EAMxx: MAM4xx + DPxx#8517
odiazib wants to merge 8 commits into
masterfrom
odiazib/eamxx/mam4xx_dpxx

Conversation

@odiazib

@odiazib odiazib commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This PR adds the IOP remapper to the mam4xx process, enabling mam4xx to be used by DPxx. It also includes a test mod and updates the fractional_land_use_file nc file to contain the required lat and lon variables for the IOP remapper.
Additionally, the PR removes the restriction that the number of vertical levels in the source and target grids must be equal, as a vertical remapper is now applied within the mam4xx process.

@susburrows @meng630

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://E3SM-Project.github.io/E3SM/pr-preview/pr-8517/

Built to branch gh-pages at 2026-06-24 22:40 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates IOP-style horizontal remapping into several MAM4xx input
paths so MAM4xx can run under DPxx/IOP configurations, and updates associated
CIME testmod/defaults. It also removes the IOPRemapper constructor restriction
that source/target grids must have identical vertical level counts.

Changes:

  • Add IOP-lat/lon-based horizontal remapping support to MAM surface emissions,
    soil erodibility, marine organics, and fractional land-use readers.
  • Update MAM process interfaces to select IOP remapping when an IOP data manager
    is present (and forbid user-provided remap files in that mode).
  • Add a DPxx ARM97 testmod and update the default fractional land-use file path
    to a newer dataset.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
components/eamxx/src/share/remap/iop_remapper.cpp Removes vertical-level equality requirement (but currently introduces invalid C++ comment syntax).
components/eamxx/src/physics/mam/srf_emission.hpp Adds IOP lat/lon overloads for horizontal remapper creation and initialization.
components/eamxx/src/physics/mam/srf_emission_impl.hpp Implements IOP lat/lon remapper path using IOPRemapper and lat/lon geometry read from data.
components/eamxx/src/physics/mam/readfiles/soil_erodibility.hpp Adds IOP lat/lon overloads for remapper creation and initialization.
components/eamxx/src/physics/mam/readfiles/soil_erodibility_impl.hpp Implements IOPRemapper-based horizontal remap for soil erodibility.
components/eamxx/src/physics/mam/readfiles/marine_organics.hpp Adds IOP lat/lon overloads for marine organics remapping/initialization.
components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp Implements IOPRemapper-based horizontal remap for marine organics.
components/eamxx/src/physics/mam/readfiles/fractional_land_use.hpp Adds IOP lat/lon overloads for fractional land-use remapping/initialization.
components/eamxx/src/physics/mam/readfiles/fractional_land_use_impl.hpp Implements IOPRemapper-based horizontal remap for fractional land-use.
components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp Switches srf/online emissions file readers to IOP remap when IOP is active; forbids srf remap file in IOP.
components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp Uses DataInterpolation IOP remapper overload when IOP is active; forbids aero microphysics remap file in IOP.
components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp Switches fractional land-use remapping to IOP lat/lon path when IOP is active; forbids drydep remap file in IOP.
components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/mam4xx/dpxx_arm97/shell_commands Adds a CIME testmod to configure a DPxx/IOP ARM97 case with MAM4xx processes enabled.
components/eamxx/cime_config/namelist_defaults_eamxx.xml Updates default fractional_land_use_file dataset for ne30pg2.

Comment thread components/eamxx/src/share/remap/iop_remapper.cpp Outdated
@odiazib odiazib added BFB PR leaves answers BFB EAMxx C++ based E3SM atmosphere model (aka SCREAM) MAM4xx MAM4xx related changes labels Jun 24, 2026
@odiazib
odiazib requested review from bogensch and tcclevenger June 24, 2026 22:16
@odiazib
odiazib marked this pull request as ready for review June 24, 2026 22:16
Comment on lines +38 to +40
// Does the IOP mapper also perform vertical interpolation?
//EKAT_REQUIRE_MSG (src_grid->get_num_vertical_levels()==tgt_grid->get_num_vertical_levels(),
// "Error! IOP remapper requires src/tgt grid to have the same number of vertical levels.\n");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading from the "IOP file" requires vertical interpolation (see IOPDataManager::read_iop_file_data(), basically that file contains data needed by IOP internals and has different nlev values to the model), but the IOPRemapper is for taking a field with an ncol dimension and copying all the data from the icol with lat/lon closest to iop_lat/lon into every other column. So in the end, you have a field where every ncol entry is identical. So levels need to match.

Are you triggering this error condition?

data_grid->create_geometry_data("lat", data_grid->get_2d_scalar_layout()),
data_grid->create_geometry_data("lon", data_grid->get_2d_scalar_layout())
};
AtmosphereInput latlon_reader(data_file, data_grid, latlon);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartgol has #8507 which switches uses of AtmosphereInput for FieldReader. I think it make sense to start using FieldReader in this PR too. The changes should be minimal.

@odiazib
odiazib marked this pull request as draft June 25, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BFB PR leaves answers BFB EAMxx C++ based E3SM atmosphere model (aka SCREAM) MAM4xx MAM4xx related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants