Changeset 599 for codes/icosagcm/trunk/src/time/timeloop_gcm.f90
- Timestamp:
- 10/19/17 17:04:26 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/time/timeloop_gcm.f90
r581 r599 168 168 USE caldyn_mod 169 169 USE advect_tracer_mod 170 USE diagflux_mod 170 171 USE physics_mod 171 172 USE mpipara … … 181 182 REAL(rstd),POINTER :: rhodz(:,:), mass(:,:), ps(:) 182 183 183 INTEGER :: ind184 INTEGER :: i t,i,j,l,n, stage185 LOGICAL :: fluxt_zero(ndomain) ! set to .TRUE. to start accumulating fluxes in time184 REAL(rstd) :: adv_over_out ! ratio itau_adv/itau_out 185 INTEGER :: ind, it,i,j,l,n, stage 186 LOGICAL :: fluxt_zero(ndomain) ! set to .TRUE. to start accumulating mass fluxes in time 186 187 LOGICAL, PARAMETER :: check_rhodz=.FALSE. 187 188 INTEGER :: start_clock, stop_clock, rate_clock … … 210 211 211 212 IF(positive_theta) CALL copy_theta_to_q(f_theta_rhodz,f_rhodz,f_q) 213 IF(diagflux_on) THEN 214 adv_over_out = itau_adv*(1./itau_out) 215 ELSE 216 adv_over_out = 0. 217 END IF 212 218 213 219 CALL check_conserve(f_ps,f_dps,f_u,f_theta_rhodz,f_phis,itau0) 214 220 215 C ALLtrace_on221 Call trace_on 216 222 217 223 IF (xios_output) THEN ! we must call update_calendar before any XIOS output … … 267 273 CALL HEVI_scheme(it, fluxt_zero) 268 274 END SELECT 269 275 270 276 IF (MOD(it,itau_dissip)==0) THEN 271 277 … … 298 304 299 305 IF(MOD(it,itau_adv)==0) THEN 300 CALL advect_tracer(f_hfluxt,f_wfluxt,f_u, f_q,f_rhodz) ! update q and rhodz after RK step 301 fluxt_zero=.TRUE. 302 ! FIXME : check that rhodz is consistent with ps 303 IF (check_rhodz) THEN 306 CALL advect_tracer(f_hfluxt,f_wfluxt,f_u, f_q,f_rhodz, & ! update q and rhodz after RK step 307 adv_over_out, f_masst,f_qmasst,f_massfluxt, f_qfluxt) ! accumulate mass and fluxes if diagflux_on 308 fluxt_zero=.TRUE. ! restart accumulation of hfluxt and qfluxt at next call to explicit_scheme / HEVI_scheme 309 ! At this point advect_tracer has obtained the halos of u and rhodz, 310 ! needed for correct computation of kinetic energy 311 IF(diagflux_on) CALL diagflux_energy(adv_over_out, f_phis,f_rhodz,f_theta_rhodz,f_u, f_geopot,f_theta, f_hfluxt) 312 313 IF (check_rhodz) THEN ! check that rhodz is consistent with ps 304 314 DO ind=1,ndomain 305 315 IF (.NOT. assigned_domain(ind)) CYCLE
Note: See TracChangeset
for help on using the changeset viewer.