-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix NoahMP precip rates #14
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,27 +200,27 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & | |
num = num + 1 | ||
Restart%name2d(num) = 'ruc_2d_raincprv' | ||
do nb = 1,nblks | ||
Restart%data(nb,num)%var2p => Tbd(nb)%raincprv(:) | ||
Restart%data(nb,num)%var2p => Sfcprop(nb)%raincprv(:) | ||
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. I assume that for b4b identical results through restarts, we need to do something similar for all those RUC previous-precipitation variables, as well as for the d...prv versions? See NCAR/ccpp-physics#367 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. Yes. I commented on the issue. I'm not worrying about this because from looking at GFS_restart, it seems to me that NoahMP wouldn't have working restarts with or without CCPP, and is thus not our responsibility to fix it. |
||
enddo | ||
num = num + 1 | ||
Restart%name2d(num) = 'ruc_2d_rainncprv' | ||
do nb = 1,nblks | ||
Restart%data(nb,num)%var2p => Tbd(nb)%rainncprv(:) | ||
Restart%data(nb,num)%var2p => Sfcprop(nb)%rainncprv(:) | ||
enddo | ||
num = num + 1 | ||
Restart%name2d(num) = 'ruc_2d_iceprv' | ||
do nb = 1,nblks | ||
Restart%data(nb,num)%var2p => Tbd(nb)%iceprv(:) | ||
Restart%data(nb,num)%var2p => Sfcprop(nb)%iceprv(:) | ||
enddo | ||
num = num + 1 | ||
Restart%name2d(num) = 'ruc_2d_snowprv' | ||
do nb = 1,nblks | ||
Restart%data(nb,num)%var2p => Tbd(nb)%snowprv(:) | ||
Restart%data(nb,num)%var2p => Sfcprop(nb)%snowprv(:) | ||
enddo | ||
num = num + 1 | ||
Restart%name2d(num) = 'ruc_2d_graupelprv' | ||
do nb = 1,nblks | ||
Restart%data(nb,num)%var2p => Tbd(nb)%graupelprv(:) | ||
Restart%data(nb,num)%var2p => Sfcprop(nb)%graupelprv(:) | ||
enddo | ||
endif | ||
! MYNN SFC | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,6 +370,21 @@ module GFS_typedefs | |
real (kind=kind_phys), pointer :: chs2(:) => null() !exch coeff for heat at 2m | ||
real (kind=kind_phys), pointer :: cqs2(:) => null() !exch coeff for moisture at 2m | ||
real (kind=kind_phys), pointer :: lh(:) => null() !latent heating at the surface | ||
|
||
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. I had to move lines 373 to 387 outside of the |
||
!---- precipitation amounts from previous time step for RUC LSM | ||
real (kind=kind_phys), pointer :: raincprv (:) => null() !< explicit rainfall from previous timestep | ||
real (kind=kind_phys), pointer :: rainncprv (:) => null() !< convective_precipitation_amount from previous timestep | ||
real (kind=kind_phys), pointer :: iceprv (:) => null() !< ice amount from previous timestep | ||
real (kind=kind_phys), pointer :: snowprv (:) => null() !< snow amount from previous timestep | ||
real (kind=kind_phys), pointer :: graupelprv(:) => null() !< graupel amount from previous timestep | ||
|
||
!---- precipitation rates from previous time step for NoahMP LSM | ||
real (kind=kind_phys), pointer :: draincprv (:) => null() !< convective precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: drainncprv (:) => null() !< explicit rainfall rate from previous timestep | ||
real (kind=kind_phys), pointer :: diceprv (:) => null() !< ice precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: dsnowprv (:) => null() !< snow precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: dgraupelprv(:) => null() !< graupel precipitation rate from previous timestep | ||
|
||
#endif | ||
|
||
contains | ||
|
@@ -1192,20 +1207,6 @@ module GFS_typedefs | |
real (kind=kind_phys), pointer :: prevst (:,:) => null() !< | ||
real (kind=kind_phys), pointer :: prevsq (:,:) => null() !< | ||
integer, pointer :: cactiv (:) => null() !< convective activity memory contour | ||
|
||
!---- precipitation amounts from previous time step for RUC LSM | ||
real (kind=kind_phys), pointer :: raincprv (:) => null() !< explicit rainfall from previous timestep | ||
real (kind=kind_phys), pointer :: rainncprv (:) => null() !< convective_precipitation_amount from previous timestep | ||
real (kind=kind_phys), pointer :: iceprv (:) => null() !< ice amount from previous timestep | ||
real (kind=kind_phys), pointer :: snowprv (:) => null() !< snow amount from previous timestep | ||
real (kind=kind_phys), pointer :: graupelprv(:) => null() !< graupel amount from previous timestep | ||
|
||
!---- precipitation rates from previous time step for NoahMP LSM | ||
real (kind=kind_phys), pointer :: draincprv (:) => null() !< convective precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: drainncprv (:) => null() !< explicit rainfall rate from previous timestep | ||
real (kind=kind_phys), pointer :: diceprv (:) => null() !< ice precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: dsnowprv (:) => null() !< snow precipitation rate from previous timestep | ||
real (kind=kind_phys), pointer :: dgraupelprv(:) => null() !< graupel precipitation rate from previous timestep | ||
|
||
!--- MYNN prognostic variables that can't be in the Intdiag or Interstitial DDTs | ||
real (kind=kind_phys), pointer :: CLDFRA_BL (:,:) => null() ! | ||
|
@@ -2207,7 +2208,18 @@ subroutine sfcprop_create (Sfcprop, IM, Model) | |
Sfcprop%dt_cool = zero | ||
Sfcprop%qrain = zero | ||
endif | ||
|
||
if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then | ||
allocate(Sfcprop%raincprv (IM)) | ||
allocate(Sfcprop%rainncprv (IM)) | ||
allocate(Sfcprop%iceprv (IM)) | ||
allocate(Sfcprop%snowprv (IM)) | ||
allocate(Sfcprop%graupelprv(IM)) | ||
Sfcprop%raincprv = clear_val | ||
Sfcprop%rainncprv = clear_val | ||
Sfcprop%iceprv = clear_val | ||
Sfcprop%snowprv = clear_val | ||
Sfcprop%graupelprv = clear_val | ||
end if | ||
! Noah MP allocate and init when used | ||
! | ||
if (Model%lsm == Model%lsm_noahmp ) then | ||
|
@@ -2290,7 +2302,19 @@ subroutine sfcprop_create (Sfcprop, IM, Model) | |
Sfcprop%tsnoxy = clear_val | ||
Sfcprop%smoiseq = clear_val | ||
Sfcprop%zsnsoxy = clear_val | ||
|
||
|
||
allocate(Sfcprop%draincprv (IM)) | ||
allocate(Sfcprop%drainncprv (IM)) | ||
allocate(Sfcprop%diceprv (IM)) | ||
allocate(Sfcprop%dsnowprv (IM)) | ||
allocate(Sfcprop%dgraupelprv(IM)) | ||
|
||
Sfcprop%draincprv = clear_val | ||
Sfcprop%drainncprv = clear_val | ||
Sfcprop%diceprv = clear_val | ||
Sfcprop%dsnowprv = clear_val | ||
Sfcprop%dgraupelprv = clear_val | ||
|
||
endif | ||
|
||
#ifdef CCPP | ||
|
@@ -2330,6 +2354,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) | |
allocate (Sfcprop%xlaixy (IM)) | ||
Sfcprop%xlaixy = clear_val | ||
end if | ||
|
||
end if | ||
if (Model%do_mynnsfclay) then | ||
! For MYNN surface layer scheme | ||
|
@@ -2359,6 +2384,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) | |
allocate (Sfcprop%conv_act(IM)) | ||
Sfcprop%conv_act = zero | ||
end if | ||
|
||
#endif | ||
|
||
end subroutine sfcprop_create | ||
|
@@ -4880,32 +4906,6 @@ subroutine tbd_create (Tbd, IM, Model) | |
Tbd%cactiv = zero | ||
end if | ||
|
||
if (Model%lsm == Model%lsm_ruc) then | ||
allocate(Tbd%raincprv (IM)) | ||
allocate(Tbd%rainncprv (IM)) | ||
allocate(Tbd%iceprv (IM)) | ||
allocate(Tbd%snowprv (IM)) | ||
allocate(Tbd%graupelprv(IM)) | ||
Tbd%raincprv = clear_val | ||
Tbd%rainncprv = clear_val | ||
Tbd%iceprv = clear_val | ||
Tbd%snowprv = clear_val | ||
Tbd%graupelprv = clear_val | ||
end if | ||
|
||
if (Model%lsm == Model%lsm_noahmp) then | ||
allocate(Tbd%draincprv (IM)) | ||
allocate(Tbd%drainncprv (IM)) | ||
allocate(Tbd%diceprv (IM)) | ||
allocate(Tbd%dsnowprv (IM)) | ||
allocate(Tbd%dgraupelprv(IM)) | ||
Tbd%draincprv = clear_val | ||
Tbd%drainncprv = clear_val | ||
Tbd%diceprv = clear_val | ||
Tbd%dsnowprv = clear_val | ||
Tbd%dgraupelprv = clear_val | ||
end if | ||
|
||
!--- MYNN variables: | ||
if (Model%do_mynnedmf) then | ||
!print*,"Allocating all MYNN-EDMF variables:" | ||
|
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 line doesn't compile, needs to be Model%lm==Model%lsm_noamp. I fixed this in #15