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