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

gmtb/develop: update from master, MYJ PBL/SFC, Noah MP #320

Merged
merged 38 commits into from
Sep 19, 2019

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Sep 18, 2019

  • MYJ SFC/PBL from @Qingfu-Liu as in Adding myj to ccpp #306
  • NoahMP from @grantfirl as in NoahMP CCPP-compliancy #305
  • bugfixes for MYJ from @climbfuji:
    • convert to new metadata
    • compile original modules with double precision floats
    • set internal floating point precision to double precision (kind kfpt)
    • correct dimensions of array dkt (runs from (1:im,1:nlevs-1) in FV3, not (1:im,1:nlev))
  • bugfixes for NoahMP from @climbfuji:
    • disable calculation of snocvr in CCPP, restore in FV3GFS_io.F90 (this is required for b4b identical results when dynamics and FV3GFS_io.F90 are compiled in single precision)

grantfirl and others added 30 commits August 20, 2019 11:40
…y_pre_run; update GFS_time_vary_pre_run.fv3.F90 to new metadata and remove DDT dependency
… because it was originally done after the call to ccpp_physics_init in FV3GFS_io.F90/sfc_prop_restart_read
…use it was originally done after the call to ccpp_physics_init in FV3GFS_io.F90/sfc_prop_restart_read); this needs to happen before radition is called
….F90 that replaced legacy code (GOTO statements) with more complicated code
…velop_20190909

master: update from gmtb develop 2019/09/09
@climbfuji
Copy link
Collaborator Author

@climbfuji
Copy link
Collaborator Author

See https://github.com/NCAR/NEMSfv3gfs/pull/249 for regression testing.

@climbfuji climbfuji marked this pull request as ready for review September 18, 2019 23:06
,kfpt=8 & ! floating point variables
,kdbl=8 ! double precision

REAL(kind=kfpt),PARAMETER :: A2=17.2693882,A3=273.15,A4=35.86,CP=1004.6 &
Copy link
Collaborator

Choose a reason for hiding this comment

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

More locally-defined constants in this scheme that should be coming from the host. Now that I've been looking for this problem, it seems like this is the norm, not the exception for schemes.

,kint=4 & ! integer variables
!,kfpt=4 & ! floating point variables
,kfpt=8 & ! floating point variables
,kdbl=8 ! double precision
Copy link
Collaborator

Choose a reason for hiding this comment

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

@climbfuji Is this a problem? Should precision of vars be coming from host? Perhaps it's OK since these are only used for local vars?

@Qingfu-Liu
Copy link
Collaborator

Qingfu-Liu commented Sep 19, 2019 via email

@climbfuji
Copy link
Collaborator Author

On the long run we may want to remove the locally-defined precisions and use kind_phys etc. There is a broad agreement that the precision should not be hardcoded in the physics, and for many good reasons (beyond what can be discussed here). All models looking at CCPP (FV3, MPAS, WRF, NEPTUNE) are going to use kind_phys (and potentially other types), hence the portability won't be an issue.

kpbl(:)=levs-1
ict=1 ! no longer used

if (lprnt1) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

For future reference, all the printing to console done in this routine can be eventually cleaned up by using CCPP error handling (setting errmsg). Also, this highlights the need to enhance CCPP's error messaging capabilities (log/warn messages in addition to error message).

kind = kind_phys
intent = inout
optional = F
[phy_myj_qsfc]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious why MYJ needs its own variable for this.

kind = kind_phys
intent = inout
optional = F
[phy_myj_z0base]
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is this different than existing roughness length variables?

@Qingfu-Liu
Copy link
Collaborator

Qingfu-Liu commented Sep 19, 2019 via email

Copy link
Collaborator

@grantfirl grantfirl 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, although noted some issues to be addressed at some point in the future.

@climbfuji
Copy link
Collaborator Author

It is worth noting that we purposely didn't touch the original MYJ PBL/SFC schemes, because making this code CCPP compliant requires more or less a rewrite of the schemes. This should be done in the future iff the scheme's performances are promising enough to justify the effort. Some aspects, e.g. the local definition of kinds, need to be addressed nonetheless.

@grantfirl
Copy link
Collaborator

It is worth noting that we purposely didn't touch the original MYJ PBL/SFC schemes, because making this code CCPP compliant requires more or less a rewrite of the schemes. This should be done in the future iff the scheme's performances are promising enough to justify the effort. Some aspects, e.g. the local definition of kinds, need to be addressed nonetheless.

Ah, yes, I forgot about that. I'm definitely not trying to hold this merge up, just pointing things out for the future if and when this scheme gains traction.

@climbfuji
Copy link
Collaborator Author

@grantfirl mentioned the need for someone else to review his NoahMP changes, I did that in preparation for my changes on top of it, hence this can be merged (similar for associated PRs).

@climbfuji climbfuji merged commit 2442eda into NCAR:gmtb/develop Sep 19, 2019
@climbfuji climbfuji deleted the myj_with_dom_mods branch June 27, 2022 03:19
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.

3 participants