-
Notifications
You must be signed in to change notification settings - Fork 164
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
Updated land perturbation scheme #148
Changes from all commits
6587ec6
c136caf
b0315a7
8c7305c
069b58e
5a20c62
1cef958
142a549
472f674
a5c653a
6da74eb
5c2669b
ef26a23
5c57a58
4cc6e04
c2b4d20
03332e0
35df12e
458e5be
f52214d
02160db
4856f8f
2fdca27
bba8815
dee00b4
e268506
25a039e
9aa3e37
60d6b32
e56e33a
3177ce1
6e6658e
71ca8e4
4e6e1b0
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 |
---|---|---|
|
@@ -297,7 +297,9 @@ subroutine update_atmos_radiation_physics (Atmos) | |
#endif | ||
|
||
!--- call stochastic physics pattern generation / cellular automata | ||
call stochastic_physics_wrapper(IPD_Control, IPD_Data, Atm_block) | ||
call stochastic_physics_wrapper(IPD_Control, IPD_Data, Atm_block, ierr) | ||
if (ierr/=0) call mpp_error(FATAL, 'Call to stochastic_physics_wrapper failed') | ||
|
||
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. Thanks for adding these error checks. |
||
|
||
!--- if coupled, assign coupled fields | ||
|
||
|
@@ -628,7 +630,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) | |
#endif | ||
|
||
!--- Initialize stochastic physics pattern generation / cellular automata for first time step | ||
call stochastic_physics_wrapper(IPD_Control, IPD_Data, Atm_block) | ||
call stochastic_physics_wrapper(IPD_Control, IPD_Data, Atm_block, ierr) | ||
if (ierr/=0) call mpp_error(FATAL, 'Call to stochastic_physics_wrapper failed') | ||
|
||
Atmos%Diag => IPD_Diag | ||
|
||
|
+2 −2 | physics/GFS_MP_generic.meta | |
+1 −1 | physics/GFS_debug.F90 | |
+8 −5 | physics/GFS_rrtmg_pre.F90 | |
+22 −14 | physics/GFS_rrtmgp_sw_pre.F90 | |
+29 −20 | physics/GFS_rrtmgp_sw_pre.meta | |
+2 −2 | physics/GFS_stochastics.meta | |
+32 −39 | physics/GFS_surface_generic.F90 | |
+34 −52 | physics/GFS_surface_generic.meta | |
+3 −3 | physics/radiation_surface.f | |
+14 −2 | physics/rrtmg_sw_pre.F90 | |
+3 −3 | physics/sfc_drv.f | |
+1 −1 | physics/sfc_drv.meta |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -660,6 +660,7 @@ subroutine GFS_physics_driver & | |
real :: pshltr,QCQ,rh02 | ||
real(kind=kind_phys), allocatable, dimension(:,:) :: den | ||
|
||
real(kind=kind_phys) :: lndp_vgf | ||
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. At some point we agreed to no longer accept changes to IPD unless they are backports of GFS v16 implementation bug fixes. Just mentioning it here, but I am not going to ask you to change anything. |
||
!! Initialize local variables (for debugging purposes only, | ||
!! because the corresponding variables Interstitial(nt)%... | ||
!! are reset to zero every time). | ||
|
@@ -928,34 +929,28 @@ subroutine GFS_physics_driver & | |
! alb1d(i) = zero | ||
vegf1d(i) = zero | ||
enddo | ||
if (Model%do_sfcperts) then | ||
if (Model%pertz0(1) > zero) then | ||
z01d(:) = Model%pertz0(1) * Coupling%sfc_wts(:,1) | ||
! if (me == 0) print*,'Coupling%sfc_wts(:,1) min and max',minval(Coupling%sfc_wts(:,1)),maxval(Coupling%sfc_wts(:,1)) | ||
! if (me == 0) print*,'z01d min and max ',minval(z01d),maxval(z01d) | ||
endif | ||
if (Model%pertzt(1) > zero) then | ||
zt1d(:) = Model%pertzt(1) * Coupling%sfc_wts(:,2) | ||
endif | ||
if (Model%pertshc(1) > zero) then | ||
bexp1d(:) = Model%pertshc(1) * Coupling%sfc_wts(:,3) | ||
endif | ||
if (Model%pertlai(1) > zero) then | ||
xlai1d(:) = Model%pertlai(1) * Coupling%sfc_wts(:,4) | ||
endif | ||
! --- do the albedo percentile calculation in GFS_radiation_driver instead --- ! | ||
! if (Model%pertalb(1) > zero) then | ||
! do i=1,im | ||
! call cdfnor(Coupling%sfc_wts(i,5),cdfz) | ||
! alb1d(i) = cdfz | ||
! enddo | ||
! endif | ||
if (Model%pertvegf(1) > zero) then | ||
do i=1,im | ||
call cdfnor(Coupling%sfc_wts(i,6),cdfz) | ||
vegf1d(i) = cdfz | ||
enddo | ||
endif | ||
lndp_vgf=-999. | ||
|
||
if (Model%lndp_type==1) then | ||
do k =1,Model%n_var_lndp | ||
select case(Model%lndp_var_list(k)) | ||
case ('rz0') | ||
z01d(:) = Model%lndp_prt_list(k)* Coupling%sfc_wts(:,k) | ||
case ('rzt') | ||
zt1d(:) = Model%lndp_prt_list(k)* Coupling%sfc_wts(:,k) | ||
case ('shc') | ||
bexp1d(:) = Model%lndp_prt_list(k) * Coupling%sfc_wts(:,k) | ||
case ('lai') | ||
xlai1d(:) = Model%lndp_prt_list(k)* Coupling%sfc_wts(:,k) | ||
case ('vgf') | ||
! note that the pertrubed vegfrac is being used in sfc_drv, but not sfc_diff | ||
do i=1,im | ||
call cdfnor(Coupling%sfc_wts(i,k),cdfz) | ||
vegf1d(i) = cdfz | ||
enddo | ||
lndp_vgf = Model%lndp_prt_list(k) | ||
end select | ||
enddo | ||
endif | ||
!*## CCPP ## | ||
! | ||
|
@@ -1856,6 +1851,7 @@ subroutine GFS_physics_driver & | |
! &,' pgr=',pgr(ipr),' sfcemis=',sfcemis(ipr) | ||
|
||
!## CCPP ##* sfc_drv.f/lsm_noah_run | ||
|
||
call sfc_drv & | ||
! --- inputs: | ||
(im, lsoil, Statein%pgr, & | ||
|
@@ -1867,7 +1863,8 @@ subroutine GFS_physics_driver & | |
Sfcprop%shdmin, Sfcprop%shdmax, Sfcprop%snoalb, & | ||
Radtend%sfalb, flag_iter, flag_guess, Model%lheatstrg, & | ||
Model%isot, Model%ivegsrc, & | ||
bexp1d, xlai1d, vegf1d, Model%pertvegf, & | ||
bexp1d, xlai1d, vegf1d,lndp_vgf, & | ||
|
||
! --- input/output: | ||
weasd3(:,1), snowd3(:,1), tsfc3(:,1), tprcp3(:,1), & | ||
Sfcprop%srflag, smsoil, stsoil, slsoil, Sfcprop%canopy, & | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1221,6 +1221,7 @@ subroutine GFS_radiation_driver & | |
|
||
! mg, sfc perts | ||
real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: alb1d | ||
real(kind=kind_phys) :: lndp_alb | ||
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. Same as for |
||
|
||
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+ltp) :: cldtausw | ||
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+ltp) :: cldtaulw | ||
|
@@ -1846,14 +1847,18 @@ subroutine GFS_radiation_driver & | |
! --- scale random patterns for surface perturbations with | ||
! perturbation size | ||
! --- turn vegetation fraction pattern into percentile pattern | ||
alb1d(:) = zero | ||
if (Model%do_sfcperts) then | ||
if (Model%pertalb(1) > zero) then | ||
do i=1,im | ||
call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) | ||
enddo | ||
alb1d(:) = 0. | ||
lndp_alb = -999. | ||
if (Model%lndp_type ==1) then | ||
do k =1,Model%n_var_lndp | ||
if (Model%lndp_var_list(k) == 'alb') then | ||
do i=1,im | ||
call cdfnor(Coupling%sfc_wts(i,k),alb1d(i)) | ||
lndp_alb = Model%lndp_prt_list(k) | ||
enddo | ||
endif | ||
enddo | ||
endif | ||
endif | ||
! mg, sfc-perts | ||
!*## CCPP ## | ||
|
||
|
@@ -1870,7 +1875,7 @@ subroutine GFS_radiation_driver & | |
Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & | ||
Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & | ||
Sfcprop%tisfc, IM, & | ||
alb1d, Model%pertalb, & ! mg, sfc-perts | ||
alb1d, lndp_alb, & ! mg, sfc-perts | ||
sfcalb) ! --- outputs | ||
|
||
!> -# Approximate mean surface albedo from vis- and nir- diffuse values. | ||
|
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.
Thanks for reverting
.gitmodules
to where it was originally (the new version in this PR is how it should be, no need to add.git
and also good to remove the unnecessary double whitespace and the trailing whitespace below.