CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
GFS_suite_stateout_update.F90
1
7 use machine, only: kind_phys
8 use module_ozphys, only: ty_ozphys
9 implicit none
10contains
11
15 subroutine gfs_suite_stateout_update_run (im, levs, ntrac, dtp, tgrs, ugrs, vgrs, qgrs, &
16 dudt, dvdt, dtdt, dqdt, gt0, gu0, gv0, gq0, oz0, ntiw, nqrimef, imp_physics, &
17 imp_physics_fer_hires, epsq, ozphys, oz_phys_2015, oz_phys_2006, con_1ovg, prsl, &
18 dp, ozpl, qdiag3d, do3_dt_prd, do3_dt_ozmx, do3_dt_temp, do3_dt_ohoz, errmsg, errflg)
19
20 ! Inputs
21 integer, intent(in ) :: im
22 integer, intent(in ) :: levs
23 integer, intent(in ) :: ntrac
24 integer, intent(in ) :: imp_physics,imp_physics_fer_hires
25 integer, intent(in ) :: ntiw, nqrimef
26 real(kind=kind_phys), intent(in ) :: dtp, epsq, con_1ovg
27 real(kind=kind_phys), intent(in ), dimension(:,:) :: tgrs, ugrs, vgrs, prsl, dp
28 real(kind=kind_phys), intent(in ), dimension(:,:,:) :: qgrs, ozpl
29 real(kind=kind_phys), intent(in ), dimension(:,:) :: dudt, dvdt, dtdt
30 real(kind=kind_phys), intent(in ), dimension(:,:,:) :: dqdt
31 logical, intent(in) :: qdiag3d
32 logical, intent(in) :: oz_phys_2015
33 logical, intent(in) :: oz_phys_2006
34 type(ty_ozphys), intent(in) :: ozphys
35
36 ! Outputs (optional)
37 real(kind=kind_phys), intent(inout), dimension(:,:), optional :: &
38 do3_dt_prd, & ! Physics tendency: production and loss effect
39 do3_dt_ozmx, & ! Physics tendency: ozone mixing ratio effect
40 do3_dt_temp, & ! Physics tendency: temperature effect
41 do3_dt_ohoz ! Physics tendency: overhead ozone effect
42
43 ! Outputs
44 real(kind=kind_phys), intent(out), dimension(:,:) :: gt0, gu0, gv0, oz0
45 real(kind=kind_phys), intent(out), dimension(:,:,:) :: gq0
46 character(len=*), intent(out) :: errmsg
47 integer, intent(out) :: errflg
48
49 ! Locals
50 integer :: i, k
51
52 ! Initialize CCPP error handling variables
53 errmsg = ''
54 errflg = 0
55
56 ! Update prognostic state varaibles using accumulated tendencies from "process-split"
57 ! section of GFS suite.
58 gt0(:,:) = tgrs(:,:) + dtdt(:,:) * dtp
59 gu0(:,:) = ugrs(:,:) + dudt(:,:) * dtp
60 gv0(:,:) = vgrs(:,:) + dvdt(:,:) * dtp
61 gq0(:,:,:) = qgrs(:,:,:) + dqdt(:,:,:) * dtp
62
63 ! If using photolysis physics schemes, update (prognostic) gas concentrations using
64 ! updated state.
65 if (oz_phys_2015) then
66 call ozphys%run_o3prog_2015(con_1ovg, dtp, prsl, gt0, dp, ozpl, oz0, qdiag3d, &
67 do3_dt_prd, do3_dt_ozmx, do3_dt_temp, do3_dt_ohoz)
68 endif
69 if (oz_phys_2006) then
70 call ozphys%run_o3prog_2006(con_1ovg, dtp, prsl, gt0, dp, ozpl, oz0, qdiag3d, &
71 do3_dt_prd, do3_dt_ozmx, do3_dt_temp, do3_dt_ohoz)
72 endif
73
74 ! If using Ferrier-Aligo microphysics, set bounds on the mass-weighted rime factor.
75 if (imp_physics == imp_physics_fer_hires) then
76 do k=1,levs
77 do i=1,im
78 if(gq0(i,k,ntiw) > epsq) then
79 gq0(i,k,nqrimef) = max(1., gq0(i,k,nqrimef)/gq0(i,k,ntiw))
80 else
81 gq0(i,k,nqrimef) = 1.
82 end if
83 end do
84 end do
85 end if
86
87 end subroutine gfs_suite_stateout_update_run
88
The operational GFS currently parameterizes ozone production and destruction based on monthly mean co...
Derived type containing data and procedures needed by ozone photochemistry parameterization Note All ...