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