Newer
Older
!-------------------------------------------------------------------------------
!
!* 24.1 BALLOON and AIRCRAFT
! --------------------
!
ZTIME1 = ZTIME2
!
IF (LFLYER) &
CALL AIRCRAFT_BALLOON(XTSTEP, &
XXHAT, XYHAT, XZZ, XMAP, XLONORI, XLATORI, &
XUT, XVT, XWT, XPABST, XTHT, XRT, XSVT, XTKET, XTSRAD, &
!-------------------------------------------------------------------------------
!
!* 24.2 STATION (observation diagnostic)
! --------------------------------
!
IF (LSTATION) &
CALL STATION_n(XTSTEP, &
XXHAT, XYHAT, XZZ, &
XUT, XVT, XWT, XTHT, XRT, XSVT, XTKET, XTSRAD, XPABST )
!
!---------------------------------------------------------
!
!* 24.3 PROFILER (observation diagnostic)
! ---------------------------------
!
IF (LPROFILER) &
CALL PROFILER_n(XTSTEP, &
XXHAT, XYHAT, XZZ,XRHODREF, &
XUT, XVT, XWT, XTHT, XRT, XSVT, XTKET, XTSRAD, XPABST, &
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
!
!
CALL SECOND_MNH2(ZTIME2)
!
XT_STEP_MISC = XT_STEP_MISC + ZTIME2 - ZTIME1
!
!-------------------------------------------------------------------------------
!
!* 24.4 deallocation of observation diagnostics
! ---------------------------------------
!
CALL END_DIAG_IN_RUN
!
!-------------------------------------------------------------------------------
!
!
!* 25. STORAGE OF BUDGET FIELDS
! ------------------------
!
ZTIME1 = ZTIME2
!

WAUTELET Philippe
committed
IF ( .NOT. LIO_NO_WRITE ) THEN
IF (NBUMOD==IMI .AND. CBUTYPE/='NONE') THEN

WAUTELET Philippe
committed
CALL ENDSTEP_BUDGET(TDIAFILE,KTCOUNT,TDTCUR,XTSTEP,NSV)

WAUTELET Philippe
committed
END IF
END IF
!
CALL SECOND_MNH2(ZTIME2)
!
XT_STEP_BUD = XT_STEP_BUD + ZTIME2 - ZTIME1 + XTIME_BU
!
!-------------------------------------------------------------------------------
!
!* 26. FM FILE CLOSURE
! ---------------
!

WAUTELET Philippe
committed
IF ( tzbakfile%lopened ) THEN

WAUTELET Philippe
committed
CALL IO_File_close(TZBAKFILE)
END IF
!
!-------------------------------------------------------------------------------
!
!* 27. CURRENT TIME REFRESH
TDTCUR%xtime=TDTCUR%xtime + XTSTEP
CALL DATETIME_CORRECTDATE(TDTCUR)
!
!-------------------------------------------------------------------------------
!
!* 28. CPU ANALYSIS
! ------------
!
CALL SECOND_MNH2(ZTIME2)
XT_START=XT_START+ZTIME2-ZEND
!
!
IF ( KTCOUNT == NSTOP .AND. IMI==1) THEN
OEXIT=.TRUE.
END IF
!
IF (OEXIT) THEN
!

WAUTELET Philippe
committed
IF ( .NOT. LIO_NO_WRITE ) THEN
IF (LSERIES) CALL WRITE_SERIES_n(TDIAFILE)
CALL WRITE_AIRCRAFT_BALLOON(TDIAFILE)
CALL WRITE_STATION_n(TDIAFILE)
CALL WRITE_PROFILER_n(TDIAFILE)

WAUTELET Philippe
committed
call Write_les_n( tdiafile )

WAUTELET Philippe
committed
#ifdef MNH_IOLFI

WAUTELET Philippe
committed
CALL MENU_DIACHRO(TDIAFILE,'END')

WAUTELET Philippe
committed
#endif

WAUTELET Philippe
committed
CALL IO_File_close(TDIAFILE)

WAUTELET Philippe
committed
END IF

WAUTELET Philippe
committed
CALL IO_File_close(TINIFILE)
IF (CSURF=="EXTE") CALL IO_File_close(TINIFILEPGD)
!
!* 28.1 print statistics!
!
! Set File Timing OUTPUT
!

WAUTELET Philippe
committed
CALL SET_ILUOUT_TIMING(TLUOUT)
!
! Compute global time
!
CALL TIME_STAT_ll(XT_START,ZTOT)
!
CALL TIME_HEADER_ll(IMI)
!
CALL TIME_STAT_ll(XT_1WAY,ZTOT, ' ONE WAY','=')
CALL TIME_STAT_ll(XT_BOUND,ZTOT, ' BOUNDARIES','=')
CALL TIME_STAT_ll(XT_STORE,ZTOT, ' STORE-FIELDS','=')
CALL TIME_STAT_ll(TIMEZ%T_WRIT3D_SEND,ZTOT, ' W3D_SEND ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT3D_RECV,ZTOT, ' W3D_RECV ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT3D_WRIT,ZTOT, ' W3D_WRIT ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT3D_WAIT,ZTOT, ' W3D_WAIT ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT3D_ALL ,ZTOT, ' W3D_ALL ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT2D_GATH,ZTOT, ' W2D_GATH ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT2D_WRIT,ZTOT, ' W2D_WRIT ','-')
CALL TIME_STAT_ll(TIMEZ%T_WRIT2D_ALL ,ZTOT, ' W2D_ALL ','-')
CALL TIME_STAT_ll(XT_GUESS,ZTOT, ' INITIAL_GUESS','=')
CALL TIME_STAT_ll(XT_2WAY,ZTOT, ' TWO WAY','=')
CALL TIME_STAT_ll(XT_ADV,ZTOT, ' ADVECTION MET','=')
CALL TIME_STAT_ll(XT_ADVUVW,ZTOT, ' ADVECTION UVW','=')
CALL TIME_STAT_ll(XT_GRAV,ZTOT, ' GRAVITY','=')
CALL TIME_STAT_ll(XT_FORCING,ZTOT, ' FORCING','=')
CALL TIME_STAT_ll(XT_NUDGING,ZTOT, ' NUDGING','=')
CALL TIME_STAT_ll(XT_SOURCES,ZTOT, ' DYN_SOURCES','=')
CALL TIME_STAT_ll(XT_DIFF,ZTOT, ' NUM_DIFF','=')
CALL TIME_STAT_ll(XT_RELAX,ZTOT, ' RELAXATION','=')
!
CALL TIMING_LEGEND()
!
CALL TIME_STAT_ll(XT_PARAM,ZTOT, ' PHYS_PARAM','=')
CALL TIME_STAT_ll(XT_RAD,ZTOT, ' RAD = '//CRAD ,'-')
CALL TIME_STAT_ll(XT_SHADOWS,ZTOT, ' SHADOWS' ,'-')
CALL TIME_STAT_ll(XT_DCONV,ZTOT, ' DEEP CONV = '//CDCONV,'-')
CALL TIME_STAT_ll(XT_GROUND,ZTOT, ' GROUND' ,'-')
CALL TIME_STAT_ll(XT_TURB,ZTOT, ' TURB = '//CTURB ,'-')
CALL TIME_STAT_ll(XT_MAFL,ZTOT, ' MAFL = '//CSCONV,'-')
CALL TIME_STAT_ll(XT_CHEM,ZTOT, ' CHIMIE' ,'-')
CALL TIME_STAT_ll(XT_EOL,ZTOT, ' WIND TURBINE' ,'-')
CALL TIMING_LEGEND()
CALL TIME_STAT_ll(XT_COUPL,ZTOT, ' SET_COUPLING','=')
CALL TIME_STAT_ll(XT_RAD_BOUND,ZTOT, ' RAD_BOUND','=')
!
CALL TIMING_LEGEND()
!
CALL TIME_STAT_ll(XT_PRESS,ZTOT, ' PRESSURE ','=','F')
!JUAN Z_SPLITTING
CALL TIME_STAT_ll(TIMEZ%T_MAP_B_SX_YP2_ZP1,ZTOT, ' REMAP B=>FFTXZ' ,'-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SX_YP2_ZP1_SXP2_Y_ZP1,ZTOT, ' REMAP FFTXZ=>FFTYZ' ,'-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SXP2_Y_ZP1_B,ZTOT, ' REMAP FTTYZ=>B' ,'-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SXP2_Y_ZP1_SXP2_YP1_Z,ZTOT, ' REMAP FFTYZ=>SUBZ' ,'-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_B_SXP2_Y_ZP1,ZTOT, ' REMAP B=>FFTYZ-1','-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SXP2_YP1_Z_SXP2_Y_ZP1,ZTOT, ' REMAP SUBZ=>FFTYZ-1','-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SXP2_Y_ZP1_SX_YP2_ZP1,ZTOT, ' REMAP FFTYZ-1=>FFTXZ-1','-','F')
CALL TIME_STAT_ll(TIMEZ%T_MAP_SX_YP2_ZP1_B,ZTOT, ' REMAP FFTXZ-1=>B ' ,'-','F')
! JUAN P1/P2
CALL TIME_STAT_ll(XT_CLOUD,ZTOT, ' RESOLVED_CLOUD','=')
CALL TIME_STAT_ll(XT_ELEC,ZTOT, ' RESOLVED_ELEC','=')
CALL TIME_STAT_ll(XT_HALO,ZTOT, ' EXCHANGE_HALO','=')
CALL TIME_STAT_ll(XT_STEP_SWA,ZTOT, ' ENDSTEP','=')
CALL TIME_STAT_ll(XT_STEP_BUD,ZTOT, ' BUDGETS','=')
CALL TIME_STAT_ll(XT_SPECTRA,ZTOT, ' LES','=')
CALL TIME_STAT_ll(XT_STEP_MISC,ZTOT, ' MISCELLANEOUS','=')
!
! sum of call subroutine
!
ZALL = XT_1WAY + XT_BOUND + XT_STORE + XT_GUESS + XT_2WAY + &
XT_ADV + XT_FORCING + XT_NUDGING + XT_SOURCES + XT_DIFF + &
XT_RELAX+ XT_PARAM + XT_COUPL + XT_RAD_BOUND+XT_PRESS + &
XT_CLOUD+ XT_ELEC + XT_HALO + XT_SPECTRA + XT_STEP_SWA + &
XT_STEP_MISC+ XT_STEP_BUD
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
CALL TIME_STAT_ll(ZALL,ZTOT, ' SUM(CALL)','=')
CALL TIMING_SEPARATOR('=')
!
! Gobale Stat
!
WRITE(ILUOUT,FMT=*)
WRITE(ILUOUT,FMT=*)
CALL TIMING_LEGEND()
!
! MODELN all included
!
CALL TIMING_SEPARATOR('+')
CALL TIMING_SEPARATOR('+')
WRITE(YMI,FMT="(I0)") IMI
CALL TIME_STAT_ll(XT_START,ZTOT, ' MODEL'//YMI,'+')
CALL TIMING_SEPARATOR('+')
CALL TIMING_SEPARATOR('+')
CALL TIMING_SEPARATOR('+')
!
! Timing/ Steps
!

WAUTELET Philippe
committed
ZTIME_STEP = XT_START / REAL(KTCOUNT)
WRITE(YTCOUNT,FMT="(I0)") KTCOUNT
CALL TIME_STAT_ll(ZTIME_STEP,ZTOT, ' SECOND/STEP='//YTCOUNT,'=')
!
! Timing/Step/Points
!
IPOINTS = NIMAX_ll*NJMAX_ll*NKMAX
WRITE(YPOINTS,FMT="(I0)") IPOINTS

WAUTELET Philippe
committed
ZTIME_STEP_PTS = ZTIME_STEP / REAL(IPOINTS) * 1e6
CALL TIME_STAT_ll(ZTIME_STEP_PTS,ZTOT_PT)
CALL TIME_STAT_ll(ZTIME_STEP_PTS,ZTOT_PT, ' MICROSEC/STP/PT='//YPOINTS,'-')
!
CALL TIMING_SEPARATOR('=')
!
!
!

WAUTELET Philippe
committed
CALL IO_File_close(TLUOUT)
IF (IMI==NMODEL) CALL IO_File_close(TLUOUT0)
END IF
!
END SUBROUTINE MODEL_n