-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Conversation
!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) |
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
gsmphys/mfpbltq.f
Outdated
if (use_tke_ent_det) then | ||
xlamax(i) = ce0t(i) / delz(i) | ||
else | ||
xlamax(i) = ce0 / delz(i) | ||
endif |
There was a problem hiding this comment.
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
! kgao 12/08/2023 | ||
if (use_tke_ent_det) then | ||
xlamax(i) = ce0t(i) / delz(i) | ||
else | ||
xlamax(i) = ce0 / delz(i) | ||
endif |
There was a problem hiding this comment.
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/rad_initialize.f
Outdated
@@ -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 |
There was a problem hiding this comment.
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.
chh(i) = -maxevap(i)/evap(i)*chh(i) | ||
hflx(i) = -maxevap(i)/evap(i)*hflx(i) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
Just submitted a PR addressing the CO2 scaling comments. Regarding |
Just merged in @gaokun227 and @kaiyuan-cheng updates based on @bensonr review. |
There was a problem hiding this 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
There was a problem hiding this 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.
if (Model%ldiag3d) then | ||
call compute_column_integrated_moles_of_dry_air_and_co2(Statein, gasvmr, IM, LMK, NF_VGAS, Diag) | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following #50, I think we no longer need to guard against calling this when Model%ldiag3d
is .false.
:
if (Model%ldiag3d) then | |
call compute_column_integrated_moles_of_dry_air_and_co2(Statein, gasvmr, IM, LMK, NF_VGAS, Diag) | |
endif | |
call compute_column_integrated_moles_of_dry_air_and_co2(Statein, gasvmr, IM, LMK, NF_VGAS, Diag) |
allocate (Diag%column_moles_co2_per_square_meter(IM)) | ||
allocate (Diag%column_moles_dry_air_per_square_meter(IM)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following #50, these are always allocated above, so these lines are no longer needed:
allocate (Diag%column_moles_co2_per_square_meter(IM)) | |
allocate (Diag%column_moles_dry_air_per_square_meter(IM)) |
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