source: LMDZ4/branches/V3_test/libf/phylmd/ini_histISCCP.h @ 718

Last change on this file since 718 was 718, checked in by Laurent Fairhead, 18 years ago

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