55 use gfs_physics_internal_state_mod
, ONLY: gfs_physics_internal_state
56 USE date_def
, ONLY: fhour, zhour
57 USE namelist_physics_def
, ONLY: nsout,ldfi,ndfi,nsout_hf, fhmax_hf
58 use gfs_phy_tracer_config
, ONLY: gfs_phy_tracer
60 use resol_def
, only: kdt_start
68 type(gfs_physics_internal_state),
pointer,
intent(inout) :: gis_phy
69 integer,
optional,
intent(out) :: rc
71 real ,
save :: timestep=0.0
72 integer rc1, k , i1, i2, i3, kdt_dif
107 if (fhmax_hf > 0 .and. nsout_hf > 0 .and. gis_phy%phour <= fhmax_hf &
108 .and. gis_phy%kdt*gis_phy%deltim <= fhmax_hf*3600.)
then 109 lsout1 = mod(gis_phy%kdt ,nsout_hf) == 0
111 lsout1 = mod(gis_phy%kdt ,nsout) == 0
114 kdt_dif = gis_phy%kdt - kdt_start
116 gis_phy%lsout = lsout1 .or. gis_phy%kdt == 1
118 gis_phy%lsout = lsout1 .and. &
119 (kdt_dif <= ndfi/2 .or. kdt_dif > ndfi) .or. gis_phy%kdt == 1
140 if( ndfi > 0 .and. kdt_dif == ndfi/2+1 .and. .not. ldfi )
then 141 call dfi_fixwr(2, gis_phy%sfc_fld, gis_phy%flx_fld, gis_phy%nst_fld)
145 if ( gis_phy%lgocart )
then 148 i1 = gfs_phy_tracer%ntrac_met+1
149 i2 = gfs_phy_tracer%ntrac
152 i2 = gis_phy%lats_node_r_max
154 gis_phy%flx_fld%wet1(1:i1,1:i2) = 0.
155 gis_phy%g3d_fld%fcld(1:i1,1:i2,1:i3) = 0.
156 gis_phy%g3d_fld%dqdt(1:i1,1:i2,1:i3) = 0.
157 gis_phy%g3d_fld%cnv_mfc(1:i1,1:i2,1:i3) = 0.
158 gis_phy%g3d_fld%cnv_mfd(1:i1,1:i2,1:i3) = 0.
159 gis_phy%g3d_fld%cnv_qc(1:i1,1:i2,1:i3) = 0.
162 tem = (gis_phy%kdt-1) * gis_phy%deltim / 3600.0
163 if (gis_phy%phour > tem) gis_phy%phour = tem
171 gis_phy%deltim, gis_phy%kdt, gis_phy%phour, &
172 gis_phy%grid_fld, gis_phy%sfc_fld, gis_phy%flx_fld, &
173 gis_phy%nst_fld, gis_phy%g3d_fld, gis_phy%g2d_fld, &
174 gis_phy%aoi_fld, gis_phy%importData, &
175 gis_phy%lats_nodes_r, gis_phy%global_lats_r, &
176 gis_phy%lonsperlar, &
177 gis_phy%XLON, gis_phy%XLAT, gis_phy%COSZDG, &
178 gis_phy%HPRIME, gis_phy%SWH, gis_phy%swhc, &
179 gis_phy%HLW, gis_phy%hlwc, &
182 gis_phy%FLUXR, gis_phy%SFALB, &
183 gis_phy%SLAG, gis_phy%SDEC, gis_phy%CDEC, &
184 gis_phy%OZPLIN, gis_phy%JINDX1, gis_phy%JINDX2, &
185 gis_phy%DDY, gis_phy%h2oplin, gis_phy%jindx1_h, &
186 gis_phy%jindx2_h, gis_phy%ddy_h, &
187 gis_phy%phy_f3d, gis_phy%phy_f2d, gis_phy%phy_fctd, &
189 gis_phy%NBLCK, gis_phy%ZHOUR_DFI, &
191 gis_phy%N3, gis_phy%N4, &
192 gis_phy%LSOUT, gis_phy%COLAT1, gis_phy%CFHOUR1, &
193 gis_phy%restart_step, gis_phy%mdl_parm)
200 if( ldfi .and. kdt_dif == ndfi/2 )
then 202 call dfi_fixwr(1, gis_phy%sfc_fld, gis_phy%flx_fld, gis_phy%nst_fld)
205 gis_phy%phour = fhour
206 gis_phy%zhour = zhour
subroutine do_physics_one_step(deltim, kdt, PHOUR,
subroutine gfs_physics_run(gis_phy, rc)