source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/ini_histdayCOSP.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.0 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        zstoday = ecrit_day
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
17        CALL histbeg_phy("histdayCOSP",itau_phy,zjulian,dtime,nhori,nid_day_cosp) 
18
19! Definition de l'axe vertical
20       if (use_vgrid) then
21        CALL histvert(nid_day_cosp,"height","height","m",Nlevout,vgrid%z,nvert)
22       else
23        CALL histvert(nid_day_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert,"down")
24       endif
25
26        CALL histvert(nid_day_cosp,"height_mlev","height_mlev","m",Nlevlmdz,vgrid%mz,nvertm)
27
28        CALL histvert(nid_day_cosp,"sza","solar_zenith_angle","degrees",PARASOL_NREFL,PARASOL_SZA,nvertp)
29
30        CALL histvert(nid_day_cosp,"pressure2","pressure","mb",7,ISCCP_PC,nvertisccp,"down")
31
32        CALL histvert(nid_day_cosp,"column","column","count",Ncolumns,column_ax(1:Ncolumns),nvertcol)
33
34! Sorties LIDAR
35       if (cfg%Llidar_sim) then
36         if (cfg%Lcllcalipso) then
37         CALL histdef(nid_day_cosp, "cllcalipso", &
38                     "Lidar Low-level Cloud Fraction", "1", &
39                     iim, jj_nb,nhori,1,1,1,-99,32, &
40                     "ave(X)", zout,zstoday)
41         endif
42         if (cfg%Lclhcalipso) then
43         CALL histdef(nid_day_cosp, "clhcalipso", &
44                     "Lidar High-level Cloud Fraction", "1", &
45                     iim, jj_nb,nhori,1,1,1,-99,32, &
46                     "ave(X)", zout,zstoday)
47         endif
48         if (cfg%Lclmcalipso) then
49         CALL histdef(nid_day_cosp, "clmcalipso", &
50                     "Lidar Mid-level Cloud Fraction", "1", &
51                     iim, jj_nb,nhori,1,1,1,-99,32, &
52                     "ave(X)", zout,zstoday)
53         endif
54         if (cfg%Lcltcalipso) then
55         CALL histdef(nid_day_cosp, "cltcalipso", &
56                     "Lidar Total Cloud Fraction", "1", &
57                     iim, jj_nb,nhori,1,1,1,-99,32, &
58                     "ave(X)", zout,zstoday)
59         endif
60         if (cfg%Lclcalipso) then
61         CALL histdef(nid_day_cosp, "clcalipso", &
62                     "Lidar Cloud Fraction (532 nm)", "1", &
63                     iim,jj_nb,nhori, Nlevout,1,Nlevout,nvert, 32, &
64                     "ave(X)", zout,zstoday)
65         endif
66           if (cfg%Lcfad_lidarsr532) then
67              do ii=1,SR_BINS
68               CALL histdef(nid_day_cosp, "cfad_lidarsr532_"//chcol(ii), &
69                           "Lidar Scattering Ratio CFAD (532 nm)","1", &
70                           iim,jj_nb,nhori, Nlevout,1,Nlevout,nvert, 32, &
71                           "ave(X)", zout,zstoday)   
72              enddo
73           endif
74           if (cfg%Lparasol_refl) then
75            CALL histdef(nid_day_cosp, "parasol_refl", &
76                        "PARASOL-like mono-directional reflectance","1", &
77                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
78                        "ave(X)", zout,zstoday)   
79            CALL histdef(nid_day_cosp, "parasol_crefl", &
80                        "PARASOL-like mono-directional reflectance","1", &
81                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
82                        "ave(X)", zout,zstoday)
83            CALL histdef(nid_day_cosp, "Ncrefl", &
84                        "0 ou 1 si reflectance <= ou > 0","1", &
85                        iim,jj_nb,nhori, PARASOL_NREFL,1, PARASOL_NREFL, nvertp,32, &
86                        "ave(X)", zout,zstoday)
87           endif
88           if (cfg%Latb532) then
89            do ii=1,Ncolumns
90             CALL histdef(nid_day_cosp, "atb532_"//chcol(ii), &
91                         "Lidar Attenuated Total Backscatter (532 nm)","1", &
92                         iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
93                         "ave(X)", zout,zstoday)
94            enddo
95           endif
96           if (cfg%Lbeta_mol532) then
97            CALL histdef(nid_day_cosp, "beta_mol532", &
98                        "Lidar Molecular Backscatter (532 nm)","m-1 sr-1", &
99                        iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
100                         "ave(X)", zout,zstoday)
101           endif
102        endif ! Lidar
103
104! Sorties RADAR
105!Attention A FAIRE
106!        if (cfg%Lradar_sim) then
107!         print*,'Ecriture sorties Radar'
108!          if (cfg%Lcfad_dbze94) then
109!              print*,'Ecriture de cfad_dbze94.nc '
110!              A revoir l axe vertical Nlvgrid
111!               do ii=1,DBZE_BINS
112!                   dbze_ax(ii) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5)
113!               enddo
114!               call write_netcdf4d('cfad_dbze94.nc',use_vgrid,nlon,nlat,Nlevout,DBZE_BINS, &
115!                                   x,y,out_levs,dbze_ax,i,ndays,time,stradar%cfad_ze)
116!          endif
117!          if (cfg%Lclcalipso2) then
118!               call write_netcdf3d('clcalipso2.nc',use_vgrid,'clcalipso2', &
119!                              nlon,nlat,Nlevout,x,y,out_levs,i,ndays,time,stradar%lidar_only_freq_cloud)
120!          endif
121!          if (cfg%Ldbze94) then
122!             do ii=1,Ncolumns
123!                xcol(ii)=float(i)
124!             enddo
125!             call write_netcdf4d('dbze94.nc',use_vgrid,nlon,nlat,Nlevout,Ncolumns, &
126!                                 x,y,out_levs,xcol,i,ndays,time,sgradar%Ze_tot)
127!          endif
128!          if (cfg%Lcltlidarradar) then
129!             call write_netcdf2d('cltlidarradar.nc','cltlidarradar', &
130!                                 nlon,nlat,x,y,i,ndays,time,stradar%radar_lidar_tcc)
131!          endif
132!        endif  ! Radar
133
134! Sorties MISR
135!Attention A FAIRE
136!        if (cfg%Lmisr_sim) then
137!         print*,'Ecriture sorties Misr'
138!            call write_netcdf4d('clMISR.nc',use_vgrid,nlon,nlat,MISR_N_CTH,7, &
139!                                x,y,MISR_CTH,ISCCP_TAU,i,ndays,time,misr%fq_MISR)
140!        endif
141
142! Sorties ISCCP
143        if (cfg%Lisccp_sim) then
144          CALL histdef(nid_day_cosp, "sunlit", &
145                     "1 si jour 0 si nuit", "1", &
146                     iim, jj_nb,nhori,1,1,1,-99,32, &
147                     "ave(X)", zout,zstomth)
148         if (cfg%Lclisccp2) then
149            do ii=1,7
150             CALL histdef(nid_day_cosp, "clisccp2_"//chcol(ii), &
151                         "Cloud Fraction as Calculated by the ISCCP Simulator","1", &
152                         iim,jj_nb,nhori,7,1,7,nvertisccp, 32, &
153                         "ave(X)", zout,zstoday)
154            enddo
155          endif
156          if (cfg%Lboxtauisccp) then
157            CALL histdef(nid_day_cosp, "boxtauisccp", &
158                         "Optical Depth in Each Column as Calculated by the ISCCP Simulator","1", &
159                         iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
160                         "ave(X)", zout,zstoday)
161          endif
162          if (cfg%Lboxptopisccp) then
163            CALL histdef(nid_day_cosp, "boxptopisccp", &
164                         "Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator","Pa", &
165                         iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
166                         "ave(X)", zout,zstoday)
167          endif
168          if (cfg%Ltclisccp) then
169           CALL histdef(nid_day_cosp, "tclisccp", &
170                     "Total Cloud Fraction as Calculated by the ISCCP Simulator", "1", &
171                     iim, jj_nb,nhori,1,1,1,-99,32, &
172                     "ave(X)", zout,zstoday)
173          endif
174          if (cfg%Lctpisccp) then
175            CALL histdef(nid_day_cosp, "ctpisccp", &
176                     "Mean Cloud Top Pressure as Calculated by the ISCCP Simulator", "Pa", &
177                     iim, jj_nb,nhori,1,1,1,-99,32, &
178                     "ave(X)", zout,zstoday)
179          endif
180          if (cfg%Ltauisccp) then
181           CALL histdef(nid_day_cosp, "tauisccp", &
182                     "Optical Depth as Calculated by the ISCCP Simulator", "1", &
183                     iim, jj_nb,nhori,1,1,1,-99,32, &
184                     "ave(X)", zout,zstoday)
185          endif
186          if (cfg%Lalbisccp) then
187           CALL histdef(nid_day_cosp, "albisccp", &
188                     "Mean Cloud Albedo as Calculated by the ISCCP Simulator", "1", &
189                     iim, jj_nb,nhori,1,1,1,-99,32, &
190                     "ave(X)", zout,zstoday) 
191          endif
192          if (cfg%Lmeantbisccp) then
193            CALL histdef(nid_day_cosp, "meantbisccp", &
194             " Mean all-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
195             iim, jj_nb,nhori,1,1,1,-99,32, &
196             "ave(X)", zout,zstoday)
197          endif
198          if (cfg%Lmeantbclrisccp) then
199           CALL histdef(nid_day_cosp, "meantbclrisccp", &
200            "Mean clear-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
201             iim, jj_nb,nhori,1,1,1,-99,32, &
202             "ave(X)", zout,zstoday) 
203          endif
204        endif ! Isccp
205
206
207        CALL histend(nid_day_cosp)
208!$OMP END MASTER
209!$OMP BARRIER
Note: See TracBrowser for help on using the repository browser.