-
Notifications
You must be signed in to change notification settings - Fork 6
Remove direct physcons module dependencies from MYNN #32
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
Open
scrasmussen
wants to merge
1
commit into
NCAR:ccpp/dev
Choose a base branch
from
scrasmussen:mynn-sfc-remove-physcons
base: ccpp/dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,28 +63,28 @@ MODULE module_sf_mynnsfc | |
| !NOTE: This code was primarily tested in combination with the RUC LSM. | ||
| ! Performance with the Noah (or other) LSM is relatively unknown. | ||
| !------------------------------------------------------------------- | ||
| !Include host model constants | ||
| use physcons, only : cp => con_cp, & !=7*Rd/2 | ||
| & grav => con_g, & !=9.81 | ||
| & Rd => con_rd, & !=287. | ||
| & Rv => con_rv, & !=461.6 | ||
| ! & cpv => con_cvap, & !=4*Rv | ||
| & rovcp => con_rocp, & !=Rd/cp | ||
| & xlv => con_hvap, & !2.5e6 | ||
| & xlf => con_hfus, & !3.5e5 | ||
| & ep1 => con_fvirt, & !Rv/Rd - 1 | ||
| & ep2 => con_eps !Rd/Rv | ||
|
|
||
| !use kind_phys for real-types | ||
| use machine , only : kind_phys | ||
|
|
||
| !------------------------------------------------------------------- | ||
| IMPLICIT NONE | ||
| !------------------------------------------------------------------- | ||
| !Drive and/or define more constant: | ||
| real(kind_phys), parameter :: ep3 = 1.-ep2 | ||
| real(kind_phys), parameter :: g_inv = 1.0/grav | ||
| real(kind_phys), parameter :: rvovrd = Rv/Rd | ||
| real(kind_phys) :: cp = 1.0E30_kind_phys | ||
| real(kind_phys) :: grav = 1.0E30_kind_phys | ||
| real(kind_phys) :: Rd = 1.0E30_kind_phys | ||
| real(kind_phys) :: Rv = 1.0E30_kind_phys | ||
| real(kind_phys) :: rovcp = 1.0E30_kind_phys | ||
| real(kind_phys) :: xlv = 1.0E30_kind_phys | ||
| real(kind_phys) :: xlf = 1.0E30_kind_phys | ||
| real(kind_phys) :: ep1 = 1.0E30_kind_phys | ||
| real(kind_phys) :: ep2 = 1.0E30_kind_phys | ||
| real(kind_phys) :: ep3 = 1.0E30_kind_phys | ||
| real(kind_phys) :: g_inv = 1.0E30_kind_phys | ||
| real(kind_phys) :: rvovrd = 1.0E30_kind_phys | ||
| !$acc declare create(cp, grav, Rd, Rv, rovcp, xlv, xlf, & | ||
| !$acc ep1, ep2, ep3, g_inv, rvovrd) | ||
|
|
||
| real(kind_phys), parameter :: wmin = 0.1 ! Minimum wind speed | ||
| real(kind_phys), parameter :: karman = 0.4 | ||
| real(kind_phys), parameter :: SVP1 = 0.6112 | ||
|
|
@@ -112,6 +112,32 @@ MODULE module_sf_mynnsfc | |
|
|
||
| CONTAINS | ||
|
|
||
| subroutine sf_mynn_init(con_cp, con_g, con_rd, con_rv, & | ||
| con_rocp, con_hvap, con_hfus, con_fvirt, & | ||
| con_eps) | ||
| real(kind_phys), intent(in) :: con_cp, con_g, con_rd, con_rv | ||
| real(kind_phys), intent(in) :: con_rocp, con_hvap, con_hfus, con_fvirt | ||
| real(kind_phys), intent(in) :: con_eps | ||
| !Include host model constants | ||
| cp = con_cp | ||
| grav = con_g | ||
| Rd = con_rd | ||
| Rv = con_rv | ||
| rovcp = con_rocp | ||
| xlv = con_hvap | ||
| xlf = con_hfus | ||
| ep1 = con_fvirt | ||
| ep2 = con_eps | ||
|
|
||
| ep3 = 1.-ep2 | ||
| g_inv = 1.0/grav | ||
| rvovrd = Rv/Rd | ||
|
|
||
| !$acc update device(cp, grav, Rd, Rv, rovcp, xlv, xlf, & | ||
| !$acc ep1, ep2, ep3, g_inv, rvovrd) | ||
| end subroutine sf_mynn_init | ||
|
|
||
|
|
||
| !------------------------------------------------------------------- | ||
| !------------------------------------------------------------------- | ||
| !>\ingroup mynn_sfc | ||
|
|
@@ -2270,7 +2296,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & | |
| !$acc THSK_lnd, THSK_wat, THSK_ice, & | ||
| !$acc QSFC_lnd, QSFC_wat, QSFC_ice, & | ||
| !$acc U10, V10, U1D, V1D, U1D2, V1D2, & | ||
| !$acc ZNTstoch_lnd, ZNTstoch_lnd, ZNTstoch_ice, & | ||
| !$acc ZNTstoch_lnd, ZNTstoch_wat, ZNTstoch_ice, & | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha. Nice catches. Were these caught with an AI tool or something? |
||
| !$acc PSIX_lnd, PSIX_wat, PSIX_ice, & | ||
| !$acc PSIX10_lnd, PSIX10_wat, PSIX10_ice, & | ||
| !$acc PSIT2_lnd, PSIT2_wat, PSIT2_ice, & | ||
|
|
@@ -2392,7 +2418,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & | |
| !----------------------------------------------------- | ||
| !$acc serial present(dry, wet, icy, CPM, MAVAIL, & | ||
| !$acc HFX, LH, wstar, RHO1D, PBLH, ZOL, ZA, MOL, & | ||
| !$acc PSIM, PSIH, WSTAR, T1D, TH1D, THV1D, QVSH, & | ||
| !$acc PSIM, PSIH, T1D, TH1D, THV1D, QVSH, & | ||
| !$acc UST_wat, UST_lnd, UST_ice, & | ||
| !$acc THSK_wat, THSK_lnd, THSK_ice, & | ||
| !$acc THVSK_wat, THVSK_lnd, THVSK_ice, & | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
Same question RE: initializing to 1000.0 as in the physics PR