1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | if (ok_hf) then |
---|
5 | |
---|
6 | c Comprendre comment marche el i=nint(zout/zsto) |
---|
7 | c |
---|
8 | c print*,'ACRITURE HF !!! ACRITURE HF !!! ACRITURE HF !!! ' |
---|
9 | ndex2d = 0 |
---|
10 | ndex3d = 0 |
---|
11 | c |
---|
12 | zsto = dtime |
---|
13 | zout = dtime * ecrit_hf |
---|
14 | itau_w = itau_phy + itap |
---|
15 | c |
---|
16 | IF(lev_histhf.GE.1) THEN |
---|
17 | c |
---|
18 | c i = NINT(zout/zsto) |
---|
19 | c CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
20 | c CALL histwrite(nid_hf,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
21 | c |
---|
22 | c i = NINT(zout/zsto) |
---|
23 | c CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d) |
---|
24 | c CALL histwrite(nid_hf,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
25 | C |
---|
26 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, paire_ter, zx_tmp_2d) |
---|
27 | CALL histwrite_phy(nid_hf,"aireTER",itau_w,paire_ter) |
---|
28 | c |
---|
29 | DO i=1, klon |
---|
30 | zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic) |
---|
31 | ENDDO |
---|
32 | c |
---|
33 | cym 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) |
---|
35 | c |
---|
36 | cym 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)) |
---|
39 | c |
---|
40 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, zt2m,zx_tmp_2d) |
---|
41 | CALL histwrite_phy(nid_hf,"t2m",itau_w,zt2m) |
---|
42 | c |
---|
43 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, zq2m,zx_tmp_2d) |
---|
44 | CALL histwrite_phy(nid_hf,"q2m",itau_w,zq2m) |
---|
45 | c |
---|
46 | DO i = 1, klon |
---|
47 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
48 | ENDDO |
---|
49 | cym 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) |
---|
51 | c |
---|
52 | DO i = 1, klon |
---|
53 | zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) |
---|
54 | ENDDO |
---|
55 | cym 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) |
---|
57 | c |
---|
58 | c ENSEMBLES BEG |
---|
59 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
60 | CALL histwrite_phy(nid_hf,"tsol",itau_w,zxtsol) |
---|
61 | c |
---|
62 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d) |
---|
63 | CALL histwrite_phy(nid_hf,"slp",itau_w,slp) |
---|
64 | c |
---|
65 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, zu10m,zx_tmp_2d) |
---|
66 | CALL histwrite_phy(nid_hf,"u10m",itau_w,zu10m) |
---|
67 | c |
---|
68 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, zv10m,zx_tmp_2d) |
---|
69 | CALL histwrite_phy(nid_hf,"v10m",itau_w,zv10m) |
---|
70 | c |
---|
71 | DO i=1, klon |
---|
72 | zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) |
---|
73 | ENDDO |
---|
74 | cym 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) |
---|
76 | c |
---|
77 | DO k=1, nlevENS |
---|
78 | IF(clev(k).EQ."500") THEN |
---|
79 | cym 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 |
---|
83 | c |
---|
84 | ENDIF !lev_histhf.GE.1 |
---|
85 | c |
---|
86 | IF(lev_histhf.GE.2) THEN |
---|
87 | c |
---|
88 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d) |
---|
89 | CALL histwrite_phy(nid_hf,"cldt",itau_w,cldt) |
---|
90 | c |
---|
91 | zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter) |
---|
92 | CALL histwrite_phy(nid_hf,"SWnetOR",itau_w,zx_tmp_fi2d) |
---|
93 | c |
---|
94 | zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol(1:klon)) |
---|
95 | CALL histwrite(nid_hf,"SWdownOR",itau_w,zx_tmp_fi2d) |
---|
96 | c |
---|
97 | CALL histwrite(nid_hf,"LWdownOR",itau_w,zx_tmp_fi2d) |
---|
98 | c |
---|
99 | c |
---|
100 | ENDIF !lev_histhf.GE.2 |
---|
101 | c |
---|
102 | IF(lev_histhf.GE.3) THEN |
---|
103 | c |
---|
104 | DO k=1, nlevENS |
---|
105 | c |
---|
106 | cym 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)) |
---|
108 | c |
---|
109 | IF(clev(k).NE."500") THEN !clev(k).NE."500" |
---|
110 | cym 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" |
---|
113 | c |
---|
114 | cym 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)) |
---|
116 | c |
---|
117 | IF(1.EQ.0) THEN |
---|
118 | cym 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 |
---|
121 | c |
---|
122 | cym 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)) |
---|
124 | c |
---|
125 | cym 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)) |
---|
127 | c |
---|
128 | ENDDO !nlevENS |
---|
129 | c |
---|
130 | IF(1.EQ.0) THEN |
---|
131 | cym CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) |
---|
132 | CALL histwrite_phy(nid_hf,"cdrm",itau_w,cdragm) |
---|
133 | c |
---|
134 | cym 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 |
---|
137 | c |
---|
138 | ENDIF !lev_histhf.GE.3 |
---|
139 | c |
---|
140 | IF(lev_histhf.GE.4) THEN |
---|
141 | c |
---|
142 | #define histhf3d |
---|
143 | #ifdef histhf3d |
---|
144 | #include "write_histhf3d.h" |
---|
145 | #endif |
---|
146 | c |
---|
147 | ENDIF !lev_histhf.GE.4 |
---|
148 | c |
---|
149 | if (ok_sync) then |
---|
150 | call histsync(nid_hf) |
---|
151 | endif |
---|
152 | |
---|
153 | endif |
---|