-
Notifications
You must be signed in to change notification settings - Fork 153
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
Implementation of CCPP timestep_init and timestep_final phases #534
Conversation
…mestep_init_final
…llowing the merge of NCAR master
…mestep_init_final
I am opening this PR for review. Although unlikely, I may have to pull in updates from NCAR master in case anything gets committed until it is the turn for this PR. But the code changes itself should be final. |
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.
From all affected by this PR subroutines I am familiar with the gcycle.F90. Changes look good to me.
Dom, |
Absolutely not, I guess you shouldn't even be checking your emails ;-) No hurries at all, this is not yet a PR (just an issue noting the problem and suggesting a solution). |
… from physics/GFS_rrtmg_setup.{F90,meta}
…f variabale 'rann'
…mestep_init_final
…mestep_init_final
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.
I have looked at the code, but cannot verify if everything is correct.
Nevertheless, I have to trust the CCPP team.
@climbfuji Maybe I should know this, but for purposes of reviewing, is there any documentation that explains the new timestep_init and timestep_final CCPP phases? What is possible to do within them, what data should they have access to, etc.? |
I was looking at the ccpp-framework issues and meeting minutes, there is no good description of those. Maybe @gold2718 wrote a proposal back when we discussed it first time. In our meeting minutes, it appears first and with limited information on 06/06/2019, then again 06/04/2020: https://github.com/NCAR/ccpp-framework/wiki/CCPP-Framework-Meeting-Minutes-2019-06-06 In short: The restriction is for the same reason as for the |
@SMoorthi-emc @grantfirl Thanks for reviewing. Note: So far, regression tests have passed on the following platforms against the existing baselines. This means that we can be fairly confident that the changes were made correctly. jet.intel is about to finish, same for cheyenne.intel. Denise is running the wcoss tests,
|
Update: all regression tests passed on all tier-1 platforms. That's a good indication that we got the code changes right. |
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.
Approved
if (kdt == 1) then | ||
t_2delt = t | ||
t_1delt = t | ||
qv_2delt = qv |
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 looks nice and clean. Since the RTs passed, I guess there was no need for the max function? Or, is it because there are no RTs using ZC MP anymore?
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.
No, we are running plenty of Zhao-Carr MP tests, including restart tests. They all passed. Means that the ICs already have a lower limit larger than that particular qmin (1.0E-10).
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.
Will that always be the case that ICs have already enforced a minimum value prior to this point in the physics? In other words, was the reason for removing it because it truly isn't necessary to enforce a minimum at this point? For a PR that is not supposed to change the answer, did we just get lucky?
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.
I think you are right. Let's fix this with your update of the corresponding SCM code. Thanks for finding this.
! Initialize CCPP error handling variables | ||
errmsg = '' | ||
errflg = 0 | ||
|
||
if (is_initialized) return | ||
|
||
nblks = size(Model%blksz) |
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.
I can't find an obvious place where this non-uniform block checking stuff would have gone. Is it magically handled in the CCPP framework now?
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.
No, this was a consistency check that was added a while back when the CCPP static mode was developed. It is no longer needed, because the logic in fv3atm takes care of it for the remainder of the lifetime of ccpp_prebuild.py
.
if (nscyc > 0) then | ||
if (mod(kdt,nscyc) == 1) THEN | ||
call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & | ||
input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & |
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 had to be a ton of fun passing all of these in!
@@ -523,12 +522,14 @@ subroutine radinit( si, NLAY, imp_physics, me ) | |||
!> -# Set up control variables and external module variables in | |||
!! module physparam | |||
#if 0 | |||
! DH* WHAT IS THIS? |
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.
According to GitHub's blame function, this comment has existed since the original creation of the file, which was probably just copied from GFS_radiation_driver.F90 at the time. Maybe the comment was from Rusty Benson when he made IPD?
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.
It most likely was something in from the radiation driver prior to the GFS physics cleanup that culminated in the IPD. I didn't knowingly change any science during the IPD creation.
@@ -16,15 +16,16 @@ end subroutine GFS_suite_interstitial_rad_reset_finalize | |||
!! | |||
subroutine GFS_suite_interstitial_rad_reset_run (Interstitial, Model, errmsg, errflg) | |||
|
|||
use GFS_typedefs, only: GFS_control_type,GFS_interstitial_type | |||
use machine, only: kind_phys |
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.
Why is kind_phys needed in this subroutine now?
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 is an oversight, it's not needed.
I finally made my way through this -- really good work. I think that I understand it well enough to transfer the changes to SCM variants. |
|
||
!--- determine if diagnostics buckets need to be cleared | ||
sec_zero = nint(Model%fhzero*con_hr) | ||
if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then |
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.
It's funny that in the latest SCM PR where I added support for diagnostics intervals other than every timestep, I removed the clear calls from the host in favor of what was in the physics_time_vary run. Now, it will need to be added back. Not a big deal, just funny timing.
This adds support for 32-bit physics to the FV3, based on prior work on the Neptune model. Co-authored-by: Dusan Jovic <[email protected]>
This PR contains the following changes:
run
totimestep_init
Associated PRs:
ufs-community/ufs-weather-model#337
NOAA-EMC/fv3atm#217
#534
NCAR/ccpp-framework#344
NOAA-EMC/GFDL_atmos_cubed_sphere#47
For regression testing information, see ufs-community/ufs-weather-model#337.