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

Update inline post #666

Merged
merged 14 commits into from
Jul 27, 2023
Merged

Update inline post #666

merged 14 commits into from
Jul 27, 2023

Conversation

WenMeng-NOAA
Copy link
Contributor

Description

(Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.)
This PR include changes are:

  • Clean up legacy code in inline post interface
  • Relocate computation of diagnostic variables
  • Sync changes from offline post interface
  • Update upp revision

Issue(s) addressed

Link the issues to be closed with this PR, whether in this repository, or in another repository.
(Remember, issues should always be created before starting work on a PR branch!)

Testing

How were these changes tested?
What compilers / HPCs was it tested with?
Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
Have the ufs-weather-model regression test been run? On what platform?

  • Will the code updates change regression test baseline? If yes, why? Please show the baseline directory below.
  • Please commit the regression test log files in your ufs-weather-model branch

Dependencies

If testing this branch requires non-default branches in other repositories, list them.
No.

Do PRs in upstream repositories need to be merged first?
No.

Copy link

@EricJames-NOAA EricJames-NOAA left a comment

Choose a reason for hiding this comment

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

@WenMeng-NOAA did you make changes to add 160m and 320m wind components in this PR as in my PR #693? I'm not seeing those changes here.

I think it sounds like a good idea to sync the updates of the sndepac calculation back to the offline post. If you can add it to your PR, that would be great.

@WenMeng-NOAA
Copy link
Contributor Author

@WenMeng-NOAA did you make changes to add 160m and 320m wind components in this PR as in my PR #693? I'm not seeing those changes here.

I think it sounds like a good idea to sync the updates of the sndepac calculation back to the offline post. If you can add it to your PR, that would be great.

@EricJames-NOAA This PR is for updating inline post interface with the changes from offline post interface. The changes for 160 and 320m wind components will be included in inline post with submodule upp revision upgrade in this PR.

Copy link

@EricJames-NOAA EricJames-NOAA left a comment

Choose a reason for hiding this comment

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

Looks good!

@jkbk2004 jkbk2004 requested a review from DusanJovic-NOAA June 16, 2023 14:00
@DusanJovic-NOAA
Copy link
Collaborator

Are there regression tests in ufs-weather-model that run with gocart_on, gccpp_on or nasa_on?

@DusanJovic-NOAA
Copy link
Collaborator

I see huge code duplication between post_fv3.f90 and INITPOST_NETCDF.f in UPP, for example code that computes various PM concentration. All computations should be in done in the post library not here or in INITPOST. The only purpose of this module (post_fv3) is to pass model data to post library not to perform diagnostic computations. Similarly the purpose of INITPOST_NETCDF should be just to read model data from external file not to perform diagnostic computations. Maintaining very similar or exactly the same code (non trivial code) at to places is very error prone and in my opinion unnecessary.

@WenMeng-NOAA
Copy link
Contributor Author

Are there regression tests in ufs-weather-model that run with gocart_on, gccpp_on or nasa_on?

I am not sure. From my testing, I didn't see gocart_on, gccpp_on and nasa_on. @zhanglikate @junwang-noaa Do you know that?

@WenMeng-NOAA
Copy link
Contributor Author

I see huge code duplication between post_fv3.f90 and INITPOST_NETCDF.f in UPP, for example code that computes various PM concentration. All computations should be in done in the post library not here or in INITPOST. The only purpose of this module (post_fv3) is to pass model data to post library not to perform diagnostic computations. Similarly the purpose of INITPOST_NETCDF should be just to read model data from external file not to perform diagnostic computations. Maintaining very similar or exactly the same code (non trivial code) at to places is very error prone and in my opinion unnecessary.

@DusanJovic-NOAA Thanks for the good suggestion. From UPP code management perspective, I totally agree with you. I am looking into the UPP code, this kind of enhancement might be in the interfaces of offline post for nemsio (GEFS V12) and netcdf (GFS17/GEFS12) and the interface of inline post. Given the resource constraints from UPP, I would suggest the effort starts after nemsio interface removal from UPP. Please let me know your comments on my proposal. @zhanglikate may chime in since she is the main developer for aerosol/chemical fields in UPP.

@zhanglikate
Copy link

