EAMxx: Using DataInterpolation Class for surface emission part2 - #8615
EAMxx: Using DataInterpolation Class for surface emission part2#8615odiazib wants to merge 7 commits into
Conversation
|
9dc0064 to
5a23741
Compare
1625cd6 to
8f9a3f8
Compare
There was a problem hiding this comment.
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 computedsoil_erodibilityfield 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.
jeff-cohere
left a comment
There was a problem hiding this comment.
Looks good to me. I made a couple of suggestions to gather logic into methods/functions to declutter code a bit.
bartgol
left a comment
There was a problem hiding this comment.
Looks good. I agree with Jeff that factoring out those chunks of code may increase readability, but not a roadblocker...
|
@odiazib , should we merge this to |
|
I think it is fine to merge this into next. However, I would like to make a few plots before merging it into master. |
|
Merged to |
Refactors the reader for fractional land use, marine organics, and soil erodibility to use the
DataInterpolationclass.DataInterpolationclass.DataInterpolationclass requires a time variable instead of date, which was used by the former reader for time interpolation.Notes
DataInterpolationclass and the former reader.EAMxx: Use DataInterpolation for surface emissions #8430
mam4_srf_online_emiss_standalone_baseline_cmpDIFF REP_D_Ln5.ne4pg2_oQU480.F2010-EAMxx-MAM4xx.ghci-snl_gnu.eamxx-L72 (phase BASELINE)[non-BFB]