-
Notifications
You must be signed in to change notification settings - Fork 149
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
Move Noah MP init to CCPP and update Noah MP code #575
Conversation
… start" in NEMS, but is no longer the case in CMEPS. It is now replaced by "kdt>1". This will change results in all coupled models. Co-authored-by: [email protected]
…fc_noah_wrfv4_interstitial
…dard names in physics/GFS_phys_time_vary.fv3.meta and physics/sfc_noahmp_drv.meta
…ahmp_init_in_ccpp
…matting in physics/rrtmg_sw_pre.F90
physics/GFS_phys_time_vary.fv3.F90
Outdated
tgxy(ix) = tsfcl(ix) | ||
tahxy(ix) = tsfcl(ix) | ||
|
||
if (snowd(ix) > 0.01 .and. tsfcl(ix) > con_t0c ) tvxy(ix) = con_t0c |
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.
should these various float factors be set to _kind_phys at this time? Or we can address this when this gets moved to the noahmp module later.
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 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.
@climbfuji looks good to me
physics/noahmp_tables.f90
Outdated
@@ -725,7 +735,7 @@ module noahmp_tables | |||
real :: refkdt_table = 3.0 !parameter in the surface runoff parameterization | |||
real :: frzk_table =0.15 !frozen ground parameter | |||
real :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature | |||
real :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat | |||
real :: czil_table = 0.01 !parameter used in the calculation of the roughness length for heat |
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.
@HelinWei-NOAA currently, this isn't used for the noahmp options we use, but this is too low, probably should have been 0.1
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 this isn't used now, we can change those values with the future PR for Rongqian's sfcdiff modification.
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.
Anything you want me to change?
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.
@climbfuji see PR to your branch
physics/sfc_noahmp_drv.F90
Outdated
real(kind=kind_phys), parameter :: a4 = 35.86 | ||
real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4) | ||
|
||
real, parameter :: undefined = -1.e36 ! TODO change to smaller value |
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.
@climbfuji @HelinWei-NOAA I didn't realize all these noahmp updates were going in at this time; there are a few unfinished TODOs in here, they should not cause any problems but we will want to address them in a follow-up PR, if not 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.
Ok, so no changes to make for 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.
@climbfuji Dom - is there a ccpp undefined value? I would like to change this to a lower magnitude value because it causes problems when using nco to calculate totals. If there is a ccpp value we can use it or I will set it to a smaller value.
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.
should we set it to the missing_value = 9.99e20_r8 used in other places?
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 essentially did that here:
@@ -0,0 +1,1529 @@ | |||
#define CCPP |
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.
@HelinWei-NOAA I see this doesn't use the new name for this file. Was that intentional?
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.
just try to be consistent with other drivers: sfc_drv_ruc.F90, sfc_drv.f, sfc_sice.f,sfc_ocean.F, and sfc_nst.f. All start with sfc
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.
then we should probably call it sfc_drv_noahmp
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.
@barlage can you please clarify? I see
!> \file sfc_noahmp_drv.F90
which is consistent with the name of the file. Or did you want to rename the file althogether? Or do when we move to your external repository?
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.
@climbfuji sorry for the cryptic message; when I first did the driver rewrite, I had a different name for this file but Helin changed it. I was trying to make the naming follow some logic but there are several other cases where names are not logical so let's just keep it for now.
Dom,
Can you wait for a while? I am working with Mike and will provide you with
the updated version of Noah MP driver (finish those TODO) and the table.
Thanks.
Helin
…On Thu, Feb 25, 2021 at 1:38 PM Dom Heinzeller ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In physics/noahmp_tables.f90
<#575 (comment)>:
> @@ -725,7 +735,7 @@ module noahmp_tables
real :: refkdt_table = 3.0 !parameter in the surface runoff parameterization
real :: frzk_table =0.15 !frozen ground parameter
real :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature
- real :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat
+ real :: czil_table = 0.01 !parameter used in the calculation of the roughness length for heat
Anything you want me to change?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#575 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALPHKYEMNQCOYDDYA756LLDTA2KKDANCNFSM4X67HZ6Q>
.
|
Ok. We would be the next in line in the commit queue, but we can let another PR jump the queue, of course.
… On Feb 25, 2021, at 12:56 PM, HelinWei-NOAA ***@***.***> wrote:
Dom,
Can you wait for a while? I am working with Mike and will provide you with
the updated version of Noah MP driver (finish those TODO) and the table.
Thanks.
Helin
On Thu, Feb 25, 2021 at 1:38 PM Dom Heinzeller ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In physics/noahmp_tables.f90
> <#575 (comment)>:
>
> > @@ -725,7 +735,7 @@ module noahmp_tables
> real :: refkdt_table = 3.0 !parameter in the surface runoff parameterization
> real :: frzk_table =0.15 !frozen ground parameter
> real :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature
> - real :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat
> + real :: czil_table = 0.01 !parameter used in the calculation of the roughness length for heat
>
> Anything you want me to change?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#575 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALPHKYEMNQCOYDDYA756LLDTA2KKDANCNFSM4X67HZ6Q>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#575 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5C2RONMI4G6MNNGUO3V3LTA2TODANCNFSM4X67HZ6Q>.
|
Fix noahmp driver TODO
…cpp-physics into noahmp_init_in_ccpp
@barlage @HelinWei-NOAA @shansun6 Can I please ask you to look at the code changes again and approve, if satisfied? It's our turn in the commit queue today. @shansun6 I pulled your PR #563 into this PR. Thanks! |
Hi Dom,
The initialization of iceflux looks good to me. I approve of it. Thanks,
Shan
…On Mon, Mar 1, 2021 at 8:24 AM Dom Heinzeller ***@***.***> wrote:
@barlage <https://github.com/barlage> @HelinWei-NOAA
<https://github.com/HelinWei-NOAA> @shansun6 <https://github.com/shansun6>
Can I please ask you to look at the code changes again and approve, if
satisfied? It's our turn in the commit queue today. @shansun6
<https://github.com/shansun6> I pulled your PR #563
<#563> into this PR. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#575 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALORMVUQPXRRZJTPPFVYFVDTBOWTZANCNFSM4X67HZ6Q>
.
|
real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) | ||
real, parameter :: denh2o = 1000. !density of water (kg/m3) | ||
real, parameter :: denice = 917. !density of ice (kg/m3) | ||
real (kind=kind_phys), parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) |
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.
Unless there is a good reason for NoahMP to be defining its own physical constants, they should come through the CCPP where possible.
real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) | ||
real, parameter :: denh2o = 1000. !density of water (kg/m3) | ||
real, parameter :: denice = 917. !density of ice (kg/m3) | ||
real (kind=kind_phys), parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) |
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.
Same comment WRT physical constants. Perhaps can be addressed in a followup PR at some point if all the testing has already been done.
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.
Yes, these will need to go in an issue and become a follow-up PRs, baselines already created on a few platforms.
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.
Recorded here: #582
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 physics code will be tied to the Noah-MP repository in the future #551 so CCPP will not have any control of this. We would need to work with the Noah-MP community to resolve 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.
We'll need to make sure that there are ways to set the constants via the argument list when using Noah MP in CCPP, and at the same time cater for other options. There are ways to do this, it's not a problem. But we cannot have each scheme define its own (and maybe slightly different) gravitational acceleration, pi, ...
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.
To be clear, I'm talking about a subset of the physical constants defined here. In particular, grav, sb, vkc, tfrz, hsub, hvap, hfus, cwat, cice, cpair, rair, rw, and denh2o are all defined by existing CCPP host models. And by "going through the CCPP", I'm referring to physics using physical constants defined by the host model so that all physics using them can use a consistent set. Otherwise, if every scheme has its own value of gravity, specific heats, etc., this introduces a lot of inconsistencies. If other users of the NoahMP repository require the scheme to define its own physical constants, then we need to figure out a solution that works for everybody. One solution would be to define a NoahMP specific constants module. If using the CCPP, during the init phase of the scheme, we could pass in the physical constants from the host and set the constants in the NoahMP-specific constants module inside. If NOT using the CCPP, one could use pre-defined values in the NoahMP-specific module and not overwrite them in the init phase.
This is not good. there has to be a unified way of specifying constants. Every component cannot have it's own physical constants defined. This is bad. |
Agreed, and it will be fixed. It also violates the CCPP requirements. |
Let's move this discussion to #582. |
This PR does several things:
Move the Noah MP initialization of surface fields from fv3atm (
io/FV3GFS_io.F90
) to CCPP from @climbfuji. This was done consistently with the previous move of the Noah initialization toGFS_phys_time_vary
for the following two reasons:time_vary
group in the near future anywayUpdates to Noah MP and Noah MP - radiation coupling from @HelinWei-NOAA
Contains the changes from Initialize ice flux in CMEPSA bug fix. "flag_cice" used to be a proxy for "not 1st time step cold… #563 (Initialize ice flux in CMEPSA bug fix) from @shansun6
Associated PRs:
#575
NOAA-EMC/fv3atm#249
ufs-community/ufs-weather-model#425
For regression testing, see ufs-community/ufs-weather-model#425.