SURFEX v8.1
General documentation of Surfex
write_diag_flaken.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 SUBROUTINE write_diag_flake_n (DTCO, DUO, U, FM, HPROGRAM,HWRITE)
7 ! ###############################################################################
8 !
9 !!**** *WRITE_DIAG_FLAKE_n * - diagnostics for lakes
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! V. Masson
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 01/2004
28 !!------------------------------------------------------------------
29 !
30 !
31 USE modd_surfex_n, ONLY : flake_model_t
32 !
33 USE modd_diag_n, ONLY : diag_options_t
35 USE modd_surf_atm_n, ONLY : surf_atm_t
36 !
37 USE modd_surf_par, ONLY : xundef
38 !
39 USE modi_write_diag_seb_flake_n
40 !
41 !
42 USE yomhook ,ONLY : lhook, dr_hook
43 USE parkind1 ,ONLY : jprb
44 !
45 USE modi_write_diag_misc_flake_n
46 IMPLICIT NONE
47 !
48 !* 0.1 declarations of arguments
49 !
50 !
51 !
52 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
53 TYPE(diag_options_t), INTENT(INOUT) :: DUO
54 TYPE(surf_atm_t), INTENT(INOUT) :: U
55 TYPE(flake_model_t), INTENT(INOUT) :: FM
56 !
57  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
58  CHARACTER(LEN=3), INTENT(IN) :: HWRITE ! 'PGD' : only physiographic fields are written
59 REAL(KIND=JPRB) :: ZHOOK_HANDLE
60 ! ! 'ALL' : all fields are written
61 !
62 !* 0.2 declarations of local variables
63 !
64 !-------------------------------------------------------------------------------------
65 !
66 IF (lhook) CALL dr_hook('WRITE_DIAG_FLAKE_N',0,zhook_handle)
67 IF (hwrite/='PGD') THEN
68 !
69  IF (fm%DFO%XDIAG_TSTEP==xundef .OR. &
70  abs(nint(fm%F%TTIME%TIME/fm%DFO%XDIAG_TSTEP)*fm%DFO%XDIAG_TSTEP-fm%F%TTIME%TIME)<1.e-3 ) THEN
71  CALL write_diag_seb_flake_n(dtco, duo, u, fm%CHF, fm%DFO, fm%DF, fm%DFC, hprogram)
72  CALL write_diag_misc_flake_n(dtco, duo%CSELECT, u, fm%DMF, hprogram)
73  END IF
74 !
75 ENDIF
76 IF (lhook) CALL dr_hook('WRITE_DIAG_FLAKE_N',1,zhook_handle)
77 !-------------------------------------------------------------------------------------
78 !
79 END SUBROUTINE write_diag_flake_n
subroutine write_diag_misc_flake_n(DTCO, HSELECT, U, DMF, HPROGR
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
subroutine write_diag_seb_flake_n(DTCO, DUO, U, CHF, DFO, D, DC,
logical lhook
Definition: yomhook.F90:15
subroutine write_diag_flake_n(DTCO, DUO, U, FM, HPROGRAM, HWRITE)