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