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)
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
37 real(kind=kind_phys),
intent(inout),
dimension(:,:),
optional :: &
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
58 gt0(:,:) = tgrs(:,:) + dtdt(:,:) * dtp
59 gu0(:,:) = ugrs(:,:) + dudt(:,:) * dtp
60 gv0(:,:) = vgrs(:,:) + dvdt(:,:) * dtp
61 gq0(:,:,:) = qgrs(:,:,:) + dqdt(:,:,:) * dtp
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)
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)
75 if (imp_physics == imp_physics_fer_hires)
then
78 if(gq0(i,k,ntiw) > epsq)
then
79 gq0(i,k,nqrimef) = max(1., gq0(i,k,nqrimef)/gq0(i,k,ntiw))