EAMxx: add log-linear interpolation option to VerticalRemapper and FieldAtPressureLevel diagnostic#8376
EAMxx: add log-linear interpolation option to VerticalRemapper and FieldAtPressureLevel diagnostic#8376bartgol wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a log-linear vertical interpolation option (interpolating in
log-pressure space) to EAMxx vertical remapping and the FieldAtPressureLevel
diagnostic, and wires the option through IO stream configuration and selected
data-interpolation call sites.
Changes:
- Extend
VerticalRemapperwith an interpolation type (linearvslog-linear)
and log-transform support for pressure coordinate fields. - Thread a
vert_interpolation_typestream parameter through Scorpio output and
create_diagnostic, enabling log-linear pressure-level diagnostics. - Update unit/integration tests and multi-process output configs to preserve
existing behavior by explicitly selectinglinearwhere needed.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| components/eamxx/tests/multi-process/physics_only/shoc_p3_nudging/output_remapped.yaml | Pins stream vertical interpolation to linear for test stability. |
| components/eamxx/tests/multi-process/dynamics_physics/mam/homme_shoc_cld_spa_p3_rrtmgp_mam4_wetscav/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/mam/homme_shoc_cld_p3_mam_optics_rrtmgp/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/mam/homme_shoc_cld_mam_aci_p3_mam_optics_rrtmgp_mam_drydep/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_128levels/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_p3_rrtmgp_pg2/output.yaml | Pins stream vertical interpolation to linear. |
| components/eamxx/src/share/remap/vertical_remapper.hpp | Adds InterpType, log-pressure helper, and refactors pressure/coord storage by vertical tag. |
| components/eamxx/src/share/remap/vertical_remapper.cpp | Implements log-linear coordinate handling, tag-based LinInterp setup, and per-tag remap dispatch. |
| components/eamxx/src/share/remap/tests/vertical_remapper_tests.cpp | Updates pressure setup API usage and adds a log-linear remapper equivalence test. |
| components/eamxx/src/share/io/tests/io_remap_test.cpp | Adds a log-linear vertical remap integration path and adjusts numeric comparisons. |
| components/eamxx/src/share/io/scorpio_output.hpp | Stores per-stream vert_interpolation_type. |
| components/eamxx/src/share/io/scorpio_output.cpp | Reads vert_interpolation_type, configures VerticalRemapper and forwards to diagnostics creation. |
| components/eamxx/src/share/io/eamxx_io_utils.hpp | Extends create_diagnostic with vert_interp_type parameter. |
| components/eamxx/src/share/io/eamxx_io_utils.cpp | Forwards vert_interpolation_type into FieldAtPressureLevel params. |
| components/eamxx/src/share/diagnostics/tests/field_at_pressure_level_tests.cpp | Pins diagnostic interpolation to linear for existing test assumptions. |
| components/eamxx/src/share/diagnostics/field_at_pressure_level.hpp | Adds members to support log-linear interpolation. |
| components/eamxx/src/share/diagnostics/field_at_pressure_level.cpp | Implements log-linear interpolation branch for pressure-level diagnostic. |
| components/eamxx/src/share/algorithm/eamxx_data_interpolation.hpp | Adds an interpolation-type string to vertical remap configuration. |
| components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp | Creates VerticalRemapper with the requested interpolation type and updates pressure setup calls. |
| components/eamxx/src/physics/spc/eamxx_spc_process_interface.cpp | Reads optional vert_interpolation_type and forwards to DataInterpolation. |
| components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp | Reads optional vert_interpolation_type and forwards to DataInterpolation. |
| components/eamxx/src/physics/mam/readfiles/vertical_remapper_mam4.hpp | Removes obsolete set_target_pressure override from the MAM4 remapper interface. |
| components/eamxx/src/physics/mam/readfiles/vertical_remapper_mam4.cpp | Updates MAM4 remapper to the new pressure storage scheme (but currently has correctness issues). |
4335f8d to
f9741ac
Compare
f9741ac to
b4846ce
Compare
|
OK, I think this is now ready for a review, since the 3 v1 diffs are expected. @crterai , you can also do a quick run to check if the output does look as expected. Recall that you don't need to do anything to get log-linear interpolation, as it is now the default. If you want to revert back to linear, you need to add One thing to notice: the
I believe the implications are mild, and we can live with that. Still, tagging other diags folks that may have an opinion: @mahf708 @jeff-cohere @AaronDonahue . |
Allows to perform interpolation w.r.t. the log of the pressure coordinate.
[non-BFB] Only for streams that used vertical remapping (via remapper or pressure-level diag).
This PR replaces #8183 and depends on #8375, so it may get rebased while we wait for that PR to be integrated.