My Project
 All Classes Files Functions Variables Macros
ini_histdayCOSP.h
Go to the documentation of this file.
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)
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)
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  endif
80  if (cfg%Latb532) then
81  do ii=1,Ncolumns
82  CALL histdef(nid_day_cosp, "atb532_"//chcol(ii), &
83  "Lidar Attenuated Total Backscatter (532 nm)","1", &
84  iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
85  "ave(X)", zout,zstoday)
86  enddo
87  endif
88  if (cfg%Lbeta_mol532) then
89  CALL histdef(nid_day_cosp, "beta_mol532", &
90  "Lidar Molecular Backscatter (532 nm)","m-1 sr-1", &
91  iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
92  "ave(X)", zout,zstoday)
93  endif
94  endif ! Lidar
95 
96 ! Sorties RADAR
97 !Attention A FAIRE
98 ! if (cfg%Lradar_sim) then
99 ! print*,'Ecriture sorties Radar'
100 ! if (cfg%Lcfad_dbze94) then
101 ! print*,'Ecriture de cfad_dbze94.nc '
102 ! A revoir l axe vertical Nlvgrid
103 ! do ii=1,DBZE_BINS
104 ! dbze_ax(ii) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5)
105 ! enddo
106 ! call write_netcdf4d('cfad_dbze94.nc',use_vgrid,nlon,nlat,Nlevout,DBZE_BINS, &
107 ! x,y,out_levs,dbze_ax,i,ndays,time,stradar%cfad_ze)
108 ! endif
109 ! if (cfg%Lclcalipso2) then
110 ! call write_netcdf3d('clcalipso2.nc',use_vgrid,'clcalipso2', &
111 ! nlon,nlat,Nlevout,x,y,out_levs,i,ndays,time,stradar%lidar_only_freq_cloud)
112 ! endif
113 ! if (cfg%Ldbze94) then
114 ! do ii=1,Ncolumns
115 ! xcol(ii)=float(i)
116 ! enddo
117 ! call write_netcdf4d('dbze94.nc',use_vgrid,nlon,nlat,Nlevout,Ncolumns, &
118 ! x,y,out_levs,xcol,i,ndays,time,sgradar%Ze_tot)
119 ! endif
120 ! if (cfg%Lcltlidarradar) then
121 ! call write_netcdf2d('cltlidarradar.nc','cltlidarradar', &
122 ! nlon,nlat,x,y,i,ndays,time,stradar%radar_lidar_tcc)
123 ! endif
124 ! endif ! Radar
125 
126 ! Sorties MISR
127 !Attention A FAIRE
128 ! if (cfg%Lmisr_sim) then
129 ! print*,'Ecriture sorties Misr'
130 ! call write_netcdf4d('clMISR.nc',use_vgrid,nlon,nlat,MISR_N_CTH,7, &
131 ! x,y,MISR_CTH,ISCCP_TAU,i,ndays,time,misr%fq_MISR)
132 ! endif
133 
134 ! Sorties ISCCP
135  if (cfg%Lisccp_sim) then
136  if (cfg%Lclisccp2) then
137  do ii=1,7
138  CALL histdef(nid_day_cosp, "clisccp2_"//chcol(ii), &
139  "Cloud Fraction as Calculated by the ISCCP Simulator","1", &
140  iim,jj_nb,nhori,7,1,7,nvertisccp, 32, &
141  "ave(X)", zout,zstoday)
142  enddo
143  endif
144  if (cfg%Lboxtauisccp) then
145  CALL histdef(nid_day_cosp, "boxtauisccp", &
146  "Optical Depth in Each Column as Calculated by the ISCCP Simulator","1", &
147  iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
148  "ave(X)", zout,zstoday)
149  endif
150  if (cfg%Lboxptopisccp) then
151  CALL histdef(nid_day_cosp, "boxptopisccp", &
152  "Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator","Pa", &
153  iim,jj_nb,nhori,Ncolumns,1,Ncolumns,nvertcol, 32, &
154  "ave(X)", zout,zstoday)
155  endif
156  if (cfg%Ltclisccp) then
157  CALL histdef(nid_day_cosp, "tclisccp", &
158  "Total Cloud Fraction as Calculated by the ISCCP Simulator", "1", &
159  iim, jj_nb,nhori,1,1,1,-99,32, &
160  "ave(X)", zout,zstoday)
161  endif
162  if (cfg%Lctpisccp) then
163  CALL histdef(nid_day_cosp, "ctpisccp", &
164  "Mean Cloud Top Pressure as Calculated by the ISCCP Simulator", "Pa", &
165  iim, jj_nb,nhori,1,1,1,-99,32, &
166  "ave(X)", zout,zstoday)
167  endif
168  if (cfg%Ltauisccp) then
169  CALL histdef(nid_day_cosp, "tauisccp", &
170  "Optical Depth 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%Lalbisccp) then
175  CALL histdef(nid_day_cosp, "albisccp", &
176  "Mean Cloud Albedo as Calculated by the ISCCP Simulator", "1", &
177  iim, jj_nb,nhori,1,1,1,-99,32, &
178  "ave(X)", zout,zstoday)
179  endif
180  if (cfg%Lmeantbisccp) then
181  CALL histdef(nid_day_cosp, "meantbisccp", &
182  " Mean all-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
183  iim, jj_nb,nhori,1,1,1,-99,32, &
184  "ave(X)", zout,zstoday)
185  endif
186  if (cfg%Lmeantbclrisccp) then
187  CALL histdef(nid_day_cosp, "meantbclrisccp", &
188  "Mean clear-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator","K", &
189  iim, jj_nb,nhori,1,1,1,-99,32, &
190  "ave(X)", zout,zstoday)
191  endif
192  endif ! Isccp
193 
194 
195  CALL histend(nid_day_cosp)
196 !$OMP END MASTER
197 !$OMP BARRIER