source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/ini_histmthCOSP.h @ 1928

Last change on this file since 1928 was 1928, checked in by idelkadi, 10 years ago
  • Correction du bug dans l'interface avec la physique : On ne veut pas que la distinction entre les nuages convectifs et stratiformes soit prise en compte dans les calculs Cosp. Dans l'interface avec la physique, sont passees en entree pour Cosp, les quantites totales (stratiforme + convective) du contenus en eau et d'autres variables. La fraction nuageuse convective calculee dans la physique est passee en entree pour Cosp dans la version buggee. Elle est remise a 0 dans cette version corrigee.
  • Mise a jour pour ISCCP : la fraction d'ensoleillement calculee par LMDZ est passee en argument pour Isccp
  • Rajouts d'autre variables diagnostiques : sunlit (=0 si nuit et =1 si jour) parasol_crefl (reflectance integree)
File size: 9.5 KB
Line 
1! Abderrahmane Idelkadi Septebmre 2009
2! Sorties journalieres de COSP
3! Pour l'instant sorties Lidar et ISCCP
4!
5! sorties par jour
6!
7!$OMP MASTER
8        zstomth = ecrit_mth
9        zout = freq_COSP
10!
11!       PRINT*, 'La frequence de sortie hf3d est de ', ecrit_hf
12!
13
14        idayref = day_ref
15        CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
16        CALL histbeg_phy("histmthCOSP",itau_phy,zjulian,dtime,nhori,nid_mth_cosp) 
17
18! Definition de l'axe vertical
19        print*,'height_mlev=',vgrid%mz
20       if (use_vgrid) then
21        CALL histvert(nid_mth_cosp,"height","height","m",Nlevout,vgrid%z,nvert)
22       else
23        CALL histvert(nid_mth_cosp,"presnivs","Vertical levels","Pa",Nlevout,presnivs,nvert,"down")
24       endif
25        CALL histvert(nid_mth_cosp,"height_mlev","height_mlev","m",Nlevlmdz,vgrid%mz,nvertm)
26
27        CALL histvert(nid_mth_cosp,"sza","solar_zenith_angle","degrees",PARASOL_NREFL,PARASOL_SZA,nvertp)
28
29        CALL histvert(nid_mth_cosp,"pressure2","pressure","mb",7,ISCCP_PC,nvertisccp,"down")
30
31        CALL histvert(nid_mth_cosp,"column","column","count",Ncolumns,column_ax(1:Ncolumns),nvertcol)
32
33! Sorties LIDAR
34       if (cfg%Llidar_sim) then
35         if (cfg%Lcllcalipso) then
36         CALL histdef(nid_mth_cosp, "cllcalipso", &
37                     "Lidar Low-level Cloud Fraction", "1", &
38                     iim, jj_nb,nhori,1,1,1,-99,32, &
39                     "ave(X)", zout,zstomth)
40         endif
41         if (cfg%Lclhcalipso) then
42         CALL histdef(nid_mth_cosp, "clhcalipso", &
43                     "Lidar High-level Cloud Fraction", "1", &
44                     iim, jj_nb,nhori,1,1,1,-99,32, &
45                     "ave(X)", zout,zstomth)
46         endif
47         if (cfg%Lclmcalipso) then
48         CALL histdef(nid_mth_cosp, "clmcalipso", &
49                     "Lidar Mid-level Cloud Fraction", "1", &
50                     iim, jj_nb,nhori,1,1,1,-99,32, &
51                     "ave(X)", zout,zstomth)
52         endif
53         if (cfg%Lcltcalipso) then
54         CALL histdef(nid_mth_cosp, "cltcalipso", &
55                     "Lidar Total Cloud Fraction", "1", &
56                     iim, jj_nb,nhori,1,1,1,-99,32, &
57                     "ave(X)", zout,zstomth)
58         endif
59         if (cfg%Lclcalipso) then
60         CALL histdef(nid_mth_cosp, "clcalipso", &
61                     "Lidar Cloud Fraction (532 nm)", "1", &
62                     iim,jj_nb,nhori, Nlevout,1,Nlevout,nvert, 32, &
63                     "ave(X)", zout,zstomth)
64!         CALL histdef(nid_mth_cosp, "zlev_m", &
65!                     "Height at Midel model levels", "m", &
66!                     iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
67!                     "ave(X)", zout,zstomth)
68!         CALL histdef(nid_mth_cosp, "zlev_b", &
69!                     "Height at bottom model levels", "m", &
70!                     iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
71!                     "ave(X)", zout,zstomth)
72         endif
73           if (cfg%Lcfad_lidarsr532) then
74              do ii=1,SR_BINS
75               CALL histdef(nid_mth_cosp, "cfad_lidarsr532_"//chcol(ii), &
76                           "Lidar Scattering Ratio CFAD (532 nm)","1", &
77                           iim,jj_nb,nhori, Nlevout,1,Nlevout,nvert, 32, &
78                           "ave(X)", zout,zstomth)   
79              enddo
80           endif
81           if (cfg%Lparasol_refl) then
82            CALL histdef(nid_mth_cosp, "parasol_refl", &
83                        "PARASOL-like mono-directional reflectance","1", &
84                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
85                        "ave(X)", zout,zstomth)   
86            CALL histdef(nid_mth_cosp, "parasol_crefl", &
87                        "PARASOL-like mono-directional reflectance","1", &
88                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
89                        "ave(X)", zout,zstomth)
90            CALL histdef(nid_mth_cosp, "Ncrefl", &
91                        "0 ou 1 si reflectance <= ou > 0","1", &
92                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
93                        "ave(X)", zout,zstomth)
94           endif
95           if (cfg%Latb532) then
96            do ii=1,Ncolumns
97             CALL histdef(nid_mth_cosp, "atb532_"//chcol(ii), &
98                         "Lidar Attenuated Total Backscatter (532 nm)","1", &
99                         iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
100                         "ave(X)", zout,zstomth)
101            enddo
102           endif
103           if (cfg%Lbeta_mol532) then
104            CALL histdef(nid_mth_cosp, "beta_mol532", &
105                        "Lidar Molecular Backscatter (532 nm)","m-1 sr-1", &
106                        iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
107                         "ave(X)", zout,zstomth)
108           endif
109        endif ! Lidar
110
111! Sorties RADAR
112!Attention A FAIRE
113!        if (cfg%Lradar_sim) then
114!         print*,'Ecriture sorties Radar'
115!          if (cfg%tttttttttttt) then
116!              print*,'Ecriture de cfad_dbze94.nc '
117!              A revoir l axe vertical Nlvgrid
118!               do ii=1,DBZE_BINS
119!                   dbze_ax(ii) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5)
120!               enddo
121!               call write_netcdf4d('cfad_dbze94.nc',use_vgrid,nlon,nlat,Nlevout,DBZE_BINS, &
122!                                   x,y,out_levs,dbze_ax,i,ndays,time,stradar%cfad_ze)
123!          endif
124!          if (cfg%Lclcalipso2) then
125!               call write_netcdf3d('clcalipso2.nc',use_vgrid,'clcalipso2', &
126!                              nlon,nlat,Nlevout,x,y,out_levs,i,ndays,time,stradar%lidar_only_freq_cloud)
127!          endif
128!          if (cfg%Ldbze94) then
129!             do ii=1,Ncolumns
130!                xcol(ii)=float(i)
131!             enddo
132!             call write_netcdf4d('dbze94.nc',use_vgrid,nlon,nlat,Nlevout,Ncolumns, &
133!                                 x,y,out_levs,xcol,i,ndays,time,sgradar%Ze_tot)
134!          endif
135!          if (cfg%Lcltlidarradar) then
136!             call write_netcdf2d('cltlidarradar.nc','cltlidarradar', &
137!                                 nlon,nlat,x,y,i,ndays,time,stradar%radar_lidar_tcc)
138!          endif
139!        endif  ! Radar
140
141! Sorties MISR
142!Attention A FAIRE
143!        if (cfg%Lmisr_sim) then
144!         print*,'Ecriture sorties Misr'
145!            call write_netcdf4d('clMISR.nc',use_vgrid,nlon,nlat,MISR_N_CTH,7, &
146!                                x,y,MISR_CTH,ISCCP_TAU,i,ndays,time,misr%fq_MISR)
147!        endif
148
149! Sorties ISCCP
150        if (cfg%Lisccp_sim) then
151
152             CALL histdef(nid_mth_cosp, "sunlit", &
153                     "1 si jour 0 si nuit", "1", &
154                     iim, jj_nb,nhori,1,1,1,-99,32, &
155                     "ave(X)", zout,zstomth)
156         if (cfg%Lclisccp2) then
157            do ii=1,7
158             CALL histdef(nid_mth_cosp, "clisccp2_"//chcol(ii), &
159                         "Cloud Fraction as Calculated by the ISCCP Simulator","1", &
160                         iim,jj_nb,nhori,7,1,7,nvertisccp, 32, &
161                         "ave(X)", zout,zstomth)
162            enddo
163          endif
164          if (cfg%Lboxtauisccp) then
165            CALL histdef(nid_mth_cosp, "boxtauisccp", &
166                         "Optical Depth in Each Column as Calculated by the ISCCP Simulator","1", &
167                         iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
168                         "ave(X)", zout,zstomth)
169          endif
170          if (cfg%Lboxptopisccp) then
171            CALL histdef(nid_mth_cosp, "boxptopisccp", &
172                         "Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator","Pa", &
173                         iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
174                         "ave(X)", zout,zstomth)
175          endif
176          if (cfg%Ltclisccp) then
177           CALL histdef(nid_mth_cosp, "tclisccp", &
178                     "Total Cloud Fraction as Calculated by the ISCCP Simulator", "1", &
179                     iim, jj_nb,nhori,1,1,1,-99,32, &
180                     "ave(X)", zout,zstomth)
181          endif
182          if (cfg%Lctpisccp) then
183            CALL histdef(nid_mth_cosp, "ctpisccp", &
184                     "Mean Cloud Top Pressure as Calculated by the ISCCP Simulator", "Pa", &
185                     iim, jj_nb,nhori,1,1,1,-99,32, &
186                     "ave(X)", zout,zstomth)
187          endif
188          if (cfg%Ltauisccp) then
189           CALL histdef(nid_mth_cosp, "tauisccp", &
190                     "Optical Depth as Calculated by the ISCCP Simulator", "1", &
191                     iim, jj_nb,nhori,1,1,1,-99,32, &
192                     "ave(X)", zout,zstomth)
193          endif
194          if (cfg%Lalbisccp) then
195           CALL histdef(nid_mth_cosp, "albisccp", &
196                     "Mean Cloud Albedo as Calculated by the ISCCP Simulator", "1", &
197                     iim, jj_nb,nhori,1,1,1,-99,32, &
198                     "ave(X)", zout,zstomth) 
199          endif
200          if (cfg%Lmeantbisccp) then
201            CALL histdef(nid_mth_cosp, "meantbisccp", &
202             " Mean all-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
203             iim, jj_nb,nhori,1,1,1,-99,32, &
204             "ave(X)", zout,zstomth)
205          endif
206          if (cfg%Lmeantbclrisccp) then
207           CALL histdef(nid_mth_cosp, "meantbclrisccp", &
208            "Mean clear-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
209             iim, jj_nb,nhori,1,1,1,-99,32, &
210             "ave(X)", zout,zstomth) 
211          endif
212        endif ! Isccp
213
214
215        CALL histend(nid_mth_cosp)
216!$OMP END MASTER
217!$OMP BARRIER
Note: See TracBrowser for help on using the repository browser.