Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sat hist capability and add test #6641

Merged
merged 4 commits into from
Sep 30, 2024
Merged

fix sat hist capability and add test #6641

merged 4 commits into from
Sep 30, 2024

Conversation

mahf708
Copy link
Contributor

@mahf708 mahf708 commented Sep 24, 2024

Ressurecting a long-forgotten capability to output variable along ship/flight tracks,
and adding a test to (weakly try to) ensure it doesn't break again.

Fixes #6543

[BFB]

Note: I don't have full provenance from where the code edits are from. I recall attempting to fix this capability in July and August 2024, and I recall trying different versions of available CAM code to do so. But the final version isn't easily traceable (so it could be a mix of edits from CAM and debug edits to make it work in current EAM). For reference, here's the CAM code: https://github.com/ESCOMP/CAM/blob/cam_cesm2_1_rel/src/control/sat_hist.F90. I don't claim ownership of the code at all, and I am happy to give "authorship" to whomever claims it.

@mahf708 mahf708 added this to the v3.0.1 milestone Sep 24, 2024
Copy link

github-actions bot commented Sep 24, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6641/
on branch gh-pages at 2024-09-27 02:26 UTC

@mahf708
Copy link
Contributor Author

mahf708 commented Sep 24, 2024

I am requesting review from @jayeshkrishna and @dqwu since the underlying bug was related to PIO. Please feel free to review or ask someone else. Thanks!

@rljacob
Copy link
Member

rljacob commented Sep 24, 2024

Did you look at the output?

@mahf708
Copy link
Contributor Author

mahf708 commented Sep 24, 2024

Did you look at the output?

Yes, and as far as I could tell it makes sense:

  1. It has values
  2. No more segfaults
  3. The values seem scientifically reasonable, though tbh somewhat underwhelming for the purpose (e.g., outputting along some ship track in the southern ocean yields results that are quite similar to outputting a predefined gridbox, see collapsable below)
plots

black: obs
red: cesm 2
blue: e3sm 3

using ship-tracked outputs
image

using large gridbox
image

@rljacob
Copy link
Member

rljacob commented Sep 24, 2024

@jayeshkrishna and @dqwu please review

@rljacob rljacob self-assigned this Sep 24, 2024
components/eam/src/control/sat_hist.F90 Outdated Show resolved Hide resolved
components/eam/src/control/sat_hist.F90 Outdated Show resolved Hide resolved
components/eam/src/control/sat_hist.F90 Show resolved Hide resolved
components/eam/src/control/sat_hist.F90 Outdated Show resolved Hide resolved
@jayeshkrishna jayeshkrishna added BFB PR leaves answers BFB SCORPIO The E3SM I/O library (derived from PIO) and removed PIO labels Sep 24, 2024
@jayeshkrishna
Copy link
Contributor

@mahf708 : I would also recommend adding some text in the commit (commit message) to explain the change.

@mahf708
Copy link
Contributor Author

mahf708 commented Sep 25, 2024

@mahf708 : I would also recommend adding some text in the commit (commit message) to explain the change.

Thanks for the detailed review! Please bear with me as I go through it and address it --- hopefully by tomorrow. My Fortran knowledge is pretty low, but I will do my best to make this a better PR

Ressurecting a long-forgotten capability to output
variable along ship/flight tracks, and adding a
test to (weakly try to) ensure it doesn't break again.

The code is rewritten such that it uses a different
IO logic (more serial) and support is added for
different types of output variables.

Fixes #6543

[BFB]

Note: I don't have full provenance from where the
code edits are from. I recall attempting to fix this
capability in July and August 2024, and I recall
trying different versions of available CAM code to do so.
But the final version isn't easily traceable
(so it could be a mix of edits from CAM and debug edits
to make it work in current EAM). For reference, here's
the CAM code:
https://github.com/ESCOMP/CAM/blob/cam_cesm2_1_rel/src/control/sat_hist.F90.

I don't claim ownership of the code at all, and I am
happy to give "authorship" to whomever claims it.
- Updated default filename spec
- Handled error from put call
- Added note to improve code
- Updated test to ERS
@rljacob
Copy link
Member

rljacob commented Sep 25, 2024

@mahf708 is this ready?

@mahf708
Copy link
Contributor Author

mahf708 commented Sep 25, 2024

Yes! I only had a minor mod after @jayeshkrishna last reviewed (should be non-controversial) and I ensured it was BFB with the first commit. Output looks reasonable and ERS test passes (as well as SMS) with the testmod. 🎉

rljacob added a commit that referenced this pull request Sep 26, 2024
Ressurecting a long-forgotten capability to output variable along ship/flight tracks,
and adding a test to (weakly try to) ensure it doesn't break again.

Fixes #6543

[BFB]
@mahf708

This comment was marked as outdated.

rljacob added a commit that referenced this pull request Sep 27, 2024
Second merge of this PR.  Remove test since its not working on all platforms.
rljacob added a commit that referenced this pull request Sep 30, 2024
3rd merge of this branch.  Reactivate test with smaller sat file.
@mahf708
Copy link
Contributor Author

mahf708 commented Sep 30, 2024

@rljacob I think this is ready to be merged. Let me know if you agree/disagree, thanks. Then I can submit the bless request for the DIFFs on chrys and pm-cpu, as well as gcp

@rljacob
Copy link
Member

rljacob commented Sep 30, 2024

I'll do the blessing.

@rljacob rljacob merged commit 76d797e into master Sep 30, 2024
9 checks passed
@rljacob rljacob deleted the mahf708/eam/sathis branch September 30, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Atmosphere BFB PR leaves answers BFB eam SCORPIO The E3SM I/O library (derived from PIO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

broken sathist functionality
3 participants