SURFEX v8.1
General documentation of Surfex
writesurf_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 writesurf_flake_n (HSELECT, F, HPROGRAM)
7 ! ########################################
8 !
9 !!**** *WRITESURF_FLAKE_n* - writes FLAKE fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2003
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
40 USE modd_flake_n, ONLY : flake_t
41 !
43 !
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  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
54 !
55 TYPE(flake_t), INTENT(INOUT) :: F
56 !
57  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
58 
59 !
60 !* 0.2 Declarations of local variables
61 ! -------------------------------
62 !
63 INTEGER :: IRESP ! IRESP : return-code if a problem appears
64  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
65  CHARACTER(LEN=100):: YCOMMENT ! Comment string
66 REAL(KIND=JPRB) :: ZHOOK_HANDLE
67 !
68 !-------------------------------------------------------------------------------
69 !
70 !
71 !* 3. Prognostic fields:
72 ! -----------------
73 !
74 !* water temperature
75 !
76 IF (lhook) CALL dr_hook('WRITESURF_FLAKE_N',0,zhook_handle)
77 yrecfm='TS_WATER'
78 ycomment='TS_WATER (K)'
79  CALL write_surf(hselect,hprogram,yrecfm,f%XTS(:),iresp,hcomment=ycomment)
80 
81 
82 yrecfm='T_SNOW'
83 ycomment='T_SNOW (K)'
84  CALL write_surf(hselect,hprogram,yrecfm,f%XT_SNOW(:),iresp,hcomment=ycomment)
85 yrecfm='T_ICE'
86 ycomment='T_ICE (K)'
87  CALL write_surf(hselect,hprogram,yrecfm,f%XT_ICE(:),iresp,hcomment=ycomment)
88 yrecfm='T_MNW'
89 ycomment='T_WATER_MEAN (K)'
90  CALL write_surf(hselect,hprogram,yrecfm,f%XT_MNW(:),iresp,hcomment=ycomment)
91 yrecfm='T_WML'
92 ycomment='T_WATER_ML (K)'
93  CALL write_surf(hselect,hprogram,yrecfm,f%XT_WML(:),iresp,hcomment=ycomment)
94 yrecfm='T_BOT'
95 ycomment='T_WATER_BOT (K)'
96  CALL write_surf(hselect,hprogram,yrecfm,f%XT_BOT(:),iresp,hcomment=ycomment)
97 yrecfm='T_B1'
98 ycomment='T_B1 (K)'
99  CALL write_surf(hselect,hprogram,yrecfm,f%XT_B1(:),iresp,hcomment=ycomment)
100 yrecfm='CT'
101 ycomment='C_SHAPE_FACTOR ()'
102  CALL write_surf(hselect,hprogram,yrecfm,f%XCT(:),iresp,hcomment=ycomment)
103 yrecfm='H_SNOW'
104 ycomment='H_SNOW (m)'
105  CALL write_surf(hselect,hprogram,yrecfm,f%XH_SNOW(:),iresp,hcomment=ycomment)
106 yrecfm='H_ICE'
107 ycomment='H_ICE (m)'
108  CALL write_surf(hselect,hprogram,yrecfm,f%XH_ICE(:),iresp,hcomment=ycomment)
109 yrecfm='H_ML'
110 ycomment='H_ML (m)'
111  CALL write_surf(hselect,hprogram,yrecfm,f%XH_ML(:),iresp,hcomment=ycomment)
112 yrecfm='H_B1'
113 ycomment='H_B1 (m)'
114  CALL write_surf(hselect,hprogram,yrecfm,f%XH_B1(:),iresp,hcomment=ycomment)
115 
116 !
117 !-------------------------------------------------------------------------------
118 !
119 !* 4. Semi-prognostic fields:
120 ! ----------------------
121 !
122 !* roughness length
123 !
124 yrecfm='Z0WATER'
125 ycomment='Z0WATER (m)'
126  CALL write_surf(hselect,hprogram,yrecfm,f%XZ0(:),iresp,hcomment=ycomment)
127 !
128 !* friction velocity
129 !
130 yrecfm='USTAR_WATER'
131 ycomment='USTAR_WATER (m/s)'
132  CALL write_surf(hselect,hprogram,yrecfm,f%XUSTAR(:),iresp,hcomment=ycomment)
133 !
134 !
135 !-------------------------------------------------------------------------------
136 !
137 !* 5. Time
138 ! ----
139 !
140 yrecfm='DTCUR'
141 ycomment='s'
142  CALL write_surf(hselect,hprogram,yrecfm,f%TTIME,iresp,hcomment=ycomment)
143 IF (lhook) CALL dr_hook('WRITESURF_FLAKE_N',1,zhook_handle)
144 !
145 
146 !-------------------------------------------------------------------------------
147 !
148 END SUBROUTINE writesurf_flake_n
subroutine writesurf_flake_n(HSELECT, F, HPROGRAM)
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15