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

Port recent Noah-MP upgrades / fixes to public version of SHiELD #42

Merged
merged 10 commits into from
Jun 6, 2024

Conversation

spencerkclark
Copy link
Member

Description

This PR cherry-picks several commits from the internal version of the SHiELD physics to the public version. They are from two MRs which @kaiyuan-cheng and I collaborated on in the internal version of SHiELD (internal GitLab access is required to follow some of the links).

cc: @lharris4

Question: do we have a policy for including the license(s) of code we bring in from these external repositories (NCAR/noahmp and NCAR/ccpp-physics)?

fv3team/fv3_gfsphysics!90

Fixed a bug where albedo over the ocean is computed incorrectly when ialb = 2.

In the original code, the ocean fraction is always zero; therefore, the albedo over the ocean is miscalculated. In the fix, the ocean fraction is calculated following the logic used in the option ialb = 1. As a result, the albedo over the ocean looks good now.

fv3team/fv3_gfsphysics!93

This upgrade is based on version 4.5 of the official Noah-MP repository with a few updates brought by @Spencer.Clark from NCAR/ccpp-physics:

  1. Computing the snow height within the snowwater_glacier and snowwater subroutines
  2. Limiting the compaction of snow in various places
  3. Calculating the equilibrium state of snow only if snow exists. The maximum water depth becomes a tunable parameter and its default value remains 5 m.

Note this PR supersedes #41, since it is better (and easier) to stay synced with the official Noah-MP repository than with NCAR/ccpp-physics, which includes (in some cases) unrelated updates that we would not like to merge into SHiELD. The updates from NCAR/ccpp-physics were determined by manually inspecting the commit history for changes that looked like bug fixes to the glacier physics (as opposed to tuning-related or compatibility-related changes).

How Has This Been Tested?

I tested this in a short C24 resolution simulation on Gaea. The ocean surface albedo looks reasonable, and the soil temperature in Antarctica and Greenland is no longer pinned to be greater than or equal to 273.16 K. These were the two primary issues these internal MRs aimed to solve.

Albedo

2024-05-29-albedo-test (1)

Top layer soil temperature (note the colorbar meant to highlight regions where the temperature is equal to 273.16 K)

2024-05-29-SOILT1-test (1)

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@lharris4
Copy link
Contributor

@spencerkclark thank you for putting in this change. For the license I am pretty sure that this would be covered the same way as codes have been integrated from CCPP in SHiELD, or how FV3 and SHiELD's codes have been integrated into the UFS and CCPP.

@spencerkclark
Copy link
Member Author

@lharris4 thanks—do you know more about how that is handled currently? I just want to make sure these updates get attributed appropriately, since the README mainly seems to make reference to a "baseline 2017 GFS" version of the physics, but nothing external to GFDL after that.

@lharris4
Copy link
Contributor

@spencerkclark I think we should have a list of acknowledgements for external codes beyond GFSv14. So far this would be the GFSv17 SAS; EMC TKE-EDMF; and NoahMP. @linjiongzhou @gaokun227 Is this a complete list?

@linjiongzhou
Copy link
Contributor

EMC's TKE-EDMF and Noah-MP look good to me. The SA-SAS is from GFSv17?

@lharris4
Copy link
Contributor

@linjiongzhou I believe we have a couple of versions within SHiELD

@linjiongzhou
Copy link
Contributor

BTW, the Noah-MP is included in the SHiELD physics, but is not used in SHiELD or T-SHiELD.

@linjiongzhou
Copy link
Contributor

I know we have the GFSv16 version of SAS that Kai-Yuan pulled down a while ago, but not sure it is the same as the GFSv17 version.

@lharris4
Copy link
Contributor

lharris4 commented May 29, 2024 via email

@lharris4
Copy link
Contributor

Sorry, got v16 and v17 mixed up. We only have v16 versions.

@linjiongzhou
Copy link
Contributor

linjiongzhou commented May 29, 2024 via email

@spencerkclark
Copy link
Member Author

Thanks @lharris4 and @linjiongzhou—I opened #43 to track further discussion on the README refresh. It probably makes sense to handle that all at once in a separate PR so that it can be done with a uniform style.

Copy link
Contributor

@lharris4 lharris4 left a comment

Choose a reason for hiding this comment

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

This is OK with me as we have already tested it on the internal codes. @laurenchilutti can you merge this? Thanks.

@spencerkclark
Copy link
Member Author

Thanks @lharris4—the plots above are from tests with the public codebase, so we should be covered there too!

@laurenchilutti laurenchilutti merged commit d7e4481 into NOAA-GFDL:main Jun 6, 2024
73 of 74 checks passed
@spencerkclark spencerkclark deleted the port-noahmp-upgrades branch June 6, 2024 12:33
@spencerkclark
Copy link
Member Author

Thanks @laurenchilutti!

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

Successfully merging this pull request may close these issues.

5 participants