-
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
NoahMP CCPP-compliancy #305
Merged
Merged
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e48c99c
initial addition of CCPP metadata for NoahMP
grantfirl 366378c
Merge branch 'fix_LSM_units' into noahmp
grantfirl 6236796
put sfc_noahmp_drv.f in module; add init/finalize + meta file html br…
grantfirl 747c5a4
fix soil_moisture_content unit error
grantfirl aa5aec7
add CCPP error variables to sfc_noahmp_drv.f and fix local name error…
grantfirl e5e6b78
add NoahMP interstitial code (only pre routine needed for GFS suite f…
grantfirl 6c2cab8
send physical constants through the argument list
grantfirl 24b8942
remove WRF error handling in favor of CCPP error handling
grantfirl 1098500
pass errmsg and errflg down call chain
grantfirl dab6e6d
move NoahMP calculation of julian day and year length to GFS_time_var…
grantfirl d0af67a
add set_soilveg to noahmpdrv_init
grantfirl 3e2f892
add calculation of sncovr to GFS_surface_generic_pre_run (not to init…
grantfirl 78523cf
add calculation of sncovr to GFS_phys_time_vary_run (not to init beca…
grantfirl 64f70df
Merge branch 'fix_sncovr' into noahmp
grantfirl 6d04c51
Merge branch 'gmtb/develop' into noahmp
grantfirl af34508
fix GFS_time_vary_pre.fv3.F90 compilation error
grantfirl 619afe0
add calculation of precipitation variables for NoahMP in GFS_MP_gener…
grantfirl de728a8
add resetting of sfcprop%t2m and q2m to values from noahmp if noahmp …
grantfirl 775f4ff
(temporarily?) move calculation of precip rates for NoahMP to scheme-…
grantfirl a311364
Merge branch 'gmtb/develop' into noahmp
grantfirl e7bb31a
revert whitespace changes to GFS_MP_generic.F90
grantfirl 69c215f
fix bug in metadata table for GFS_phys_time_vary_run for FV3
grantfirl 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
!> \file noahmp_pre.F90 | ||
!! This file contains subroutines that prepare data for the NoahMP land surface model scheme | ||
!! as part of the GFS physics suite. | ||
module noahmp_pre | ||
|
||
implicit none | ||
|
||
contains | ||
|
||
subroutine noahmp_pre_init() | ||
end subroutine noahmp_pre_init | ||
|
||
subroutine noahmp_pre_finalize() | ||
end subroutine noahmp_pre_finalize | ||
|
||
!> \section arg_table_noahmp_pre_run Argument Table | ||
!! \htmlinclude noahmp_pre_run.html | ||
!! | ||
subroutine noahmp_pre_run (jdat, julian, yearlen, errmsg, errflg) | ||
|
||
use machine, only : kind_phys | ||
implicit none | ||
|
||
integer, intent(in) :: jdat(1:8) | ||
|
||
real(kind=kind_phys), intent(out) :: julian | ||
integer , intent(out) :: yearlen | ||
|
||
character(len=*), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
integer :: iw3jdn | ||
integer :: jd0, jd1 | ||
real :: fjd | ||
|
||
|
||
! Initialize CCPP error handling variables | ||
errmsg = '' | ||
errflg = 0 | ||
|
||
! Julian day calculation (fcst day of the year) | ||
! we need yearln and julian to | ||
! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 | ||
! jdat is changing | ||
! | ||
|
||
jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) | ||
jd0 = iw3jdn(jdat(1),1,1) | ||
fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 | ||
|
||
julian = float(jd1-jd0) + fjd | ||
|
||
! | ||
! Year length | ||
! | ||
! what if the integration goes from one year to another? | ||
! iyr or jyr ? from 365 to 366 or from 366 to 365 | ||
! | ||
! is this against model's noleap yr assumption? | ||
if (mod(jdat(1),4) == 0) then | ||
yearlen = 366 | ||
if (mod(jdat(1),100) == 0) then | ||
yearlen = 365 | ||
if (mod(jdat(1),400) == 0) then | ||
yearlen = 366 | ||
endif | ||
endif | ||
endif | ||
|
||
end subroutine noahmp_pre_run | ||
|
||
end module noahmp_pre |
This file contains 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[ccpp-arg-table] | ||
name = noahmp_pre_run | ||
type = scheme | ||
[jdat] | ||
standard_name = forecast_date_and_time | ||
long_name = current forecast date and time | ||
units = none | ||
dimensions = (8) | ||
type = integer | ||
intent = in | ||
optional = F | ||
[julian] | ||
standard_name = julian_day | ||
long_name = julian day | ||
units = days | ||
dimensions = () | ||
type = real | ||
kind = kind_phys | ||
intent = out | ||
optional = F | ||
[yearlen] | ||
standard_name = number_of_days_in_year | ||
long_name = number of days in a year | ||
units = days | ||
dimensions = () | ||
type = integer | ||
intent = out | ||
optional = F | ||
[errmsg] | ||
standard_name = ccpp_error_message | ||
long_name = error message for error handling in CCPP | ||
units = none | ||
dimensions = () | ||
type = character | ||
kind = len=* | ||
intent = out | ||
optional = F | ||
[errflg] | ||
standard_name = ccpp_error_flag | ||
long_name = error flag for error handling in CCPP | ||
units = flag | ||
dimensions = () | ||
type = integer | ||
intent = out | ||
optional = F |
Oops, something went wrong.
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.
@climbfuji This code for calculating julian day and the year length was in GFS_physics_driver.F90, so I initially put this code in a NoahMP-specific interstitial scheme, but thinking a bit more, this code does not depend on location (only time), so why couldn't it be put in GFS_time_vary_pre_run where other time-related quantities are calculated to save some CPU cycles?
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 sounds like a reasonable idea to me!
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, thanks, I'll do that.