source: LMDZ4/branches/LMDZ4_par_0/libf/phylmd/write_histhf.h @ 1261

Last change on this file since 1261 was 634, checked in by Laurent Fairhead, 20 years ago

Modifications faites à la physique pour la rendre parallele YM
Une branche de travail LMDZ4_par_0 a été créée provisoirement afin de tester
les modifs pleinement avant leurs inclusions dans le tronc principal
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1!
2! $Header$
3!
4      if (ok_hf) then
5
6c   Comprendre comment marche el i=nint(zout/zsto)
7c
8c     print*,'ACRITURE HF !!! ACRITURE HF !!! ACRITURE HF !!! '
9      ndex2d = 0
10      ndex3d = 0
11c
12      zsto = dtime
13      zout = dtime * ecrit_hf
14      itau_w = itau_phy + itap
15c
16      IF(lev_histhf.GE.1) THEN
17c
18c     i = NINT(zout/zsto)
19c     CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d)
20c     CALL histwrite(nid_hf,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d)
21c
22c     i = NINT(zout/zsto)
23c     CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d)
24c     CALL histwrite(nid_hf,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d)
25C
26cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, paire_ter, zx_tmp_2d)
27      CALL histwrite_phy(nid_hf,"aireTER",itau_w,paire_ter)
28c
29      DO i=1, klon
30       zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic)
31      ENDDO
32c
33cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
34      CALL histwrite_phy(nid_hf,"contfracATM",itau_w,zx_tmp_fi2d)
35c
36cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)
37      CALL histwrite_phy(nid_hf,"contfracOR",itau_w,
38     .                   pctsrf_new(:,is_ter))
39c
40cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zt2m,zx_tmp_2d)
41      CALL histwrite_phy(nid_hf,"t2m",itau_w,zt2m)
42c
43cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zq2m,zx_tmp_2d)
44      CALL histwrite_phy(nid_hf,"q2m",itau_w,zq2m)
45c
46      DO i = 1, klon
47         zx_tmp_fi2d(i) = paprs(i,1)
48      ENDDO
49cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
50      CALL histwrite_phy(nid_hf,"psol",itau_w,zx_tmp_fi2d)
51c
52      DO i = 1, klon
53         zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i)
54      ENDDO
55cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
56      CALL histwrite_phy(nid_hf,"rain",itau_w,zx_tmp_fi2d)
57c
58c ENSEMBLES BEG
59cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)
60      CALL histwrite_phy(nid_hf,"tsol",itau_w,zxtsol)
61c
62cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)
63      CALL histwrite_phy(nid_hf,"slp",itau_w,slp)
64c
65cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zu10m,zx_tmp_2d)
66      CALL histwrite_phy(nid_hf,"u10m",itau_w,zu10m)
67c
68cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zv10m,zx_tmp_2d)
69      CALL histwrite_phy(nid_hf,"v10m",itau_w,zv10m)
70c
71      DO i=1, klon
72       zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i))
73      ENDDO
74cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
75      CALL histwrite_phy(nid_hf,"wind10m",itau_w,zx_tmp_fi2d)
76c
77      DO k=1, nlevENS
78      IF(clev(k).EQ."500") THEN
79cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)
80      CALL histwrite_phy(nid_hf,"phi"//clev(k),itau_w,philev(:,k))
81      ENDIF !clev(k).EQ."500"
82      ENDDO
83c
84      ENDIF !lev_histhf.GE.1
85c
86      IF(lev_histhf.GE.2) THEN
87c
88cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)
89      CALL histwrite_phy(nid_hf,"cldt",itau_w,cldt)
90c
91      zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)
92      CALL histwrite_phy(nid_hf,"SWnetOR",itau_w,zx_tmp_fi2d)
93c
94      zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol(1:klon))
95      CALL histwrite(nid_hf,"SWdownOR",itau_w,zx_tmp_fi2d)
96c
97      CALL histwrite(nid_hf,"LWdownOR",itau_w,zx_tmp_fi2d) 
98c
99c
100      ENDIF !lev_histhf.GE.2
101c
102      IF(lev_histhf.GE.3) THEN
103c
104      DO k=1, nlevENS
105c
106cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, tlev(:,k),zx_tmp_2d)
107      CALL histwrite_phy(nid_hf,"t"//clev(k),itau_w,tlev(:,k))
108c
109      IF(clev(k).NE."500") THEN !clev(k).NE."500"
110cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, philev(:,k),zx_tmp_2d)
111      CALL histwrite_phy(nid_hf,"phi"//clev(k),itau_w,philev(:,k))
112      ENDIF !clev(k).NE."500"
113c
114cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, qlev(:,k),zx_tmp_2d)
115      CALL histwrite_phy(nid_hf,"q"//clev(k),itau_w,qlev(:,k))
116c
117      IF(1.EQ.0) THEN
118cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, rhlev(:,k),zx_tmp_2d)
119      CALL histwrite_phy(nid_hf,"rh"//clev(k),itau_w,rhlev(:,k))
120      ENDIF !1.EQ.0
121c
122cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, ulev(:,k),zx_tmp_2d)
123      CALL histwrite_phy(nid_hf,"u"//clev(k),itau_w,ulev(:,k))
124c
125cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, vlev(:,k),zx_tmp_2d)
126      CALL histwrite_phy(nid_hf,"v"//clev(k),itau_w,vlev(:,k))
127c
128      ENDDO !nlevENS
129c
130      IF(1.EQ.0) THEN
131cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d)
132      CALL histwrite_phy(nid_hf,"cdrm",itau_w,cdragm)
133c
134cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d)
135      CALL histwrite_phy(nid_hf,"cdrh",itau_w,cdragh)
136      ENDIF !(1.EQ.0) THEN
137c
138      ENDIF !lev_histhf.GE.3
139c
140      IF(lev_histhf.GE.4) THEN
141c
142#define histhf3d
143#ifdef histhf3d
144#include "write_histhf3d.h"
145#endif
146c
147      ENDIF !lev_histhf.GE.4
148c
149      if (ok_sync) then
150        call histsync(nid_hf)
151      endif
152
153      endif
Note: See TracBrowser for help on using the repository browser.