Skip to content

EAMxx: Using DataInterpolation Class for surface emission part2 - #8615

Open
odiazib wants to merge 7 commits into
masterfrom
odiazib/eamxx/surface_land_use_w_datainterpolation_s
Open

EAMxx: Using DataInterpolation Class for surface emission part2#8615
odiazib wants to merge 7 commits into
masterfrom
odiazib/eamxx/surface_land_use_w_datainterpolation_s

Conversation

@odiazib

@odiazib odiazib commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Refactors the reader for fractional land use, marine organics, and soil erodibility to use the DataInterpolation class.

  • Refactored the reader for fractional land use, marine organics, and soil erodibility to use the DataInterpolation class.
  • Added new NetCDF files because the DataInterpolation class requires a time variable instead of date, which was used by the former reader for time interpolation.

Notes

mam4_srf_online_emiss_standalone_baseline_cmp
DIFF REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl_gnu.eamxx-L72 (phase BASELINE)

[non-BFB]

@github-actions

github-actions Bot commented Aug 7, 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-8615/

Built to branch gh-pages at 2026-08-26 19:44 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@odiazib
odiazib force-pushed the odiazib/eamxx/surface_land_use_w_datainterpolation_s branch from 9dc0064 to 5a23741 Compare August 24, 2026 20:19
@odiazib
odiazib force-pushed the odiazib/eamxx/surface_land_use_w_datainterpolation_s branch from 1625cd6 to 8f9a3f8 Compare August 25, 2026 15:26
@odiazib odiazib added non-BFB PR makes roundoff changes to answers. EAMxx C++ based E3SM atmosphere model (aka SCREAM) MAM4xx MAM4xx related changes labels Aug 25, 2026
@odiazib
odiazib marked this pull request as ready for review August 25, 2026 15:34
@odiazib
odiazib requested a balanced review from Copilot August 25, 2026 15:35

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

Refactors MAM surface-data readers to use the shared DataInterpolation infrastructure.

Changes:

  • Replaces fractional land-use, marine-organics, and soil-erodibility readers.
  • Removes obsolete reader implementations.
  • Updates marine-organics and emissions test data.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
components/eamxx/tests/single-process/mam/emissions/input.yaml Updates marine-organics input.
components/eamxx/tests/single-process/mam/emissions/CMakeLists.txt Fetches updated input.
components/eamxx/tests/multi-process/physics_only/mam/mam4_srf_online_emiss_mam4_constituent_fluxes/input.yaml Updates marine-organics input.
components/eamxx/tests/multi-process/physics_only/mam/mam4_srf_online_emiss_mam4_constituent_fluxes/CMakeLists.txt Updates required emissions inputs.
components/eamxx/src/physics/mam/readfiles/soil_erodibility.hpp Removes legacy interface.
components/eamxx/src/physics/mam/readfiles/soil_erodibility_impl.hpp Removes legacy implementation.
components/eamxx/src/physics/mam/readfiles/marine_organics.hpp Removes legacy interface.
components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp Removes legacy implementation.
components/eamxx/src/physics/mam/readfiles/fractional_land_use.hpp Removes legacy interface.
components/eamxx/src/physics/mam/readfiles/fractional_land_use_impl.hpp Removes legacy implementation.
components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.hpp Stores interpolation state and fields.
components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp Integrates shared interpolation readers.
components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.hpp Removes legacy reader state.
components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp Reads land-use data through DataInterpolation.
components/eamxx/cime_config/namelist_defaults_eamxx.xml Updates production marine-organics files.
Suppressed comments (1)

components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp:373

  • For dust_emis_scheme == 2, this allocates a separate view and leaves the newly declared computed soil_erodibility field unwritten. Any downstream consumer or diagnostic requesting that computed field will therefore receive uninitialized data even though the process uses ones internally. Fill the field-manager output and retain a const view of that allocation instead.
  } else if (dust_emis_scheme == 2) {
    // For dust emission scheme 2, override soil erodibility to 1
    auto soil_erod_ones = view_1d("soil_erod_ones", ncol_);
    Kokkos::deep_copy(soil_erod_ones, 1.0);
    soil_erodibility_ = soil_erod_ones;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp Outdated

@jeff-cohere jeff-cohere 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.

Looks good to me. I made a couple of suggestions to gather logic into methods/functions to declutter code a bit.

@bartgol bartgol 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.

Looks good. I agree with Jeff that factoring out those chunks of code may increase readability, but not a roadblocker...

@jeff-cohere

Copy link
Copy Markdown
Contributor

@odiazib , should we merge this to next today if possible?

@odiazib

odiazib commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

I think it is fine to merge this into next. However, I would like to make a few plots before merging it into master.

@jeff-cohere

Copy link
Copy Markdown
Contributor

Merged to next

@odiazib odiazib mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EAMxx C++ based E3SM atmosphere model (aka SCREAM) MAM4xx MAM4xx related changes non-BFB PR makes roundoff changes to answers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants