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

Last change on this file since 805 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
RevLine 
[524]1!
2! $Header$
3!
4      IF (ok_isccp) THEN
5c
[766]6c$OMP MASTER
[684]7      ndex2d = 0
8      ndex3d = 0
9c
[524]10c pour les champs instantannes, il faut mettre la meme valeur pour
11c zout et zsto.
12c dtime est passe par ailleurs a histbeg
[644]13c zstophy = frequence de stockage des champs tous les pdt physiques
[524]14c zout = frequence d'ecriture des champs
[684]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
[524]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.
[644]26c ecriture toutes les 1/2 h (48 fois par jour)
[524]27c       zout = dtime
28c
[684]29c       IF(freqout_isccp.EQ.1.) THEN
30c ecriture jounaliere
31          zout_isccp(1) = ecrit_day !(en s)
[524]32c ecriture mensuelle
[684]33c         zout = dtime * ecrit_mth !(en s)
34        DO n=1, napisccp
35          zoutj(n)=zout_isccp(n)/86400. !(en jours)
[524]36c
[684]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
[524]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)
[684]51c       write(*,*)'ISCCP ', itau_phy, zjulian
[524]52c
53c
54c definition coordonnees lon,lat en globale
55c
[766]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
[524]61
[766]62cym        CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat)
[524]63c
[684]64cIM BEG region
[766]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
[684]69          imin_ins=1
70          imax_ins=iim
71          jmin_ins=1
72          jmax_ins=jjmp1
[766]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
[684]81c
82          print*,'On stoke le fichier histISCCP instantanne sur ',
83     s   imin_ins,imax_ins,jmin_ins,jmax_ins
[766]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)
[684]87cIM END region
88c
89        IF(1.EQ.0) THEN
[766]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,
[524]95     .                 nhori, nid_isccp)
[766]96
[684]97        ENDIF !(1.EQ.0) THEN
[524]98c
[766]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,
[684]107     .                 nhori, nid_isccp)
[766]108
[684]109c
110        IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN
[524]111         CALL histvert(nid_isccp, "cldtopres","Cloud Top Pressure","mb",
112     .                 lmaxm1, cldtopres, nvert,'down')
[684]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
[524]122c
[644]123        IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN
124c
[524]125c variables a ecrire
[684]126c
127         DO n=1, napisccp
[524]128c
129         DO k=1, kmaxm1
[684]130          CALL histdef(nid_isccp, "cldISCCP_"//taulev(k)//typinout(n),
[524]131     .                "LMDZ ISCCP cld", "%",
[776]132     .                iim, jj_nb,nhori,lmaxm1,1,lmaxm1,nvert,32,
[684]133     .                "ave(X)", zcals(n),zout_isccp(n))
[524]134         ENDDO
135c
[684]136         CALL histdef(nid_isccp, "nsunlit"//typinout(n),
[524]137     .                "Nb of calls with sunlit ", "%",
[776]138     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]139     .                "ave(X)", zcals(n),zout_isccp(n))
[524]140c
[684]141         ENDDO
142c
[644]143        ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN
144c
[684]145         DO n=1, napisccp
[644]146c
[684]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),
[644]153     .                "LMDZ ISCCP cld "//cnameisccp(l,k), "%",
[776]154     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]155     .                "ave(X)", zcals(n),zout_isccp(n))
[644]156c
[684]157           ENDDO
[644]158          ENDDO
159c
[684]160c         print*,'n=',n,' avant histdef(..Nb of calls sunlit'
161          CALL histdef(nid_isccp, "nsunlit"//typinout(n),
[644]162     .                "Nb of calls with sunlit ", "%",
[776]163     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]164     .                "ave(X)", zcals(n),zout_isccp(n))
[644]165c
[684]166c 9types de nuages ISCCP-D2
167          CALL histdef(nid_isccp, "cirr",
168     .                "Cirrus lk ISCCP-D2", "%",
[776]169     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]170     .                "ave(X)", zcals(n),zout_isccp(n))
171c
172          CALL histdef(nid_isccp, "cist",
173     .                "CiSt lk ISCCP-D2", "%",
[776]174     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]175     .                "ave(X)", zcals(n),zout_isccp(n))
176c
177          CALL histdef(nid_isccp, "deep",
178     .                "Deep lk ISCCP-D2", "%",
[776]179     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]180     .                "ave(X)", zcals(n),zout_isccp(n))
181c
182          CALL histdef(nid_isccp, "alcu",
183     .                "AlCu lk ISCCP-D2", "%",
[776]184     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]185     .                "ave(X)", zcals(n),zout_isccp(n))
186c
187          CALL histdef(nid_isccp, "alst",
188     .                "AlSt lk ISCCP-D2", "%",
[776]189     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]190     .                "ave(X)", zcals(n),zout_isccp(n))
191c
192          CALL histdef(nid_isccp, "nist",
193     .                "NiSt lk ISCCP-D2", "%",
[776]194     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]195     .                "ave(X)", zcals(n),zout_isccp(n))
196c
197          CALL histdef(nid_isccp, "cumu",
198     .                "Cumu lk ISCCP-D2", "%",
[776]199     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]200     .                "ave(X)", zcals(n),zout_isccp(n))
201c
202          CALL histdef(nid_isccp, "stcu",
203     .                "StCu lk ISCCP-D2", "%",
[776]204     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]205     .                "ave(X)", zcals(n),zout_isccp(n))
206c
207          CALL histdef(nid_isccp, "stra",
208     .                "Stra lk ISCCP-D2", "%",
[776]209     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]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", "%",
[776]215     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
[684]216     .                "ave(X)", zcals(n),zout_isccp(n))
217c
218          CALL histdef(nid_isccp, "mid",
219     .                "Opt. intermediate ISCCP-D2 like clouds", "%",
[776]220     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
[684]221     .                "ave(X)", zcals(n),zout_isccp(n))
222c
223          CALL histdef(nid_isccp, "thick",
224     .                "Opt. thick ISCCP-D2 like clouds", "%",
[776]225     .                iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32,
[684]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",
[776]238     .                iim, jj_nb,nhori,
[684]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), "-",
[776]251     .                iim, jj_nb,nhori,1,1,1,-99,32,
[684]252cIM  .                "inst(X)", dtime,dtime)
253     .                "ave(X)", zcals(n),zout_isccp(n))
254c
255         ENDDO !n
[644]256        ENDIF
[524]257        CALL histend(nid_isccp)
258c
[766]259c$OMP END MASTER
[524]260      ENDIF ! ok_isccp
Note: See TracBrowser for help on using the repository browser.