Are there regression tests in ufs-weather-model that run with gocart_on, gccpp_on or nasa_on?

I am not sure. From my testing, I didn't see gocart_on, gccpp_on and nasa_on. @zhanglikate @junwang-noaa Do you know that?

There is no regression test for gocart_on option now since this is the GEFS-Aerosols model. I am still working on create the regression test for gccpp_on since this part has not been merge to current UFS model. For nasa_on, which is for current UFS-Aerosols model, not sure @junwang-noaa or @lipan-NOAA may have tested it. Thanks.

@jkbk2004
Copy link
Collaborator

@DusanJovic-NOAA @junwang-noaa Should we let this pr move forward while additional regression tests for these gocart_on/gccpp_on/nasa_on may follow on in future? @WenMeng-NOAA I am wondering if we need to create issues pointed in this conversation. So we can track as PRs move.

@DusanJovic-NOAA
Copy link
Collaborator

We can merge this PR as it is now, and add regression tests and refactor later.

@WenMeng-NOAA
Copy link
Contributor Author

We can merge this PR as it is now, and add regression tests and refactor later.

I will create an issue regarding comments from @DusanJovic-NOAA and @junwang-noaa for inline post enhancement.

@zach1221
Copy link
Collaborator

Testing is complete on #1794. Once we have one more approval here, the merge process can begin.
@BrianCurtis-NOAA @DusanJovic-NOAA

@zach1221
Copy link
Collaborator

Ok, we have two approving reviews. @BrianCurtis-NOAA please feel free to merge this PR.

@BrianCurtis-NOAA
Copy link
Collaborator

Double checking hashes, upp isn't at the top of their develop and I was wondering if it's purposely lagged? @WenMeng-NOAA or @DusanJovic-NOAA know?

@jkbk2004 jkbk2004 merged commit 6d17939 into NOAA-EMC:develop Jul 27, 2023
@WenMeng-NOAA
Copy link
Contributor Author

Double checking hashes, upp isn't at the top of their develop and I was wondering if it's purposely lagged? @WenMeng-NOAA or @DusanJovic-NOAA know?

@BrianCurtis-NOAA Yes, the recent commits from UPP/develop haven't being tested in in-line post yet.

@BrianCurtis-NOAA
Copy link
Collaborator

@WenMeng-NOAA Thank you! @jkbk2004 why was this merged before my question was answered?

@jkbk2004
Copy link
Collaborator

@BrianCurtis-NOAA upp develop hash continues to march, right? @WenMeng-NOAA https://github.com/NOAA-EMC/UPP/tree/baa77515f182eb6d6f2f8b57bd1e0ffb742761e8 hash is correct, right? Let me know if we need to revert.

@WenMeng-NOAA
Copy link
Contributor Author

@jkbk2004 and @BrianCurtis-NOAA The upp @baa7751 is the correct revision for this PR.

@DeniseWorthen
Copy link
Collaborator

@WenMeng-NOAA So just to be clear, it appears that UPP is the one repo that is not carried in UFS at the top of the develop branch.

I admit to not paying a lot of attention to the UPP updates---but why is UPP a special case? All other components point to the top of the develop branch of their respective repos.

@WenMeng-NOAA
Copy link
Contributor Author

@DeniseWorthen When I submitted the FV3 PR, the upp revision is the top of develop branch. But this PR has been waiting over one month though I updated upp revisions several times. Meanwhile The UPP develop has been updated frequently. I don't want the upp commits from this week break UFS without inline post testing.

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Jul 27, 2023

@WenMeng-NOAA Thanks. But for all other components (eg. CICE, MOM6, CMEPS), we cannot update the develop branch for a component w/o simultaneously updating the UFS. They always go hand-in-hand. But it appears that for UPP, you can update develop at any time.

@WenMeng-NOAA
Copy link
Contributor Author

@DeniseWorthen The UFS users can configure the UPP as a standalone utility (offline post) or sub component of FV3 (inline post) to post process model output. Some updates in UPP/develop are for offline post only and some updates will be applied in inline post with changes in the interface at FV3. I usually upgrade upp revision at FV3 every two months.

@DeniseWorthen
Copy link
Collaborator

@WenMeng-NOAA Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants