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

202411 Release of SHiELD_physics #58

Merged
merged 14 commits into from
Dec 18, 2024

Conversation

laurenchilutti
Copy link
Contributor

@laurenchilutti laurenchilutti commented Dec 2, 2024

Description
This PR publishes SHiELD_physics 202411 release. This release coincides with the release of GFDL_atmos_cubed_sphere 202411.

The changes included in this PR are from the GFDL FV3 Team. Full description of changes can be seen in the RELEASE.md

PRs that are all related and should be merged with this one:
GFDL_atmos_cubed_sphere PR #364
SHiELD_build PR #50

Fixes # (issue)

How Has This Been Tested?

Tested on Gaea

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

!ONLY call with the first block, which will be equal to the blocksize.
! this will (should?) allocate the right amount of data. Then calls to
! COSP will have the right data set up.
call cosp2_init (size(Grid(1)%xlon,1), Model%levs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure this works when non-uniform blocks are created (e.g. [mod (nx, blocksize) != 0]

Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work with nonuniform blocksizes, to the best of my knowledge. This was a quick 'hack' I put in to get COSP to work in X-SHiELD without running out of memory. This is a limitation of the method at this time.

Copy link
Contributor

Choose a reason for hiding this comment

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

My original code requires the block size to be the same as the layout size, making it much less efficient. Lucas's simple fix resolves this issue, although I haven't tested it in non-uniform blocks.

Comment on lines 132 to 136
if (use_tke_ent_det) then
xlamax(i) = ce0t(i) / delz(i)
else
xlamax(i) = ce0 / delz(i)
endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the only difference is whether to use ce0t(i) or ce0 based on use_tke_ent_det==T/F you could have set ce0t(i)==ce0 above for the case where it is False and not had to use the if-test here and in similar loops below.

gsmphys/mfscuq.f Outdated
Comment on lines 204 to 209
! kgao 12/08/2023
if (use_tke_ent_det) then
xlamax(i) = ce0t(i) / delz(i)
else
xlamax(i) = ce0 / delz(i)
endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the only difference is whether to use ce0t(i) or ce0 based on use_tke_ent_det==T/F you could have set ce0t(i)==ce0 above for the case where it is False and not had to use the if-test here and in similar loops below.

@@ -136,12 +137,13 @@ subroutine rad_initialize &

ictmflg= ictm ! data ic time/date control flag
ico2flg= ico2 ! co2 data source control flag
co2_scaling= fco2_scaling ! co2 level scaling
Copy link
Contributor

Choose a reason for hiding this comment

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

May want to put a comment here that you are re-setting the value of co2_scaling in physparam.

gsmphys/physparam.f Show resolved Hide resolved
gsmphys/sfc_drv.f Show resolved Hide resolved
Comment on lines +823 to +824
chh(i) = -maxevap(i)/evap(i)*chh(i)
hflx(i) = -maxevap(i)/evap(i)*hflx(i)
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking order of operations is supposed to be (maxevap/evap) * _var_ and you want to negate it.

Copy link
Contributor

Choose a reason for hiding this comment

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

There were two questions here. One was to make sure it wasn't supposed to be -maxevap/(evap * var) and secondly questioning the use of the negative sign.

gsmphys/sfc_nst.f Show resolved Hide resolved
gsmphys/sfc_sice.f Show resolved Hide resolved
gsmphys/sfc_ocean.f Show resolved Hide resolved
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.

Looks OK to me. @kaiyuan-cheng @kaiyuan-cheng @spencerkclark could you check your changes to make sure they are OK?

!ONLY call with the first block, which will be equal to the blocksize.
! this will (should?) allocate the right amount of data. Then calls to
! COSP will have the right data set up.
call cosp2_init (size(Grid(1)%xlon,1), Model%levs)
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work with nonuniform blocksizes, to the best of my knowledge. This was a quick 'hack' I put in to get COSP to work in X-SHiELD without running out of memory. This is a limitation of the method at this time.

@kaiyuan-cheng
Copy link
Contributor

kaiyuan-cheng commented Dec 6, 2024

Looks OK to me. @kaiyuan-cheng @kaiyuan-cheng @spencerkclark could you check your changes to make sure they are OK?

Just submitted a PR addressing the CO2 scaling comments.

Regarding
chh(i) = -maxevap(i)/evap(i)*chh(i)
hflx(i) = -maxevap(i)/evap(i)*hflx(i),
the original formulation looks good to me.

@laurenchilutti
Copy link
Contributor Author

Just merged in @gaokun227 and @kaiyuan-cheng updates based on @bensonr review.

Copy link
Contributor

@bensonr bensonr left a comment

Choose a reason for hiding this comment

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

thanks for making the updates

Copy link
Member

@spencerkclark spencerkclark left a comment

Choose a reason for hiding this comment

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

Thanks @laurenchilutti! Just a couple minor comments related to code that was touched in both the public and private repos.

GFS_layer/GFS_radiation_driver.F90 Outdated Show resolved Hide resolved
GFS_layer/GFS_typedefs.F90 Outdated Show resolved Hide resolved
laurenchilutti and others added 2 commits December 17, 2024 12:53
…ion on PR 58 review.

Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
@laurenchilutti laurenchilutti merged commit 7ea294b into NOAA-GFDL:main Dec 18, 2024
2 checks passed
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.

8 participants