source: LMDZ4/trunk/libf/phylmd/ini_histISCCP.h @ 776

Last change on this file since 776 was 776, checked in by Laurent Fairhead, 17 years ago

Suite du merge entre la version et la HEAD: quelques modifications
de Yann sur le

LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.9 KB
Line 
1!
2! $Header$
3!
4      IF (ok_isccp) THEN
5c
6c$OMP MASTER
7      ndex2d = 0
8      ndex3d = 0
9c
10c pour les champs instantannes, il faut mettre la meme valeur pour
11c zout et zsto.
12c dtime est passe par ailleurs a histbeg
13c zstophy = frequence de stockage des champs tous les pdt physiques
14c zout = frequence d'ecriture des champs
15cIM 300505     zstophy = dtime
16c appel du simulateur toutes les 3heures
17          zcals(1) = dtime *6.  !toutes les 3h (en s)
18        DO n=1, napisccp
19          zcalh(n) = zcals(n)/3600. !stoutes les Xh (en heures)
20        ENDDO !n
21c
22c ecriture 8 fois par jour
23c       zout = dtime * REAL(NINT(86400./dtime*ecrit_isccp))
24c ecriture toutes les 2h (12 fois par jour)
25c       zout = dtime * 4.
26c ecriture toutes les 1/2 h (48 fois par jour)
27c       zout = dtime
28c
29c       IF(freqout_isccp.EQ.1.) THEN
30c ecriture jounaliere
31          zout_isccp(1) = ecrit_day !(en s)
32c ecriture mensuelle
33c         zout = dtime * ecrit_mth !(en s)
34        DO n=1, napisccp
35          zoutj(n)=zout_isccp(n)/86400. !(en jours)
36c
37c le nombre de sous-colonnes ncol : ncol=(100.*zcalh)/zoutd
38          ncol(n)=NINT((100.*zcalh(n))/zoutj(n))
39          PRINT*,'n ncol',n,ncol(n)
40c
41        DO l=1, ncol(n)
42          vertlev(l,n)=float(l)
43        ENDDO !ncol
44c
45        ENDDO !n
46
47c       PRINT*, 'La frequence de sortie ISCCP est de ', ecrit_isccp
48c
49        idayref = day_ref
50        CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
51c       write(*,*)'ISCCP ', itau_phy, zjulian
52c
53c
54c definition coordonnees lon,lat en globale
55c
56cym        CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon)
57cym        DO i = 1, iim
58cym          zx_lon(i,1) = rlon(i+1)
59cym          zx_lon(i,jjmp1) = rlon(i+1)
60cym        ENDDO
61
62cym        CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat)
63c
64cIM BEG region
65cym Desole dans un premier temps le mode region ne marchera pas
66cym Il faudra voir dans un second temps pour l'implementer
67cym Mais cela posera des problemes au niveau de la reconstruction
68
69          imin_ins=1
70          imax_ins=iim
71          jmin_ins=1
72          jmax_ins=jjmp1
73cym          do i=1,iim-1
74cym             if(zx_lon(i,1).lt.lonmin_ins) imin_ins=i
75cym             if(zx_lon(i,1).le.lonmax_ins) imax_ins=i+1
76cym          enddo
77cym          do j=1,jjmp1
78cym             if(zx_lat(1,j).ge.latmin_ins) jmax_ins=j
79cym             if(zx_lat(1,j).gt.latmax_ins) jmin_ins=j
80cym          enddo
81c
82          print*,'On stoke le fichier histISCCP instantanne sur ',
83     s   imin_ins,imax_ins,jmin_ins,jmax_ins
84cym          print*,'On stoke le fichier histISCCP instantanne sur ',
85cym     s   zx_lon(imin_ins,1),zx_lon(imax_ins,1),
86cym     s   zx_lat(1,jmin_ins),zx_lat(1,jmax_ins)
87cIM END region
88c
89        IF(1.EQ.0) THEN
90cym         CALL histbeg("histISCCP.nc", iim,zx_lon(:,1),jjmp1,zx_lat(1,:),
91cym     .                 1, iim, 1, jjmp1,
92cym     .                 itau_phy, zjulian, dtime,
93cym     .                 nhori, nid_isccp)
94         CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime,
95     .                 nhori, nid_isccp)
96
97        ENDIF !(1.EQ.0) THEN
98c
99cym         CALL histbeg("histISCCP.nc", iim,zx_lon(:,1),
100cym     .                 jjmp1,zx_lat(1,:),
101cym     .                 imin_ins,imax_ins-imin_ins+1,
102cym     .                 jmin_ins,jmax_ins-jmin_ins+1,
103cym     .                 itau_phy, zjulian, dtime,
104cym     .                 nhori, nid_isccp)
105
106         CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime,
107     .                 nhori, nid_isccp)
108
109c
110        IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN
111         CALL histvert(nid_isccp, "cldtopres","Cloud Top Pressure","mb",
112     .                 lmaxm1, cldtopres, nvert,'down')
113        ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN
114         CALL histvert(nid_isccp,"cldtopres3","Cloud Top Pressure","mb",
115     .                 lmax3, cldtopres3, nvert3,'down')
116        ENDIF
117        DO n=1, napisccp
118         CALL histvert(nid_isccp, "Nbcol"//verticaxe(n),
119     .        "Nb of Column"//verticaxe(n),"1",
120     .        ncol(n), vertlev(:,n), nvlev(n),'up')
121        ENDDO
122c
123        IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN
124c
125c variables a ecrire
126c
127         DO n=1, napisccp
128c
129         DO k=1, kmaxm1
130          CALL histdef(nid_isccp, "cldISCCP_"//taulev(k)//typinout(n),
131     .                "LMDZ ISCCP cld", "%",
132     .                iim, jj_nb,nhori,lmaxm1,1,lmaxm1,nvert,32,
133     .                "ave(X)", zcals(n),zout_isccp(n))
134         ENDDO
135c
136         CALL histdef(nid_isccp, "nsunlit"//typinout(n),
137     .                "Nb of calls with sunlit ", "%",
138     .                iim, jj_nb,nhori,1,1,1,-99,32,
139     .                "ave(X)", zcals(n),zout_isccp(n))
140c
141         ENDDO
142c
143        ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN
144c
145         DO n=1, napisccp
146c
147c         print*,'n=',n,' avant histdef(..LMDZ ISCCP cld'
148c
149          DO k=1, kmaxm1
150           DO l=1, lmaxm1
151c
152           CALL histdef(nid_isccp, pclev(l)//taulev(k)//typinout(n),
153     .                "LMDZ ISCCP cld "//cnameisccp(l,k), "%",
154     .                iim, jj_nb,nhori,1,1,1,-99,32,
155     .                "ave(X)", zcals(n),zout_isccp(n))
156c
157           ENDDO
158          ENDDO
159c
160c         print*,'n=',n,' avant histdef(..Nb of calls sunlit'
161          CALL histdef(nid_isccp, "nsunlit"//typinout(n),
162     .                "Nb of calls with sunlit ", "%",
163     .                iim, jj_nb,nhori,1,1,1,-99,32,
164     .                "ave(X)", zcals(n),zout_isccp(n))
165c
166c 9types de nuages ISCCP-D2
167          CALL histdef(nid_isccp, "cirr",
168     .                "Cirrus lk ISCCP-D2", "%",
169     .                iim, jj_nb,nhori,1,1,1,-99,32,
170     .                "ave(X)", zcals(n),zout_isccp(n))
171c
172          CALL histdef(nid_isccp, "cist",
173     .                "CiSt lk ISCCP-D2", "%",
174     .                iim, jj_nb,nhori,1,1,1,-99,32,
175     .                "ave(X)", zcals(n),zout_isccp(n))
176c
177          CALL histdef(nid_isccp, "deep",
178     .                "Deep lk ISCCP-D2", "%",
179     .                iim, jj_nb,nhori,1,1,1,-99,32,
180     .                "ave(X)", zcals(n),zout_isccp(n))
181c
182          CALL histdef(nid_isccp, "alcu",
183     .                "AlCu lk ISCCP-D2", "%",
184     .                iim, jj_nb,nhori,1,1,1,-99,32,
185     .                "ave(X)", zcals(n),zout_isccp(n))
186c
187          CALL histdef(nid_isccp, "alst",
188     .                "AlSt lk ISCCP-D2", "%",
189     .                iim, jj_nb,nhori,1,1,1,-99,32,
190     .                "ave(X)", zcals(n),zout_isccp(n))
191c
192          CALL histdef(nid_isccp, "nist",
193     .                "NiSt lk ISCCP-D2", "%",
194     .                iim, jj_nb,nhori,1,1,1,-99,32,
195     .                "ave(X)", zcals(n),zout_isccp(n))
196c
197          CALL histdef(nid_isccp, "cumu",
198     .                "Cumu lk ISCCP-D2", "%",
199     .                iim, jj_nb,nhori,1,1,1,-99,32,
200     .                "ave(X)", zcals(n),zout_isccp(n))
201c
202          CALL histdef(nid_isccp, "stcu",
203     .                "StCu lk ISCCP-D2", "%",
204     .                iim, jj_nb,nhori,1,1,1,-99,32,
205     .                "ave(X)", zcals(n),zout_isccp(n))
206c
207          CALL histdef(nid_isccp, "stra",
208     .                "Stra lk ISCCP-D2", "%",
209     .                iim, jj_nb,nhori,1,1,1,-99,32,
210     .                "ave(X)", zcals(n),zout_isccp(n))
211c
212c 3_epaisseurs_optiques x3_pressions_au_sommet_des_nuages  types de nuages
213          CALL histdef(nid_isccp, "thin",
214     .                "Opt. thin ISCCP-D2 like clouds", "%",
215     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
216     .                "ave(X)", zcals(n),zout_isccp(n))
217c
218          CALL histdef(nid_isccp, "mid",
219     .                "Opt. intermediate ISCCP-D2 like clouds", "%",
220     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
221     .                "ave(X)", zcals(n),zout_isccp(n))
222c
223          CALL histdef(nid_isccp, "thick",
224     .                "Opt. thick ISCCP-D2 like clouds", "%",
225     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
226     .                "ave(X)", zcals(n),zout_isccp(n))
227c
228c        IF(1.EQ.0) THEN
229c        IF(n.EQ.3) THEN
230c        IF(n.EQ.1) THEN
231c
232cIM 070905 BEG
233         IF(1.EQ.0) THEN
234          print*,'n=',n,' avant histdef(..boxptop axe'
235cIM verif boxptop
236          CALL histdef(nid_isccp,"boxptop"//verticaxe(n),
237     .                "Boxptop axe"//verticaxe(n), "mb",
238     .                iim, jj_nb,nhori,
239     .                ncol(n),1,ncol(n),nvlev(n),32,
240cIM  .                ncolmx,1,ncolmx,nvlev,32,
241cIM  .                "inst(X)",dtime,dtime)
242     .                "ave(X)",zcals(n),zout_isccp(n))
243         ENDIF !(1.EQ.0) THEN
244cIM 070905 END
245c        ENDIF !(n.EQ.3) THEN
246c       ENDIF !(1.EQ.0) THEN
247c
248c         print*,'n=',n,' avant histdef(..seed axe'
249          CALL histdef(nid_isccp, "seed"//verticaxe(n),
250     .                "seed axe"//verticaxe(n), "-",
251     .                iim, jj_nb,nhori,1,1,1,-99,32,
252cIM  .                "inst(X)", dtime,dtime)
253     .                "ave(X)", zcals(n),zout_isccp(n))
254c
255         ENDDO !n
256        ENDIF
257        CALL histend(nid_isccp)
258c
259c$OMP END MASTER
260      ENDIF ! ok_isccp
Note: See TracBrowser for help on using the repository browser.