SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_diag_misc_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_misc_flake_n ( DTCO, DGU, U, DGMF, &
7  hprogram)
8 ! #################################
9 !
10 !!**** *WRITE_DIAG_MISC_FLAKE* - writes the FLAKE miscellaneous diagnostic fields
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!
16 !!** METHOD
17 !! ------
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !!
23 !! AUTHOR
24 !! ------
25 !! P. Le Moigne *Meteo France*
26 !!
27 !! MODIFICATIONS
28 !! -------------
29 !! Original 10/2004
30 !-------------------------------------------------------------------------------
31 !
32 !* 0. DECLARATIONS
33 ! ------------
34 !
35 !
38 USE modd_surf_atm_n, ONLY : surf_atm_t
40 !
41 USE modi_init_io_surf_n
43 USE modi_end_io_surf_n
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 IMPLICIT NONE
49 !
50 !* 0.1 Declarations of arguments
51 ! -------------------------
52 !
53 !
54 TYPE(data_cover_t), INTENT(INOUT) :: dtco
55 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
56 TYPE(surf_atm_t), INTENT(INOUT) :: u
57 TYPE(diag_misc_flake_t), INTENT(INOUT) :: dgmf
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling
60 !
61 !* 0.2 Declarations of local variables
62 ! -------------------------------
63 !
64 INTEGER :: iresp ! IRESP : return-code if a problem appears
65  CHARACTER(LEN=12) :: yrecfm ! Name of the article to be read
66  CHARACTER(LEN=100):: ycomment ! Comment string
67 INTEGER :: iz
68 REAL(KIND=JPRB) :: zhook_handle
69 !
70 !-------------------------------------------------------------------------------
71 !
72 IF (lhook) CALL dr_hook('WRITE_DIAG_MISC_FLAKE_N',0,zhook_handle)
73 !
74 ! Initialisation for IO
75 !
76  CALL init_io_surf_n(dtco, dgu, u, &
77  hprogram,'WATER ','FLAKE ','WRITE')
78 !
79 !-------------------------------------------------------------------------------
80 !
81 !* Flake temperature profile
82 !
83 IF (dgmf%LWATER_PROFILE) THEN
84  DO iz=1,SIZE(dgmf%XZW_PROFILE)
85  WRITE(yrecfm,'(F5.1)') dgmf%XZW_PROFILE(iz)
86  yrecfm='TW_'//trim(adjustl(yrecfm))
87  ycomment='X_Y_'//yrecfm//' (K)'
88  CALL write_surf(dgu, u, &
89  hprogram,yrecfm,dgmf%XTW_PROFILE(iz,:),iresp,hcomment=ycomment)
90  END DO
91 END IF
92 !
93 !-------------------------------------------------------------------------------
94 !
95 ! End of IO
96 !
97  CALL end_io_surf_n(hprogram)
98 !
99 IF (lhook) CALL dr_hook('WRITE_DIAG_MISC_FLAKE_N',1,zhook_handle)
100 !
101 END SUBROUTINE write_diag_misc_flake_n
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine write_diag_misc_flake_n(DTCO, DGU, U, DGMF, HPROGRAM)
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6