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

NoahMP CCPP-compliancy #305

Merged
merged 22 commits into from
Sep 19, 2019
Merged
Show file tree
Hide file tree
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 Aug 20, 2019
366378c
Merge branch 'fix_LSM_units' into noahmp
grantfirl Aug 20, 2019
6236796
put sfc_noahmp_drv.f in module; add init/finalize + meta file html br…
grantfirl Aug 20, 2019
747c5a4
fix soil_moisture_content unit error
grantfirl Aug 21, 2019
aa5aec7
add CCPP error variables to sfc_noahmp_drv.f and fix local name error…
grantfirl Aug 21, 2019
e5e6b78
add NoahMP interstitial code (only pre routine needed for GFS suite f…
grantfirl Aug 22, 2019
6c2cab8
send physical constants through the argument list
grantfirl Aug 23, 2019
24b8942
remove WRF error handling in favor of CCPP error handling
grantfirl Aug 24, 2019
1098500
pass errmsg and errflg down call chain
grantfirl Aug 24, 2019
dab6e6d
move NoahMP calculation of julian day and year length to GFS_time_var…
grantfirl Aug 26, 2019
d0af67a
add set_soilveg to noahmpdrv_init
grantfirl Aug 30, 2019
3e2f892
add calculation of sncovr to GFS_surface_generic_pre_run (not to init…
grantfirl Aug 30, 2019
78523cf
add calculation of sncovr to GFS_phys_time_vary_run (not to init beca…
grantfirl Sep 3, 2019
64f70df
Merge branch 'fix_sncovr' into noahmp
grantfirl Sep 3, 2019
6d04c51
Merge branch 'gmtb/develop' into noahmp
grantfirl Sep 3, 2019
af34508
fix GFS_time_vary_pre.fv3.F90 compilation error
grantfirl Sep 3, 2019
619afe0
add calculation of precipitation variables for NoahMP in GFS_MP_gener…
grantfirl Sep 4, 2019
de728a8
add resetting of sfcprop%t2m and q2m to values from noahmp if noahmp …
grantfirl Sep 5, 2019
775f4ff
(temporarily?) move calculation of precip rates for NoahMP to scheme-…
grantfirl Sep 6, 2019
a311364
Merge branch 'gmtb/develop' into noahmp
grantfirl Sep 10, 2019
e7bb31a
revert whitespace changes to GFS_MP_generic.F90
grantfirl Sep 10, 2019
69c215f
fix bug in metadata table for GFS_phys_time_vary_run for FV3
grantfirl Sep 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,093 changes: 3,093 additions & 0 deletions physics/module_sf_noahmp_glacier.f90

Large diffs are not rendered by default.

8,439 changes: 8,439 additions & 0 deletions physics/module_sf_noahmplsm.f90

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions physics/noahmp_pre.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
!> \file noahmp_pre.F90
Copy link
Collaborator Author

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?

Copy link
Collaborator

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!

Copy link
Collaborator Author

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.

!! 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
45 changes: 45 additions & 0 deletions physics/noahmp_pre.meta
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
Loading