33fee06aee494f590434c6c380b783cdb234b83d
[MNH-git_open_source-lfs.git] / src / MNH / mnh2lpdm_ech.f90
1 !MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3 !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
4 !MNH_LIC for details. version 1.
5 !     ######spl
6         SUBROUTINE MNH2LPDM_ECH(HFM,KFMTO,HFLOG,KFLOG,KVERB)
7 !       ##################################################
8 !-----------------------------------------------------------------------
9 !****   MNH2S2_ECH TRAITEMENT D'UNE ECHEANCE.
10 !
11 !       Auteur   : Francois Bonnardot, DP/SERV/ENV
12 !       Creation : 07.01.2009
13 !-----------------------------------------------------------------------
14 !
15 !*      0.  DECLARATIONS.
16 !           -------------
17 !
18 !*      0.1 Modules.
19 !
20 !
21 !
22 USE MODD_DIM_n
23 USE MODD_TIME_n
24 USE MODD_GRID_n
25 !
26 USE MODD_CST
27 USE MODD_PARAMETERS
28 USE MODD_TIME
29 !
30 USE MODD_MNH2LPDM
31 !
32 USE MODI_IO_LL
33 USE MODI_FM_LL
34 USE MODI_FMREAD_LL
35 USE MODI_INI_CST
36 !
37 IMPLICIT NONE
38 !
39 !
40 !*      0.2 Arguments.
41 !
42 CHARACTER(LEN=*), INTENT(IN)  :: HFM,HFLOG
43 INTEGER, INTENT(IN)  :: KVERB,KFMTO
44 INTEGER, INTENT(IN)  :: KFLOG
45 !
46 !
47 !*      0.3 Variables locales.
48 !
49 CHARACTER(LEN=100)   :: YCOM                         ! Commentaire champ FM.
50 CHARACTER(LEN=100)   :: YFTURB                       ! Stockage champs de turbulence.
51 INTEGER              :: KFTURB
52 INTEGER              :: IREP,INBART,IGRID,ILONCOM    ! Variables lecture FM.
53 INTEGER,DIMENSION(3) :: IDATCUR                      ! Date dans FM.
54 REAL                 :: ZSECCUR                      ! Heure (sec) dans FM.
55 INTEGER              :: ICURAA,ICURMM,ICURJJ         ! Date  courante.
56 INTEGER              :: ICURHH,ICURMN,ICURSS         ! Heure courante.
57 INTEGER              :: JI,JJ,JK
58 !
59 !
60 !
61 !
62 !*      1.  INITIALISATION.
63 !           ---------------
64 !
65 !*      1.1 Blabla.
66 !
67 !
68 !*      2.  LECTURE DES DONNEES MESO-NH DE BASE.
69 !           ------------------------------------
70 !
71 !*      2.1 Ouverture du fichier Meso-NH.
72 !
73 CALL FMOPEN_LL(HFM,'READ',HFLOG,0,2,KVERB,INBART,IREP)
74 !
75 !*      2.2 Date et heure courante.
76 !
77 CALL FMREAD(HFM,'DTCUR%TDATE',HFLOG,'--',IDATCUR,IGRID,ILONCOM,YCOM,IREP)
78 CALL FMREAD(HFM,'DTCUR%TIME', HFLOG,'--',ZSECCUR,IGRID,ILONCOM,YCOM,IREP)
79
80 ICURAA=MOD(IDATCUR(1),100)  ! Annee sur 2 caracteres.
81 ICURMM=IDATCUR(2)
82 ICURJJ=IDATCUR(3)
83 ICURSS=NINT(ZSECCUR)
84 !
85 ICURMN = NINT( (FLOAT(ICURSS)/60.0)/5.0 )*5   ! Heure arrondie a 5 minutes pres.
86 ICURSS = 0
87 ICURHH =ICURMN/60
88 ICURMN =ICURMN-ICURHH*60
89 !
90 print*, '%%% MNH2LPDM2_ECH Date et heure des donnees :'
91 print 20300, ICURJJ,ICURMM,ICURAA,ICURHH,ICURMN,ICURSS
92 20300 FORMAT(I2.2,'/',I2.2,'/',I4.4,' ',I2.1,'h',I2.1,'mn',I2.1,'sec')
93 !
94 !
95 !
96 !*      2.3 Lecture des champs Meso-NH de base.
97 !
98 CALL FMREAD(HFM,'UT',HFLOG,'XY',XUT,IGRID,ILONCOM,YCOM,IREP)
99 CALL FMREAD(HFM,'VT',HFLOG,'XY',XVT,IGRID,ILONCOM,YCOM,IREP)
100 CALL FMREAD(HFM,'WT',HFLOG,'XY',XWT,IGRID,ILONCOM,YCOM,IREP)
101 CALL FMREAD(HFM,'THT',HFLOG,'XY',XTHT,IGRID,ILONCOM,YCOM,IREP)
102 CALL FMREAD(HFM,'TKET',HFLOG,'XY',XTKET,IGRID,ILONCOM,YCOM,IREP)
103 CALL FMREAD(HFM,'LM',HFLOG,'XY',XLM,IGRID,ILONCOM,YCOM,IREP)
104 CALL FMREAD(HFM,'THW_FLX',HFLOG,'XY',XWPTHP,IGRID,ILONCOM,YCOM,IREP)
105 CALL FMREAD(HFM,'DISS',HFLOG,'XY',XDISSIP,IGRID,ILONCOM,YCOM,IREP)
106 CALL FMREAD(HFM,'FMU',HFLOG,'XY',XSFU,IGRID,ILONCOM,YCOM,IREP)
107 CALL FMREAD(HFM,'FMV',HFLOG,'XY',XSFV,IGRID,ILONCOM,YCOM,IREP)
108 CALL FMREAD(HFM,'INPRT',HFLOG,'XY',XINRT,IGRID,ILONCOM,YCOM,IREP)
109 CALL FMREAD(HFM,'RVT',HFLOG,'XY',XRMVT,IGRID,ILONCOM,YCOM,IREP)
110 CALL FMREAD(HFM,'RCT',HFLOG,'XY',XRMCT,IGRID,ILONCOM,YCOM,IREP)
111 CALL FMREAD(HFM,'RRT',HFLOG,'XY',XRMRT,IGRID,ILONCOM,YCOM,IREP)
112 !
113 !              Lecture des donnees Meso-NH terminee.'
114 !
115 !*      2.4 Fermeture du fichier Meso-NH.
116 !
117 CALL FMCLOS_LL(HFM,'KEEP',HFLOG,IREP)
118 !
119 !
120 !*      3.  PREPARATION DES DONNEES.
121 !           ------------------------
122 !
123 !
124 !*      3.2 Niveaux altitude "hors-sol" (1:NKMAX).
125 !
126 XSU(:,:,1:NKMAX) = XUT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
127 XSV(:,:,1:NKMAX) = XVT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
128 XSW(:,:,1:NKMAX) = XWT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
129 XSTH(:,:,1:NKMAX) = XTHT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
130 XSTKE(:,:,1:NKMAX) = XTKET(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
131 XSLM(:,:,1:NKMAX) = XLM(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
132 XSDISSIP(:,:,1:NKMAX) = XDISSIP(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
133 XSINRT(:,:) = XINRT(NSIB:NSIE,NSJB:NSJE)
134 XSWPTHP(:,:,1:NKMAX) = XWPTHP(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
135 XSRMV(:,:,1:NKMAX) = XRMVT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
136 XSRMC(:,:,1:NKMAX) = XRMCT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
137 XSRMR(:,:,1:NKMAX) = XRMRT(NSIB:NSIE,NSJB:NSJE,NKB:NKE)
138 XSSFU(:,:) = XSFU(NSIB:NSIE,NSJB:NSJE)
139 XSSFV(:,:) = XSFV(NSIB:NSIE,NSJB:NSJE)
140 !
141 !
142 !*      4.  CALCULS DES TEMPS LAGRANGIENS ET VARIANCES DU VENT POUR LPDM.
143 !           ------------------------------------------------------------
144 !
145       XRVSRD  = XRV/XRD
146 !
147       XSUSTAR (:,:)   = XUNDEF
148       XSLMO   (:,:)   = XUNDEF
149       XSHMIX  (:,:)   = XUNDEF
150       XSWSTAR (:,:)   = XUNDEF
151       XSSIGU  (:,:,:) = XUNDEF
152       XSSIGW  (:,:,:) = XUNDEF
153       XSTIMEU (:,:,:) = XUNDEF
154       XSTIMEW (:,:,:) = XUNDEF
155 !
156       DO JI=1,NSIMAX ; DO JJ=1,NSJMAX
157         !
158         !* Temperature potentielle virtuelle.
159         !
160         XSTHETAV(:)=1.0+XSRMV(JI,JJ,:)+XSRMC(JI,JJ,:)+XSRMR(JI,JJ,:)
161         XSTHETAV(:) = XSTH(JI,JJ,:)*(1.0+XSRMV(JI,JJ,:)*XRVSRD)/XSTHETAV(:)
162         !
163         !* ZHMIX Hauteur de melange.
164         !
165         XTHSOL       = XSTHETAV(1)+0.5
166         XSHMIX(JI,JJ) = 0.0
167         DO JK=2,NKMAX
168            IF ( XSTHETAV(JK).GT.XTHSOL ) THEN
169               XSHMIX(JI,JJ)     = XSHAUT  (JK-1)  &
170                 +( XSHAUT  (JK) - XSHAUT  (JK-1) )  &
171                 /( XSTHETAV(JK) - XSTHETAV(JK-1) )  &
172                 *( XTHSOL      - XSTHETAV(JK-1) )
173               EXIT
174            ENDIF
175         END DO
176         XSHMIX(JI,JJ)=MAX(XSHMIX(JI,JJ),50.0)
177
178         !
179         !* XSUSTAR Vitesse de frottement.
180         !
181         XSUSTAR(JI,JJ) = XSSFU(JI,JJ)*XSSFU(JI,JJ) &
182                         +XSSFV(JI,JJ)*XSSFV(JI,JJ)
183         XSUSTAR(JI,JJ) = SQRT(SQRT(XSUSTAR(JI,JJ)))
184         !
185         !
186         !
187         !* XSLMO Longueur de Monin-Obukhov.
188         !
189         IF (XSWPTHP(JI,JJ,1).NE.0.) THEN
190          XSLMO(JI,JJ)= -XSTHETAV(1)*(XSUSTAR(JI,JJ)**3) &
191                      / (XKARMAN*XG*XSWPTHP(JI,JJ,1))
192         ENDIF
193         !
194         !
195         !* XSWSTAR Vitesse Verticale Convective.
196         !
197         XSWSTAR(JI,JJ)=XG/XSTHETAV(1)*XSWPTHP(JI,JJ,1)*XSHMIX(JI,JJ)
198         XSWSTAR(JI,JJ)=SIGN(1.,XSWSTAR(JI,JJ)) &
199                                * ( ABS(XSWSTAR(JI,JJ))**(1./3.))
200         !
201         !
202         IF (CTURBPARAM=="HANNA".OR.CTURBPARAM=="HANNABIS") THEN
203         !
204         IF ((XSLMO(JI,JJ).GT.0).AND.(XSLMO(JI,JJ).LE.300)) THEN
205            !
206            !* Conditions stables.
207            !
208            !*   XSSIGU,XSSIGW <u'2>**0.5, <w'2>**0.5
209            DO JK=1,NKMAX
210            IF (XSHAUT(JK).LT.XSHMIX(JI,JJ)) THEN
211            XSSIGU(JI,JJ,JK) = SQRT( 0.5 *                              &
212                 ((2.0*(1-XSHAUT(JK)/XSHMIX(JI,JJ))*XSUSTAR(JI,JJ))**2) &
213               + ((1.3*(1-XSHAUT(JK)/XSHMIX(JI,JJ))*XSUSTAR(JI,JJ))**2) )
214            XSSIGW(JI,JJ,JK) = 1.3*(1-XSHAUT(JK)/XSHMIX(JI,JJ))         &
215                              *XSUSTAR(JI,JJ)
216            ELSE
217            XSSIGU(JI,JJ,JK) = 0.001
218            XSSIGW(JI,JJ,JK) = 0.001
219            ENDIF
220            ENDDO
221            ! 
222            XSSIGU(JI,JJ,:)=MAX(0.001,XSSIGU(JI,JJ,:))
223            XSSIGW(JI,JJ,:)=MAX(0.001,XSSIGW(JI,JJ,:))
224            !
225            !* Lagrangian time scale
226            XSTIMEU(JI,JJ,:) = 0.11*XSHMIX(JI,JJ)/XSSIGU(JI,JJ,:)  &
227                              *SQRT( XSHAUT(:)/XSHMIX(JI,JJ) )
228            XSTIMEW(JI,JJ,:) = 0.10*XSHMIX(JI,JJ)/XSSIGW(JI,JJ,:)  &
229                              *( XSHAUT(:)/XSHMIX(JI,JJ) )**0.8
230            !
231            !
232         ENDIF
233         !
234         !
235         IF (ABS(XSLMO(JI,JJ)).GT.300) THEN
236            !
237            !* Conditions neutres.
238            !
239            !* XSSIGU,XSSIGW <u'2>**0.5, <w'2>**0.5
240            XSSIGU(JI,JJ,:)=SQRT( 0.5 *                                &
241         ((2.0*XSUSTAR(JI,JJ)*EXP(-3*XSCORIOZ(JI,JJ)*XSHAUT(:)/XSUSTAR(JI,JJ)))**2)  &
242      +  ((1.3*XSUSTAR(JI,JJ)*EXP(-2*XSCORIOZ(JI,JJ)*XSHAUT(:)/XSUSTAR(JI,JJ)))**2) )
243            XSSIGW(JI,JJ,:)=1.3*XSUSTAR(JI,JJ)*EXP(-2*XSCORIOZ(JI,JJ)*XSHAUT(:)/XSUSTAR(JI,JJ))
244            XSSIGU(JI,JJ,:)=MAX(0.001,XSSIGU(JI,JJ,:))
245            XSSIGW(JI,JJ,:)=MAX(0.001,XSSIGW(JI,JJ,:))
246            !
247            !* lagrangian time scale
248            XSTIMEU(JI,JJ,:) = 0.5*XSHAUT(:)/   &
249                  (XSSIGW(JI,JJ,:)*(1.+15.0*XSCORIOZ(JI,JJ)*XSHAUT(:)/XSUSTAR(JI,JJ)))
250            XSTIMEW(JI,JJ,:) = XSTIMEU(JI,JJ,:)
251            !
252         ENDIF 
253         !
254         ! 
255         IF ((XSLMO(JI,JJ).LT.0).AND.(XSLMO(JI,JJ).GE.-300)) THEN
256            !
257            !* Conditions instables.
258            !
259            !* XSSIGU,XSSIGW <u'2>**0.5, <w'2>**0.5
260            ! 
261            IF (CTURBPARAM=="HANNA") THEN
262            !
263              DO JK=1,NKMAX
264              IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)) THEN
265              XSSIGU(JI,JJ,JK)=XSUSTAR(JI,JJ)         &
266                         * (12+0.5*XSHMIX(JI,JJ)/ABS(XSLMO(JI,JJ)))**(1/3)
267              ELSE
268              XSSIGU(JI,JJ,JK)=0.001
269              ENDIF
270              ENDDO
271              ! 
272              DO JK=1,NKMAX
273              !IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)) THEN
274              !  XSSIGW(JI,JJ,JK)=SQRT(  1.2*XSWSTAR(JI,JJ)**2 &
275              !               *(1-0.9*XSHAUT(JK)/XSHMIX(JI,JJ)) &
276              !               *(XSHAUT(JK)/XSHMIX(JI,JJ))**(2/3) &
277              !            +   (1.8-1.4*XSHAUT(JK)/XSHMIX(JI,JJ)) &
278              !               *XSUSTAR(JI,JJ)**2 )  
279              !ELSE
280              IF (XSHAUT(JK).LE.0.4*XSHMIX(JI,JJ)) THEN
281                XSSIGW(JI,JJ,JK)=0.763*(XSHAUT(JK)/XSHMIX(JI,JJ))**0.175
282              ELSE IF (XSHAUT(JK).LE.0.96*XSHMIX(JI,JJ)) THEN
283                XSSIGW(JI,JJ,JK)=0.722*XSWSTAR(JI,JJ)* &
284                                 (1-XSHAUT(JK)/XSHMIX(JI,JJ))**0.207
285              ELSE IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)) THEN
286                XSSIGW(JI,JJ,JK)=0.37*XSWSTAR(JI,JJ)
287              ELSE
288                XSSIGW(JI,JJ,JK)=0.001
289              ENDIF
290              ENDDO
291              !
292              XSSIGU(JI,JJ,:)=MAX(0.001,XSSIGU(JI,JJ,:))
293              XSSIGW(JI,JJ,:)=MAX(0.001,XSSIGW(JI,JJ,:))
294              !
295              !* Lagrangian time scale
296              XSTIMEU(JI,JJ,:) = 0.15*XSHMIX(JI,JJ)/XSSIGU(JI,JJ,:)
297              DO JK=1,NKMAX
298                  IF (XSHAUT(JK).LE.(0.1*XSHMIX(JI,JJ))) THEN
299                    IF ( XSHAUT(JK).LT.(XSZ0(JI,JJ)-XSLMO(JI,JJ)) ) THEN
300                      XSTIMEW(JI,JJ,JK) = 0.1*XSHAUT(JK)/XSSIGW(JI,JJ,JK)   &
301                       / ( 0.55 - 0.38*(XSHAUT(JK)-XSZ0(JI,JJ))/ABS(XSLMO(JI,JJ)))
302                    ELSE
303                      XSTIMEW(JI,JJ,JK) = 0.59*XSHAUT(JK)/XSSIGW(JI,JJ,JK)
304                    ENDIF
305                  ELSE
306                      XSTIMEW(JI,JJ,JK) = 0.15*XSHMIX(JI,JJ)/XSSIGW(JI,JJ,JK) &
307                    *( 1.-EXP(-5*XSHAUT(JK)/XSHMIX(JI,JJ)) )
308                  ENDIF
309              END DO
310            !
311            ELSE IF (CTURBPARAM=="HANNABIS") THEN
312              !* sigmas
313              XSSIGW(JI,JJ,:) = SQRT(2./3.*XSTKE(JI,JJ,:))
314              XSSIGU(JI,JJ,:) = XSSIGW(JI,JJ,:)
315              !* Temps Lagrangien
316              DO JK=1,NKMAX
317                IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)) THEN
318                XSTIMEU(JI,JJ,JK)=0.17*XSHMIX(JI,JJ)/XSSIGU(JI,JJ,JK)
319                XSTIMEW(JI,JJ,JK)=0.2*XSHMIX(JI,JJ)/XSSIGW(JI,JJ,JK)* &
320                (1-EXP(-4*XSHAUT(JK)/XSHMIX(JI,JJ)) &
321                  -0.0003*EXP(8*XSHAUT(JK)/XSHMIX(JI,JJ)))
322                ELSE IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)*1.2) THEN
323                XSTIMEU(JI,JJ,JK)= &
324                 (1-(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1)))* &
325                 XSTIMEU(JI,JJ,JK-1) &
326                 +(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1))*10000.0
327                XSTIMEW(JI,JJ,JK)= &
328                 (1-(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1)))* &
329                 XSTIMEW(JI,JJ,JK-1)  &
330                 +(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1))*10000.0
331                ELSE
332                XSTIMEU(JI,JJ,JK)=10000.0
333                XSTIMEW(JI,JJ,JK)=10000.0
334                ENDIF
335              ENDDO
336              !
337            ENDIF ! CTURBPARAM=HANNA ou HANNABIS
338            !  
339         ENDIF ! instable
340         !
341         ELSE ! CTURBPARAM=="ISOTROPE"
342           !
343           !*    XSSIGU,XSSIGW <u'2>**0.5, <w'2>**0.5
344           !
345           XSSIGW(JI,JJ,:) = SQRT(2./3.*XSTKE(JI,JJ,:))
346           XSSIGU(JI,JJ,:) = XSSIGW(JI,JJ,:)
347           !
348           !* Lagrangian time scale
349           DO JK=1,NKMAX
350             IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)) THEN
351             XSTIMEU(JI,JJ,JK)=ABS(2*(XSSIGU(JI,JJ,JK)**2)/(3*XSDISSIP(JI,JJ,JK)))
352             XSTIMEW(JI,JJ,JK)=ABS(2*(XSSIGW(JI,JJ,JK)**2)/(3*XSDISSIP(JI,JJ,JK)))
353             ELSE IF (XSHAUT(JK).LE.XSHMIX(JI,JJ)*1.2) THEN
354             XSTIMEU(JI,JJ,JK)= &
355             (1-(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1)))*XSTIMEU(JI,JJ,JK-1) &
356            +(XSHAUT(JK)-XSHAUT(JK-1))/(XSHAUT(JK+1)-XSHAUT(JK-1))*1000.0
357             XSTIMEW(JI,JJ,JK)=XSTIMEU(JI,JJ,JK)
358             ELSE
359             XSTIMEU(JI,JJ,JK)=1000.0
360             XSTIMEW(JI,JJ,JK)=1000.0
361             ENDIF
362           ENDDO
363           !
364         ENDIF
365         !
366         !
367      END DO
368   END DO
369   !
370      IF (IGRILLE.EQ.2) THEN
371      WRITE(YFTURB,'("TURB_LPDM",5I2.2)') ICURAA,ICURMM,ICURJJ,ICURHH,ICURMN
372      KFTURB=50
373      CALL OPEN_LL(UNIT=KFTURB,FILE=YFTURB,IOSTAT=IREP,FORM='FORMATTED', &
374       ACTION='WRITE',MODE='GLOBAL')
375      WRITE(UNIT=KFTURB,FMT='(5A12)') "WSTAR       ","USTAR       ", &
376                                      "HMIX        ","LMO         ", &
377                                      "WPTHP"
378      WRITE(UNIT=KFTURB,FMT='(5F12.5)') XSWSTAR(15,15),XSUSTAR(15,15), &
379                                        XSHMIX(15,15),XSLMO(15,15),    &
380                                        XSWPTHP(15,15,1)
381
382
383      WRITE(UNIT=KFTURB,FMT='(8A12)') "HAUT          ","TKE           ", &
384                                      "DISS          ","THETA         ", &
385                                      "SIGU          ","SIGW          ", &
386                                      "TIMEU         ","TIMEW         "
387      DO JK=1,NKMAX
388      WRITE(UNIT=KFTURB,FMT='(6F12.5,2F12.1)') XSHAUT(JK),XSTKE(15,15,JK), &
389                                     XSDISSIP(15,15,JK),XSTH(15,15,JK), &
390                                     XSSIGU(15,15,JK),XSSIGW(15,15,JK), &
391                                     XSTIMEU(15,15,JK),XSTIMEW(15,15,JK)
392   
393      ENDDO
394      CALL CLOSE_LL(YFTURB,IREP,'KEEP')
395      ENDIF
396 !
397                
398
399 !
400 !*      5.  ECRITURES FIC MTO.
401 !           ------------------
402 !
403 !
404 DO JK = 1,NKMAX
405 WRITE(KFMTO) XSU(:,:,JK)        ! Composante zonale du vent.
406 ENDDO
407 DO JK = 1,NKMAX
408 WRITE(KFMTO) XSV(:,:,JK)        ! Composante meridienne du vent.
409 ENDDO
410 DO JK = 1,NKMAX
411 WRITE(KFMTO) XSW(:,:,JK)        ! Vitesse verticale.
412 ENDDO
413 DO JK = 1,NKMAX
414 WRITE(KFMTO) XSTH(:,:,JK)     ! Temperature potentielle.
415 ENDDO
416 DO JK = 1,NKMAX
417 WRITE(KFMTO) XSTKE(:,:,JK)       ! Energie cinetique Turbulence
418 ENDDO
419 DO JK = 1,NKMAX
420 WRITE(KFMTO) (XSSIGU(:,:,JK))**2       ! SigmaU
421 ENDDO
422 DO JK = 1,NKMAX
423 WRITE(KFMTO) (XSSIGU(:,:,JK))**2       ! SigmaV
424 ENDDO
425 DO JK = 1,NKMAX
426 WRITE(KFMTO) (XSSIGW(:,:,JK))**2       ! SigmaW
427 ENDDO
428 DO JK = 1,NKMAX
429 WRITE(KFMTO) XSTIMEU(:,:,JK)       ! Temps lagrangien U
430 ENDDO
431 DO JK = 1,NKMAX
432 WRITE(KFMTO) XSTIMEU(:,:,JK)       ! Temps lagrangien V
433 ENDDO
434 DO JK = 1,NKMAX
435 WRITE(KFMTO) XSTIMEW(:,:,JK)       ! Dissipation de TKE
436 ENDDO
437 WRITE(KFMTO) XSINRT
438 !
439 END SUBROUTINE MNH2LPDM_ECH