1 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
2 | ! Copyright (c) 2015, Regents of the University of Colorado |
---|
3 | ! All rights reserved. |
---|
4 | ! |
---|
5 | ! Redistribution and use in source and binary forms, with or without modification, are |
---|
6 | ! permitted provided that the following conditions are met: |
---|
7 | ! |
---|
8 | ! 1. Redistributions of source code must retain the above copyright notice, this list of |
---|
9 | ! conditions and the following disclaimer. |
---|
10 | ! |
---|
11 | ! 2. Redistributions in binary form must reproduce the above copyright notice, this list |
---|
12 | ! of conditions and the following disclaimer in the documentation and/or other |
---|
13 | ! materials provided with the distribution. |
---|
14 | ! |
---|
15 | ! 3. Neither the name of the copyright holder nor the names of its contributors may be |
---|
16 | ! used to endorse or promote products derived from this software without specific prior |
---|
17 | ! written permission. |
---|
18 | ! |
---|
19 | ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
---|
20 | ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
---|
21 | ! MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
---|
22 | ! THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
---|
23 | ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
---|
24 | ! OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
25 | ! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
26 | ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
---|
27 | ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
28 | ! |
---|
29 | ! History: |
---|
30 | ! May 2015- D. Swales - Original version |
---|
31 | ! |
---|
32 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
33 | |
---|
34 | |
---|
35 | MODULE MOD_COSP |
---|
36 | USE COSP_KINDS, ONLY: wp |
---|
37 | USE MOD_COSP_CONFIG, ONLY: R_UNDEF,PARASOL_NREFL,LIDAR_NCAT,SR_BINS, & |
---|
38 | N_HYDRO,RTTOV_MAX_CHANNELS,numMISRHgtBins, & |
---|
39 | DBZE_BINS,LIDAR_NTEMP,calipso_histBsct, & |
---|
40 | use_vgrid,Nlvgrid,vgrid_zu,vgrid_zl,vgrid_z, & |
---|
41 | numMODISTauBins,numMODISPresBins, & |
---|
42 | numMODISReffIceBins,numMODISReffLiqBins, & |
---|
43 | numISCCPTauBins,numISCCPPresBins,numMISRTauBins,& |
---|
44 | ntau,modis_histTau,tau_binBounds, & |
---|
45 | modis_histTauEdges,tau_binEdges, & |
---|
46 | modis_histTauCenters,tau_binCenters |
---|
47 | USE MOD_COSP_MODIS_INTERFACE, ONLY: cosp_modis_init, modis_IN |
---|
48 | ! USE MOD_COSP_RTTOV_INTERFACE, ONLY: cosp_rttov_init, rttov_IN |
---|
49 | USE MOD_COSP_MISR_INTERFACE, ONLY: cosp_misr_init, misr_IN |
---|
50 | USE MOD_COSP_ISCCP_INTERFACE, ONLY: cosp_isccp_init, isccp_IN |
---|
51 | USE MOD_COSP_CALIPSO_INTERFACE, ONLY: cosp_calipso_init, calipso_IN |
---|
52 | USE MOD_COSP_PARASOL_INTERFACE, ONLY: cosp_parasol_init, parasol_in |
---|
53 | USE MOD_COSP_CLOUDSAT_INTERFACE, ONLY: cosp_cloudsat_init, cloudsat_IN |
---|
54 | USE quickbeam, ONLY: quickbeam_subcolumn, quickbeam_column, radar_cfg |
---|
55 | USE MOD_ICARUS, ONLY: icarus_subcolumn, icarus_column |
---|
56 | USE MOD_MISR_SIMULATOR, ONLY: misr_subcolumn, misr_column |
---|
57 | USE MOD_LIDAR_SIMULATOR, ONLY: lidar_subcolumn, lidar_column |
---|
58 | USE MOD_MODIS_SIM, ONLY: modis_subcolumn, modis_column |
---|
59 | USE MOD_PARASOL, ONLY: parasol_subcolumn, parasol_column |
---|
60 | ! use mod_cosp_rttov, ONLY: rttov_column |
---|
61 | USE MOD_COSP_STATS, ONLY: COSP_LIDAR_ONLY_CLOUD,COSP_CHANGE_VERTICAL_GRID |
---|
62 | |
---|
63 | IMPLICIT NONE |
---|
64 | |
---|
65 | logical :: linitialization ! Initialization flag |
---|
66 | |
---|
67 | ! ###################################################################################### |
---|
68 | ! TYPE cosp_column_inputs |
---|
69 | ! ###################################################################################### |
---|
70 | type cosp_column_inputs |
---|
71 | integer :: & |
---|
72 | Npoints, & ! Number of gridpoints. |
---|
73 | Ncolumns, & ! Number of columns. |
---|
74 | Nlevels ! Number of levels. |
---|
75 | |
---|
76 | integer,allocatable,dimension(:) :: & |
---|
77 | sunlit ! Sunlit flag (0-1) |
---|
78 | |
---|
79 | real(wp),allocatable,dimension(:,:) :: & |
---|
80 | at, & ! Temperature (K) |
---|
81 | pfull, & ! Pressure (Pa) |
---|
82 | phalf, & ! Pressure at half-levels (Pa) |
---|
83 | qv, & ! Specific humidity (kg/kg) |
---|
84 | hgt_matrix, & ! Height of hydrometeors (km) |
---|
85 | hgt_matrix_half ! Height of hydrometeors at half levels (km) |
---|
86 | |
---|
87 | real(wp),allocatable,dimension(:) :: & |
---|
88 | land, & ! Land/Sea mask (0-1) |
---|
89 | skt ! Surface temperature (K) |
---|
90 | ! Fields used ONLY by RTTOV |
---|
91 | integer :: & |
---|
92 | month ! Month for surface emissivty atlas (1-12) |
---|
93 | real(wp) :: & |
---|
94 | zenang, & ! Satellite zenith angle for RTTOV (deg) |
---|
95 | co2, & ! CO2 (kg/kg) |
---|
96 | ch4, & ! Methane (kg/kg) |
---|
97 | n2o, & ! N2O (kg/kg) |
---|
98 | co ! CO (kg/kg) |
---|
99 | real(wp),allocatable,dimension(:) :: & |
---|
100 | emis_sfc, & ! Surface emissivity (1) |
---|
101 | u_sfc, & ! Surface u-wind (m/s) |
---|
102 | v_sfc, & ! Surface v-wind (m/s) |
---|
103 | seaice, & ! Sea-ice fraction (0-1) |
---|
104 | lat, & ! Latitude (deg) |
---|
105 | lon ! Longitude (deg) |
---|
106 | real(wp),allocatable,dimension(:,:) :: & |
---|
107 | o3, & ! Ozone (kg/kg) |
---|
108 | tca, & ! Total column cloud fraction (0-1) |
---|
109 | cloudIce, & ! Cloud ice water mixing ratio (kg/kg) |
---|
110 | cloudLiq, & ! Cloud liquid water mixing ratio (kg/kg) |
---|
111 | fl_rain, & ! Precipitation (rain) flux (kg/m2/s) |
---|
112 | fl_snow ! Precipitation (snow) flux (kg/m2/s) |
---|
113 | end type cosp_column_inputs |
---|
114 | |
---|
115 | ! ###################################################################################### |
---|
116 | ! TYPE cosp_optical_inputs |
---|
117 | ! ###################################################################################### |
---|
118 | type cosp_optical_inputs |
---|
119 | integer :: & |
---|
120 | Npoints, & ! Number of gridpoints. |
---|
121 | Ncolumns, & ! Number of columns. |
---|
122 | Nlevels, & ! Number of levels. |
---|
123 | Npart, & ! Number of cloud meteors for LIDAR simulator. |
---|
124 | Nrefl ! Number of reflectances for PARASOL simulator |
---|
125 | real(wp) :: & |
---|
126 | emsfc_lw ! 11 micron surface emissivity |
---|
127 | real(wp),allocatable,dimension(:,:,:) :: & |
---|
128 | frac_out, & ! Cloud fraction |
---|
129 | tau_067, & ! Optical depth |
---|
130 | fracLiq, & ! Cloud fraction |
---|
131 | emiss_11, & ! Emissivity |
---|
132 | asym, & ! Assymetry parameter |
---|
133 | ss_alb, & ! Single-scattering albedo |
---|
134 | betatot, & ! Backscatter coefficient for polarized optics (total) |
---|
135 | betatot_ice, & ! Backscatter coefficient for polarized optics (ice) |
---|
136 | betatot_liq, & ! Backscatter coefficient for polarized optics (liquid) |
---|
137 | tautot, & ! Optical thickess integrated from top (total) |
---|
138 | tautot_ice, & ! Optical thickess integrated from top (ice) |
---|
139 | tautot_liq, & ! Optical thickess integrated from top (liquid) |
---|
140 | z_vol_cloudsat, & ! Effective reflectivity factor (mm^6/m^3) |
---|
141 | kr_vol_cloudsat, & ! Attenuation coefficient hydro (dB/km) |
---|
142 | g_vol_cloudsat ! Attenuation coefficient gases (dB/km) |
---|
143 | real(wp),allocatable,dimension(:,:) :: & |
---|
144 | beta_mol, & ! Molecular backscatter coefficient |
---|
145 | tau_mol, & ! Molecular optical depth |
---|
146 | tautot_S_liq, & ! Liquid water optical thickness, from TOA to SFC |
---|
147 | tautot_S_ice ! Ice water optical thickness, from TOA to SFC |
---|
148 | type(radar_cfg) :: & |
---|
149 | rcfg_cloudsat ! Radar comfiguration information (CLOUDSAT) |
---|
150 | end type cosp_optical_inputs |
---|
151 | |
---|
152 | ! ###################################################################################### |
---|
153 | ! TYPE cosp_outputs |
---|
154 | ! ###################################################################################### |
---|
155 | type cosp_outputs |
---|
156 | |
---|
157 | ! CALIPSO outputs |
---|
158 | real(wp),dimension(:,:,:),pointer :: & |
---|
159 | calipso_betaperp_tot => null(), & ! Total backscattered signal |
---|
160 | calipso_beta_tot => null(), & ! Total backscattered signal |
---|
161 | calipso_tau_tot => null(), & ! Optical thickness integrated from top to level z |
---|
162 | calipso_lidarcldphase => null(), & ! 3D "lidar" phase cloud fraction |
---|
163 | calipso_cldlayerphase => null(), & ! low, mid, high-level lidar phase cloud cover |
---|
164 | calipso_lidarcldtmp => null(), & ! 3D "lidar" phase cloud temperature |
---|
165 | calipso_cfad_sr => null() ! CFAD of scattering ratio |
---|
166 | real(wp), dimension(:,:),pointer :: & |
---|
167 | calipso_lidarcld => null(), & ! 3D "lidar" cloud fraction |
---|
168 | calipso_cldlayer => null(), & ! low, mid, high-level, total lidar cloud cover |
---|
169 | calipso_beta_mol => null(), & ! Molecular backscatter |
---|
170 | calipso_temp_tot => null() |
---|
171 | real(wp), dimension(:),pointer :: & |
---|
172 | calipso_srbval => null() ! SR bins in cfad_sr |
---|
173 | |
---|
174 | ! PARASOL outputs |
---|
175 | real(wp),dimension(:,:,:),pointer :: & |
---|
176 | parasolPix_refl => null() ! PARASOL reflectances (subcolumn) |
---|
177 | real(wp),dimension(:,:),pointer :: & |
---|
178 | parasolGrid_refl => null() ! PARASOOL reflectances (column) |
---|
179 | |
---|
180 | ! CLOUDSAT outputs |
---|
181 | real(wp),dimension(:,:,:),pointer :: & |
---|
182 | cloudsat_Ze_tot => null(), & ! Effective reflectivity factor (Npoints,Ncolumns,Nlevels) |
---|
183 | cloudsat_cfad_ze => null() ! Ze CFAD(Npoints,dBZe_bins,Nlevels) |
---|
184 | real(wp), dimension(:,:),pointer :: & |
---|
185 | lidar_only_freq_cloud => null() ! (Npoints,Nlevels) |
---|
186 | real(wp),dimension(:),pointer :: & |
---|
187 | radar_lidar_tcc => null() ! Radar&lidar total cloud amount, grid-box scale (Npoints) |
---|
188 | |
---|
189 | ! ISCCP outputs |
---|
190 | real(wp),dimension(:),pointer :: & |
---|
191 | isccp_totalcldarea => null(), & ! The fraction of model grid box columns with cloud |
---|
192 | ! somewhere in them. (%) |
---|
193 | isccp_meantb => null(), & ! Mean all-sky 10.5 micron brightness temperature. (K) |
---|
194 | isccp_meantbclr => null(), & ! Mean clear-sky 10.5 micron brightness temperature. (K) |
---|
195 | isccp_meanptop => null(), & ! Mean cloud top pressure (mb). |
---|
196 | isccp_meantaucld => null(), & ! Mean optical thickness. (1) |
---|
197 | isccp_meanalbedocld => null() ! Mean cloud albedo. (1) |
---|
198 | real(wp),dimension(:,:),pointer ::& |
---|
199 | isccp_boxtau => null(), & ! Optical thickness in each column. (1) |
---|
200 | isccp_boxptop => null() ! Cloud top pressure in each column. (mb) |
---|
201 | real(wp),dimension(:,:,:),pointer :: & |
---|
202 | isccp_fq => null() ! The fraction of the model grid box covered by each of |
---|
203 | ! the 49 ISCCP D level cloud types. (%) |
---|
204 | |
---|
205 | ! MISR outptus |
---|
206 | real(wp),dimension(:,:,:),pointer :: & ! |
---|
207 | misr_fq => null() ! Fraction of the model grid box covered by each of the MISR |
---|
208 | ! cloud types |
---|
209 | real(wp),dimension(:,:),pointer :: & ! |
---|
210 | misr_dist_model_layertops => null() ! |
---|
211 | real(wp),dimension(:),pointer :: & ! |
---|
212 | misr_meanztop => null(), & ! Mean MISR cloud top height |
---|
213 | misr_cldarea => null() ! Mean MISR cloud cover area |
---|
214 | |
---|
215 | ! MODIS outptus |
---|
216 | real(wp),pointer,dimension(:) :: & ! |
---|
217 | modis_Cloud_Fraction_Total_Mean => null(), & ! L3 MODIS retrieved cloud fraction (total) |
---|
218 | modis_Cloud_Fraction_Water_Mean => null(), & ! L3 MODIS retrieved cloud fraction (liq) |
---|
219 | modis_Cloud_Fraction_Ice_Mean => null(), & ! L3 MODIS retrieved cloud fraction (ice) |
---|
220 | modis_Cloud_Fraction_High_Mean => null(), & ! L3 MODIS retrieved cloud fraction (high) |
---|
221 | modis_Cloud_Fraction_Mid_Mean => null(), & ! L3 MODIS retrieved cloud fraction (middle) |
---|
222 | modis_Cloud_Fraction_Low_Mean => null(), & ! L3 MODIS retrieved cloud fraction (low ) |
---|
223 | modis_Optical_Thickness_Total_Mean => null(), & ! L3 MODIS retrieved optical thickness (tot) |
---|
224 | modis_Optical_Thickness_Water_Mean => null(), & ! L3 MODIS retrieved optical thickness (liq) |
---|
225 | modis_Optical_Thickness_Ice_Mean => null(), & ! L3 MODIS retrieved optical thickness (ice) |
---|
226 | modis_Optical_Thickness_Total_LogMean => null(), & ! L3 MODIS retrieved log10 optical thickness |
---|
227 | modis_Optical_Thickness_Water_LogMean => null(), & ! L3 MODIS retrieved log10 optical thickness |
---|
228 | modis_Optical_Thickness_Ice_LogMean => null(), & ! L3 MODIS retrieved log10 optical thickness |
---|
229 | modis_Cloud_Particle_Size_Water_Mean => null(), & ! L3 MODIS retrieved particle size (liquid) |
---|
230 | modis_Cloud_Particle_Size_Ice_Mean => null(), & ! L3 MODIS retrieved particle size (ice) |
---|
231 | modis_Cloud_Top_Pressure_Total_Mean => null(), & ! L3 MODIS retrieved cloud top pressure |
---|
232 | modis_Liquid_Water_Path_Mean => null(), & ! L3 MODIS retrieved liquid water path |
---|
233 | modis_Ice_Water_Path_Mean => null() ! L3 MODIS retrieved ice water path |
---|
234 | real(wp),pointer,dimension(:,:,:) :: & |
---|
235 | modis_Optical_Thickness_vs_Cloud_Top_Pressure => null(), & ! Tau/Pressure joint histogram |
---|
236 | modis_Optical_Thickness_vs_ReffICE => null(), & ! Tau/ReffICE joint histogram |
---|
237 | modis_Optical_Thickness_vs_ReffLIQ => null() ! Tau/ReffLIQ joint histogram |
---|
238 | |
---|
239 | ! RTTOV outputs |
---|
240 | real(wp),pointer :: & |
---|
241 | rttov_tbs(:,:) => null() ! Brightness Temperature |
---|
242 | |
---|
243 | end type cosp_outputs |
---|
244 | |
---|
245 | CONTAINS |
---|
246 | ! ###################################################################################### |
---|
247 | ! FUNCTION cosp_simulator |
---|
248 | ! ###################################################################################### |
---|
249 | function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) |
---|
250 | type(cosp_optical_inputs),intent(in),target :: cospIN ! Optical inputs to COSP simulator |
---|
251 | type(cosp_column_inputs), intent(in),target :: cospgridIN ! Host model inputs to COSP |
---|
252 | |
---|
253 | ! Inputs into the simulators |
---|
254 | type(isccp_IN) :: isccpIN ! Input to the ISCCP simulator |
---|
255 | type(misr_IN) :: misrIN ! Input to the LIDAR simulator |
---|
256 | type(calipso_IN) :: calipsoIN ! Input to the LIDAR simulator |
---|
257 | type(parasol_IN) :: parasolIN ! Input to the PARASOL simulator |
---|
258 | type(cloudsat_IN) :: cloudsatIN ! Input to the CLOUDSAT radar simulator |
---|
259 | type(modis_IN) :: modisIN ! Input to the MODIS simulator |
---|
260 | ! type(rttov_IN) :: rttovIN ! Input to the RTTOV simulator |
---|
261 | integer,optional :: start_idx,stop_idx |
---|
262 | logical,optional :: debug |
---|
263 | |
---|
264 | ! Outputs from the simulators (nested simulator output structure) |
---|
265 | type(cosp_outputs), intent(inout) :: cospOUT |
---|
266 | character(len=256),dimension(100) :: cosp_simulator |
---|
267 | |
---|
268 | ! Local variables |
---|
269 | integer :: & |
---|
270 | i,icol,ij,ik,nError |
---|
271 | integer,target :: & |
---|
272 | Npoints |
---|
273 | logical :: & |
---|
274 | Lisccp_subcolumn, & ! On/Off switch for subcolumn ISCCP simulator |
---|
275 | Lmisr_subcolumn, & ! On/Off switch for subcolumn MISR simulator |
---|
276 | Lcalipso_subcolumn, & ! On/Off switch for subcolumn CALIPSO simulator |
---|
277 | Lparasol_subcolumn, & ! On/Off switch for subcolumn PARASOL simulator |
---|
278 | Lcloudsat_subcolumn, & ! On/Off switch for subcolumn CLOUDSAT simulator |
---|
279 | Lmodis_subcolumn, & ! On/Off switch for subcolumn MODIS simulator |
---|
280 | Lrttov_subcolumn, & ! On/Off switch for subcolumn RTTOV simulator |
---|
281 | Lisccp_column, & ! On/Off switch for column ISCCP simulator |
---|
282 | Lmisr_column, & ! On/Off switch for column MISR simulator |
---|
283 | Lcalipso_column, & ! On/Off switch for column CALIPSO simulator |
---|
284 | Lparasol_column, & ! On/Off switch for column PARASOL simulator |
---|
285 | Lcloudsat_column, & ! On/Off switch for column CLOUDSAT simulator |
---|
286 | Lmodis_column, & ! On/Off switch for column MODIS simulator |
---|
287 | Lrttov_column, & ! On/Off switch for column RTTOV simulator (not used) |
---|
288 | Lradar_lidar_tcc, & ! On/Off switch from joint Calipso/Cloudsat product |
---|
289 | Llidar_only_freq_cloud ! On/Off switch from joint Calipso/Cloudsat product |
---|
290 | logical :: & |
---|
291 | ok_lidar_cfad = .false., & |
---|
292 | lrttov_cleanUp = .false. |
---|
293 | |
---|
294 | integer, dimension(:,:),allocatable :: & |
---|
295 | modisRetrievedPhase,isccpLEVMATCH |
---|
296 | real(wp), dimension(:), allocatable :: & |
---|
297 | modisCfTotal,modisCfLiquid,modisMeanIceWaterPath, isccp_meantbclr, & |
---|
298 | modisCfIce, modisCfHigh, modisCfMid, modisCfLow,modisMeanTauTotal, & |
---|
299 | modisMeanTauLiquid, modisMeanTauIce, modisMeanLogTauTotal, & |
---|
300 | modisMeanLogTauLiquid, modisMeanLogTauIce, modisMeanSizeLiquid, & |
---|
301 | modisMeanSizeIce, modisMeanCloudTopPressure, modisMeanLiquidWaterPath, & |
---|
302 | radar_lidar_tcc |
---|
303 | REAL(WP), dimension(:,:),allocatable :: & |
---|
304 | modisRetrievedCloudTopPressure,modisRetrievedTau,modisRetrievedSize, & |
---|
305 | misr_boxtau,misr_boxztop,misr_dist_model_layertops,isccp_boxtau, & |
---|
306 | isccp_boxttop,isccp_boxptop,calipso_beta_mol,lidar_only_freq_cloud |
---|
307 | REAL(WP), dimension(:,:,:),allocatable :: & |
---|
308 | modisJointHistogram,modisJointHistogramIce,modisJointHistogramLiq, & |
---|
309 | calipso_beta_tot,calipso_betaperp_tot, cloudsatDBZe,parasolPix_refl |
---|
310 | real(wp),dimension(:),allocatable,target :: & |
---|
311 | out1D_1,out1D_2,out1D_3,out1D_4,out1D_5,out1D_6 |
---|
312 | real(wp),dimension(:,:,:),allocatable :: & |
---|
313 | betamol_in,betamolFlip,pnormFlip,ze_totFlip |
---|
314 | |
---|
315 | ! Initialize error reporting for output |
---|
316 | cosp_simulator(:)='' |
---|
317 | |
---|
318 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
319 | ! 1) Determine if using full inputs or subset |
---|
320 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
321 | if (present(start_idx) .and. present(stop_idx)) then |
---|
322 | ij=start_idx |
---|
323 | ik=stop_idx |
---|
324 | else |
---|
325 | ij=1 |
---|
326 | ik=cospIN%Npoints |
---|
327 | endif |
---|
328 | Npoints = ik-ij+1 |
---|
329 | |
---|
330 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
331 | ! 2a) Determine which simulators to run and which statistics to compute |
---|
332 | ! - If any of the subcolumn fields are allocated, then run the subcolumn simulators. |
---|
333 | ! - If any of the column fields are allocated, then compute the statistics for that |
---|
334 | ! simulator, but only save the requested fields. |
---|
335 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
336 | ! Start with all simulators and joint-diagnostics off |
---|
337 | Lisccp_subcolumn = .false. |
---|
338 | Lmisr_subcolumn = .false. |
---|
339 | Lcalipso_subcolumn = .false. |
---|
340 | Lparasol_subcolumn = .false. |
---|
341 | Lcloudsat_subcolumn = .false. |
---|
342 | Lmodis_subcolumn = .false. |
---|
343 | Lrttov_subcolumn = .false. |
---|
344 | Lisccp_column = .false. |
---|
345 | Lmisr_column = .false. |
---|
346 | Lcalipso_column = .false. |
---|
347 | Lparasol_column = .false. |
---|
348 | Lcloudsat_column = .false. |
---|
349 | Lmodis_column = .false. |
---|
350 | Lrttov_column = .false. |
---|
351 | Lradar_lidar_tcc = .false. |
---|
352 | Llidar_only_freq_cloud = .false. |
---|
353 | |
---|
354 | ! CLOUDSAT subcolumn |
---|
355 | if (associated(cospOUT%cloudsat_Ze_tot)) Lcloudsat_subcolumn = .true. |
---|
356 | |
---|
357 | ! MODIS subcolumn |
---|
358 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean) .or. & |
---|
359 | associated(cospOUT%modis_Cloud_Fraction_Total_Mean) .or. & |
---|
360 | associated(cospOUT%modis_Cloud_Fraction_Ice_Mean) .or. & |
---|
361 | associated(cospOUT%modis_Cloud_Fraction_High_Mean) .or. & |
---|
362 | associated(cospOUT%modis_Cloud_Fraction_Mid_Mean) .or. & |
---|
363 | associated(cospOUT%modis_Cloud_Fraction_Low_Mean) .or. & |
---|
364 | associated(cospOUT%modis_Optical_Thickness_Total_Mean) .or. & |
---|
365 | associated(cospOUT%modis_Optical_Thickness_Water_Mean) .or. & |
---|
366 | associated(cospOUT%modis_Optical_Thickness_Ice_Mean) .or. & |
---|
367 | associated(cospOUT%modis_Optical_Thickness_Total_LogMean) .or. & |
---|
368 | associated(cospOUT%modis_Optical_Thickness_Water_LogMean) .or. & |
---|
369 | associated(cospOUT%modis_Optical_Thickness_Ice_LogMean) .or. & |
---|
370 | associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean) .or. & |
---|
371 | associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean) .or. & |
---|
372 | associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean) .or. & |
---|
373 | associated(cospOUT%modis_Liquid_Water_Path_Mean) .or. & |
---|
374 | associated(cospOUT%modis_Ice_Water_Path_Mean) .or. & |
---|
375 | associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
376 | Lmodis_subcolumn = .true. |
---|
377 | |
---|
378 | ! ISCCP subcolumn |
---|
379 | if (associated(cospOUT%isccp_boxtau) .or. & |
---|
380 | associated(cospOUT%isccp_boxptop)) & |
---|
381 | Lisccp_subcolumn = .true. |
---|
382 | |
---|
383 | ! MISR subcolumn |
---|
384 | if (associated(cospOUT%misr_dist_model_layertops)) & |
---|
385 | Lmisr_subcolumn = .true. |
---|
386 | |
---|
387 | ! CALIPOSO subcolumn |
---|
388 | if (associated(cospOUT%calipso_tau_tot) .or. & |
---|
389 | associated(cospOUT%calipso_beta_mol) .or. & |
---|
390 | associated(cospOUT%calipso_temp_tot) .or. & |
---|
391 | associated(cospOUT%calipso_betaperp_tot) .or. & |
---|
392 | associated(cospOUT%calipso_beta_tot)) & |
---|
393 | Lcalipso_subcolumn = .true. |
---|
394 | |
---|
395 | ! PARASOL subcolumn |
---|
396 | if (associated(cospOUT%parasolPix_refl)) & |
---|
397 | Lparasol_subcolumn = .true. |
---|
398 | |
---|
399 | ! RTTOV column |
---|
400 | if (associated(cospOUT%rttov_tbs)) & |
---|
401 | Lrttov_column = .true. |
---|
402 | |
---|
403 | ! Set flag to deallocate rttov types (only done on final call to simulator) |
---|
404 | if (size(cospOUT%isccp_meantb) .eq. stop_idx) lrttov_cleanUp = .true. |
---|
405 | |
---|
406 | ! ISCCP column |
---|
407 | if (associated(cospOUT%isccp_fq) .or. & |
---|
408 | associated(cospOUT%isccp_meanalbedocld) .or. & |
---|
409 | associated(cospOUT%isccp_meanptop) .or. & |
---|
410 | associated(cospOUT%isccp_meantaucld) .or. & |
---|
411 | associated(cospOUT%isccp_totalcldarea) .or. & |
---|
412 | associated(cospOUT%isccp_meantb)) then |
---|
413 | Lisccp_column = .true. |
---|
414 | Lisccp_subcolumn = .true. |
---|
415 | endif |
---|
416 | |
---|
417 | ! MISR column |
---|
418 | if (associated(cospOUT%misr_cldarea) .or. & |
---|
419 | associated(cospOUT%misr_meanztop) .or. & |
---|
420 | associated(cospOUT%misr_fq)) then |
---|
421 | Lmisr_column = .true. |
---|
422 | Lmisr_subcolumn = .true. |
---|
423 | endif |
---|
424 | |
---|
425 | ! CALIPSO column |
---|
426 | if (associated(cospOUT%calipso_cfad_sr) .or. & |
---|
427 | associated(cospOUT%calipso_lidarcld) .or. & |
---|
428 | associated(cospOUT%calipso_lidarcldphase) .or. & |
---|
429 | associated(cospOUT%calipso_cldlayer) .or. & |
---|
430 | associated(cospOUT%calipso_cldlayerphase) .or. & |
---|
431 | associated(cospOUT%calipso_lidarcldtmp)) then |
---|
432 | Lcalipso_column = .true. |
---|
433 | Lcalipso_subcolumn = .true. |
---|
434 | endif |
---|
435 | |
---|
436 | ! PARASOL column |
---|
437 | if (associated(cospOUT%parasolGrid_refl)) then |
---|
438 | Lparasol_column = .true. |
---|
439 | Lparasol_subcolumn = .true. |
---|
440 | endif |
---|
441 | |
---|
442 | ! CLOUDSAT column |
---|
443 | if (associated(cospOUT%cloudsat_cfad_ze)) then |
---|
444 | Lcloudsat_column = .true. |
---|
445 | Lcloudsat_subcolumn = .true. |
---|
446 | endif |
---|
447 | |
---|
448 | ! MODIS column |
---|
449 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean) .or. & |
---|
450 | associated(cospOUT%modis_Cloud_Fraction_Water_Mean) .or. & |
---|
451 | associated(cospOUT%modis_Cloud_Fraction_Ice_Mean) .or. & |
---|
452 | associated(cospOUT%modis_Cloud_Fraction_High_Mean) .or. & |
---|
453 | associated(cospOUT%modis_Cloud_Fraction_Mid_Mean) .or. & |
---|
454 | associated(cospOUT%modis_Cloud_Fraction_Low_Mean) .or. & |
---|
455 | associated(cospOUT%modis_Optical_Thickness_Total_Mean) .or. & |
---|
456 | associated(cospOUT%modis_Optical_Thickness_Water_Mean) .or. & |
---|
457 | associated(cospOUT%modis_Optical_Thickness_Ice_Mean) .or. & |
---|
458 | associated(cospOUT%modis_Optical_Thickness_Total_LogMean) .or. & |
---|
459 | associated(cospOUT%modis_Optical_Thickness_Water_LogMean) .or. & |
---|
460 | associated(cospOUT%modis_Optical_Thickness_Ice_LogMean) .or. & |
---|
461 | associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean) .or. & |
---|
462 | associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean) .or. & |
---|
463 | associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean) .or. & |
---|
464 | associated(cospOUT%modis_Liquid_Water_Path_Mean) .or. & |
---|
465 | associated(cospOUT%modis_Ice_Water_Path_Mean) .or. & |
---|
466 | associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) then |
---|
467 | Lmodis_column = .true. |
---|
468 | Lmodis_subcolumn = .true. |
---|
469 | endif |
---|
470 | |
---|
471 | ! Joint simulator products |
---|
472 | if (associated(cospOUT%lidar_only_freq_cloud) .or. associated(cospOUT%radar_lidar_tcc)) then |
---|
473 | Lcalipso_column = .true. |
---|
474 | Lcalipso_subcolumn = .true. |
---|
475 | Lcloudsat_column = .true. |
---|
476 | Lcloudsat_subcolumn = .true. |
---|
477 | Lradar_lidar_tcc = .true. |
---|
478 | Llidar_only_freq_cloud = .true. |
---|
479 | endif |
---|
480 | |
---|
481 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
482 | ! 2b) Error Checking |
---|
483 | ! Enforce bounds on input fields. If input field is out-of-bounds, report error |
---|
484 | ! and turn off simulator |
---|
485 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
486 | call cosp_errorCheck(cospgridIN,cospIN,Lisccp_subcolumn,Lisccp_column, & |
---|
487 | Lmisr_subcolumn,Lmisr_column,Lmodis_subcolumn,Lmodis_column, & |
---|
488 | Lcloudsat_subcolumn,Lcloudsat_column,Lcalipso_subcolumn, & |
---|
489 | Lcalipso_column,Lrttov_subcolumn,Lrttov_column, & |
---|
490 | Lparasol_subcolumn,Lparasol_column,Lradar_lidar_tcc, & |
---|
491 | Llidar_only_freq_cloud,cospOUT,cosp_simulator,nError) |
---|
492 | |
---|
493 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
494 | ! 3) Populate instrument simulator inputs |
---|
495 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
496 | if (Lisccp_subcolumn .or. Lmodis_subcolumn) then |
---|
497 | isccpIN%Npoints => Npoints |
---|
498 | isccpIN%Ncolumns => cospIN%Ncolumns |
---|
499 | isccpIN%Nlevels => cospIN%Nlevels |
---|
500 | isccpIN%emsfc_lw => cospIN%emsfc_lw |
---|
501 | isccpIN%skt => cospgridIN%skt |
---|
502 | isccpIN%qv => cospgridIN%qv |
---|
503 | isccpIN%at => cospgridIN%at |
---|
504 | isccpIN%frac_out => cospIN%frac_out |
---|
505 | isccpIN%dtau => cospIN%tau_067 |
---|
506 | isccpIN%dem => cospIN%emiss_11 |
---|
507 | isccpIN%phalf => cospgridIN%phalf |
---|
508 | isccpIN%sunlit => cospgridIN%sunlit |
---|
509 | isccpIN%pfull => cospgridIN%pfull |
---|
510 | endif |
---|
511 | |
---|
512 | if (Lmisr_subcolumn) then |
---|
513 | misrIN%Npoints => Npoints |
---|
514 | misrIN%Ncolumns => cospIN%Ncolumns |
---|
515 | misrIN%Nlevels => cospIN%Nlevels |
---|
516 | misrIN%dtau => cospIN%tau_067 |
---|
517 | misrIN%sunlit => cospgridIN%sunlit |
---|
518 | misrIN%zfull => cospgridIN%hgt_matrix |
---|
519 | misrIN%at => cospgridIN%at |
---|
520 | endif |
---|
521 | |
---|
522 | if (Lcalipso_subcolumn) then |
---|
523 | calipsoIN%Npoints => Npoints |
---|
524 | calipsoIN%Ncolumns => cospIN%Ncolumns |
---|
525 | calipsoIN%Nlevels => cospIN%Nlevels |
---|
526 | calipsoIN%beta_mol => cospIN%beta_mol |
---|
527 | calipsoIN%betatot => cospIN%betatot |
---|
528 | calipsoIN%betatot_liq => cospIN%betatot_liq |
---|
529 | calipsoIN%betatot_ice => cospIN%betatot_ice |
---|
530 | calipsoIN%tau_mol => cospIN%tau_mol |
---|
531 | calipsoIN%tautot => cospIN%tautot |
---|
532 | calipsoIN%tautot_liq => cospIN%tautot_liq |
---|
533 | calipsoIN%tautot_ice => cospIN%tautot_ice |
---|
534 | endif |
---|
535 | |
---|
536 | if (Lparasol_subcolumn) then |
---|
537 | parasolIN%Npoints => Npoints |
---|
538 | parasolIN%Nlevels => cospIN%Nlevels |
---|
539 | parasolIN%Ncolumns => cospIN%Ncolumns |
---|
540 | parasolIN%Nrefl => cospIN%Nrefl |
---|
541 | parasolIN%tautot_S_liq => cospIN%tautot_S_liq |
---|
542 | parasolIN%tautot_S_ice => cospIN%tautot_S_ice |
---|
543 | endif |
---|
544 | |
---|
545 | if (Lcloudsat_subcolumn) then |
---|
546 | cloudsatIN%Npoints => Npoints |
---|
547 | cloudsatIN%Nlevels => cospIN%Nlevels |
---|
548 | cloudsatIN%Ncolumns => cospIN%Ncolumns |
---|
549 | cloudsatIN%z_vol => cospIN%z_vol_cloudsat |
---|
550 | cloudsatIN%kr_vol => cospIN%kr_vol_cloudsat |
---|
551 | cloudsatIN%g_vol => cospIN%g_vol_cloudsat |
---|
552 | cloudsatIN%rcfg => cospIN%rcfg_cloudsat |
---|
553 | cloudsatIN%hgt_matrix => cospgridIN%hgt_matrix |
---|
554 | endif |
---|
555 | |
---|
556 | if (Lmodis_subcolumn) then |
---|
557 | modisIN%Ncolumns => cospIN%Ncolumns |
---|
558 | modisIN%Nlevels => cospIN%Nlevels |
---|
559 | modisIN%Npoints => Npoints |
---|
560 | modisIN%liqFrac => cospIN%fracLiq |
---|
561 | modisIN%tau => cospIN%tau_067 |
---|
562 | modisIN%g => cospIN%asym |
---|
563 | modisIN%w0 => cospIN%ss_alb |
---|
564 | modisIN%Nsunlit = count(cospgridIN%sunlit > 0) |
---|
565 | if (modisIN%Nsunlit .gt. 0) then |
---|
566 | allocate(modisIN%sunlit(modisIN%Nsunlit),modisIN%pres(modisIN%Nsunlit,cospIN%Nlevels+1)) |
---|
567 | modisIN%sunlit = pack((/ (i, i = 1, Npoints ) /),mask = cospgridIN%sunlit > 0) |
---|
568 | modisIN%pres = cospgridIN%phalf(int(modisIN%sunlit(:)),:) |
---|
569 | endif |
---|
570 | if (count(cospgridIN%sunlit <= 0) .gt. 0) then |
---|
571 | allocate(modisIN%notSunlit(count(cospgridIN%sunlit <= 0))) |
---|
572 | modisIN%notSunlit = pack((/ (i, i = 1, Npoints ) /),mask = .not. cospgridIN%sunlit > 0) |
---|
573 | endif |
---|
574 | endif |
---|
575 | |
---|
576 | ! if (Lrttov_column) then |
---|
577 | ! rttovIN%nPoints => Npoints |
---|
578 | ! rttovIN%nLevels => cospIN%nLevels |
---|
579 | ! rttovIN%nSubCols => cospIN%nColumns |
---|
580 | ! rttovIN%zenang => cospgridIN%zenang |
---|
581 | ! rttovIN%co2 => cospgridIN%co2 |
---|
582 | ! rttovIN%ch4 => cospgridIN%ch4 |
---|
583 | ! rttovIN%n2o => cospgridIN%n2o |
---|
584 | ! rttovIN%co => cospgridIN%co |
---|
585 | ! rttovIN%surfem => cospgridIN%emis_sfc |
---|
586 | ! rttovIN%h_surf => cospgridIN%hgt_matrix_half(:,cospIN%Nlevels+1) |
---|
587 | ! rttovIN%u_surf => cospgridIN%u_sfc |
---|
588 | ! rttovIN%v_surf => cospgridIN%v_sfc |
---|
589 | ! rttovIN%t_skin => cospgridIN%skt |
---|
590 | ! rttovIN%p_surf => cospgridIN%phalf(:,cospIN%Nlevels+1) |
---|
591 | ! rttovIN%q2m => cospgridIN%qv(:,cospIN%Nlevels) |
---|
592 | ! rttovIN%t2m => cospgridIN%at(:,cospIN%Nlevels) |
---|
593 | ! rttovIN%lsmask => cospgridIN%land |
---|
594 | ! rttovIN%latitude => cospgridIN%lat |
---|
595 | ! rttovIN%longitude => cospgridIN%lon |
---|
596 | ! rttovIN%seaice => cospgridIN%seaice |
---|
597 | ! rttovIN%p => cospgridIN%pfull |
---|
598 | ! rttovIN%ph => cospgridIN%phalf |
---|
599 | ! rttovIN%t => cospgridIN%at |
---|
600 | ! rttovIN%q => cospgridIN%qv |
---|
601 | ! rttovIN%o3 => cospgridIN%o3 |
---|
602 | ! ! Below only needed for all-sky RTTOV calculation |
---|
603 | ! rttovIN%month => cospgridIN%month |
---|
604 | ! rttovIN%tca => cospgridIN%tca |
---|
605 | ! rttovIN%cldIce => cospgridIN%cloudIce |
---|
606 | ! rttovIN%cldLiq => cospgridIN%cloudLiq |
---|
607 | ! rttovIN%fl_rain => cospgridIN%fl_rain |
---|
608 | ! rttovIN%fl_snow => cospgridIN%fl_snow |
---|
609 | ! endif |
---|
610 | |
---|
611 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
612 | ! 4) Call subcolumn simulators |
---|
613 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
614 | |
---|
615 | ! ISCCP (icarus) subcolumn simulator |
---|
616 | if (Lisccp_subcolumn .or. Lmodis_subcolumn) then |
---|
617 | ! Allocate space for local variables |
---|
618 | allocate(isccpLEVMATCH(Npoints,isccpIN%Ncolumns), & |
---|
619 | isccp_boxttop(Npoints,isccpIN%Ncolumns), & |
---|
620 | isccp_boxptop(Npoints,isccpIN%Ncolumns), & |
---|
621 | isccp_boxtau(Npoints,isccpIN%Ncolumns), isccp_meantbclr(Npoints)) |
---|
622 | ! Call simulator |
---|
623 | call icarus_subcolumn(isccpIN%npoints,isccpIN%ncolumns,isccpIN%nlevels, & |
---|
624 | isccpIN%sunlit,isccpIN%dtau,isccpIN%dem,isccpIN%skt, & |
---|
625 | isccpIN%emsfc_lw,isccpIN%qv,isccpIN%at,isccpIN%pfull, & |
---|
626 | isccpIN%phalf,isccpIN%frac_out,isccpLEVMATCH, & |
---|
627 | isccp_boxtau(:,:),isccp_boxptop(:,:), & |
---|
628 | isccp_boxttop(:,:),isccp_meantbclr(:)) |
---|
629 | ! Store output (if requested) |
---|
630 | if (associated(cospOUT%isccp_boxtau)) then |
---|
631 | cospOUT%isccp_boxtau(ij:ik,:) = isccp_boxtau |
---|
632 | endif |
---|
633 | if (associated(cospOUT%isccp_boxptop)) then |
---|
634 | cospOUT%isccp_boxptop(ij:ik,:) = isccp_boxptop |
---|
635 | endif |
---|
636 | if (associated(cospOUT%isccp_meantbclr)) then |
---|
637 | cospOUT%isccp_meantbclr(ij:ik) = isccp_meantbclr |
---|
638 | endif |
---|
639 | endif |
---|
640 | |
---|
641 | ! MISR subcolumn simulator |
---|
642 | if (Lmisr_subcolumn) then |
---|
643 | ! Allocate space for local variables |
---|
644 | allocate(misr_boxztop(Npoints,misrIN%Ncolumns), & |
---|
645 | misr_boxtau(Npoints,misrIN%Ncolumns), & |
---|
646 | misr_dist_model_layertops(Npoints,numMISRHgtBins)) |
---|
647 | ! Call simulator |
---|
648 | call misr_subcolumn(misrIN%Npoints,misrIN%Ncolumns,misrIN%Nlevels,misrIN%dtau, & |
---|
649 | misrIN%zfull,misrIN%at,misrIN%sunlit,misr_boxtau, & |
---|
650 | misr_dist_model_layertops,misr_boxztop) |
---|
651 | ! Store output (if requested) |
---|
652 | if (associated(cospOUT%misr_dist_model_layertops)) then |
---|
653 | cospOUT%misr_dist_model_layertops(ij:ik,:) = misr_dist_model_layertops |
---|
654 | endif |
---|
655 | endif |
---|
656 | |
---|
657 | ! Calipso subcolumn simulator |
---|
658 | if (Lcalipso_subcolumn) then |
---|
659 | ! Allocate space for local variables |
---|
660 | allocate(calipso_beta_mol(calipsoIN%Npoints,calipsoIN%Nlevels), & |
---|
661 | calipso_beta_tot(calipsoIN%Npoints,calipsoIN%Ncolumns,calipsoIN%Nlevels),& |
---|
662 | calipso_betaperp_tot(calipsoIN%Npoints,calipsoIN%Ncolumns,calipsoIN%Nlevels)) |
---|
663 | ! Call simulator |
---|
664 | call lidar_subcolumn(calipsoIN%npoints,calipsoIN%ncolumns,calipsoIN%nlevels, & |
---|
665 | calipsoIN%beta_mol,calipsoIN%tau_mol, & |
---|
666 | calipsoIN%betatot,calipsoIN%tautot,calipsoIN%betatot_ice, & |
---|
667 | calipsoIN%tautot_ice,calipsoIN%betatot_liq, & |
---|
668 | calipsoIN%tautot_liq,calipso_beta_mol(:,:), & |
---|
669 | calipso_beta_tot(:,:,:),calipso_betaperp_tot(:,:,:)) |
---|
670 | ! Store output (if requested) |
---|
671 | if (associated(cospOUT%calipso_beta_mol)) & |
---|
672 | cospOUT%calipso_beta_mol(ij:ik,calipsoIN%Nlevels:1:-1) = calipso_beta_mol |
---|
673 | if (associated(cospOUT%calipso_beta_tot)) & |
---|
674 | cospOUT%calipso_beta_tot(ij:ik,:,calipsoIN%Nlevels:1:-1) = calipso_beta_tot |
---|
675 | if (associated(cospOUT%calipso_betaperp_tot)) & |
---|
676 | cospOUT%calipso_betaperp_tot(ij:ik,:,:) = calipso_betaperp_tot |
---|
677 | |
---|
678 | endif |
---|
679 | |
---|
680 | ! PARASOL subcolumn simulator |
---|
681 | if (Lparasol_subcolumn) then |
---|
682 | ! Allocate space for local variables |
---|
683 | allocate(parasolPix_refl(parasolIN%Npoints,parasolIN%Ncolumns,PARASOL_NREFL)) |
---|
684 | ! Call simulator |
---|
685 | do icol=1,parasolIN%Ncolumns |
---|
686 | call parasol_subcolumn(parasolIN%npoints, PARASOL_NREFL, & |
---|
687 | parasolIN%tautot_S_liq(1:parasolIN%Npoints,icol), & |
---|
688 | parasolIN%tautot_S_ice(1:parasolIN%Npoints,icol), & |
---|
689 | parasolPix_refl(:,icol,1:PARASOL_NREFL)) |
---|
690 | ! Store output (if requested) |
---|
691 | if (associated(cospOUT%parasolPix_refl)) then |
---|
692 | cospOUT%parasolPix_refl(ij:ik,icol,1:PARASOL_NREFL) = & |
---|
693 | parasolPix_refl(:,icol,1:PARASOL_NREFL) |
---|
694 | endif |
---|
695 | enddo |
---|
696 | endif |
---|
697 | |
---|
698 | ! Cloudsat (quickbeam) subcolumn simulator |
---|
699 | if (Lcloudsat_subcolumn) then |
---|
700 | ! Allocate space for local variables |
---|
701 | allocate(cloudsatDBZe(cloudsatIN%Npoints,cloudsatIN%Ncolumns,cloudsatIN%Nlevels)) |
---|
702 | do icol=1,cloudsatIN%ncolumns |
---|
703 | call quickbeam_subcolumn(cloudsatIN%rcfg,cloudsatIN%Npoints,cloudsatIN%Nlevels,& |
---|
704 | cloudsatIN%hgt_matrix/1000._wp, & |
---|
705 | cloudsatIN%z_vol(:,icol,:), & |
---|
706 | cloudsatIN%kr_vol(:,icol,:), & |
---|
707 | cloudsatIN%g_vol(:,1,:),cloudsatDBze(:,icol,:)) |
---|
708 | enddo |
---|
709 | ! Store output (if requested) |
---|
710 | if (associated(cospOUT%cloudsat_Ze_tot)) then |
---|
711 | cospOUT%cloudsat_Ze_tot(ij:ik,:,:) = cloudsatDBZe(:,:,cloudsatIN%Nlevels:1:-1) |
---|
712 | endif |
---|
713 | endif |
---|
714 | |
---|
715 | if (Lmodis_subcolumn) then |
---|
716 | if(modisiN%nSunlit > 0) then |
---|
717 | ! Allocate space for local variables |
---|
718 | allocate(modisRetrievedTau(modisIN%nSunlit,modisIN%nColumns), & |
---|
719 | modisRetrievedSize(modisIN%nSunlit,modisIN%nColumns), & |
---|
720 | modisRetrievedPhase(modisIN%nSunlit,modisIN%nColumns), & |
---|
721 | modisRetrievedCloudTopPressure(modisIN%nSunlit,modisIN%nColumns)) |
---|
722 | ! Call simulator |
---|
723 | do i = 1, modisIN%nSunlit |
---|
724 | call modis_subcolumn(modisIN%Ncolumns,modisIN%Nlevels,modisIN%pres(i,:), & |
---|
725 | modisIN%tau(int(modisIN%sunlit(i)),:,:), & |
---|
726 | modisIN%liqFrac(int(modisIN%sunlit(i)),:,:), & |
---|
727 | modisIN%g(int(modisIN%sunlit(i)),:,:), & |
---|
728 | modisIN%w0(int(modisIN%sunlit(i)),:,:), & |
---|
729 | isccp_boxptop(int(modisIN%sunlit(i)),:), & |
---|
730 | modisRetrievedPhase(i,:), & |
---|
731 | modisRetrievedCloudTopPressure(i,:), & |
---|
732 | modisRetrievedTau(i,:),modisRetrievedSize(i,:)) |
---|
733 | end do |
---|
734 | endif |
---|
735 | endif |
---|
736 | |
---|
737 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
738 | ! 5) Call column simulators |
---|
739 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
740 | |
---|
741 | ! ISCCP |
---|
742 | if (Lisccp_column) then |
---|
743 | ! Check to see which outputs are requested. If not requested, use a local dummy array |
---|
744 | if(.not. associated(cospOUT%isccp_meanalbedocld)) then |
---|
745 | allocate(out1D_1(Npoints)) |
---|
746 | cospOUT%isccp_meanalbedocld(ij:ik) => out1D_1 |
---|
747 | endif |
---|
748 | if(.not. associated(cospOUT%isccp_meanptop)) then |
---|
749 | allocate(out1D_2(Npoints)) |
---|
750 | cospOUT%isccp_meanptop(ij:ik) => out1D_2 |
---|
751 | endif |
---|
752 | if(.not. associated(cospOUT%isccp_meantaucld)) then |
---|
753 | allocate(out1D_3(Npoints)) |
---|
754 | cospOUT%isccp_meantaucld(ij:ik) => out1D_3 |
---|
755 | endif |
---|
756 | if(.not. associated(cospOUT%isccp_totalcldarea)) then |
---|
757 | allocate(out1D_4(Npoints)) |
---|
758 | cospOUT%isccp_totalcldarea(ij:ik) => out1D_4 |
---|
759 | endif |
---|
760 | if(.not. associated(cospOUT%isccp_meantb)) then |
---|
761 | allocate(out1D_5(Npoints)) |
---|
762 | cospOUT%isccp_meantb(ij:ik) => out1D_5 |
---|
763 | endif |
---|
764 | if(.not. associated(cospOUT%isccp_fq)) then |
---|
765 | allocate(out1D_6(Npoints*numISCCPTauBins*numISCCPPresBins)) |
---|
766 | cospOUT%isccp_fq(ij:ik,1:numISCCPTauBins,1:numISCCPPresBins) => out1D_6 |
---|
767 | endif |
---|
768 | |
---|
769 | ! Call simulator |
---|
770 | call icarus_column(isccpIN%npoints, isccpIN%ncolumns,isccp_boxtau(:,:), & |
---|
771 | isccp_boxptop(:,:)/100._wp, isccpIN%sunlit,isccp_boxttop, & |
---|
772 | cospOUT%isccp_fq(ij:ik,:,:), & |
---|
773 | cospOUT%isccp_meanalbedocld(ij:ik), & |
---|
774 | cospOUT%isccp_meanptop(ij:ik),cospOUT%isccp_meantaucld(ij:ik), & |
---|
775 | cospOUT%isccp_totalcldarea(ij:ik),cospOUT%isccp_meantb(ij:ik)) |
---|
776 | cospOUT%isccp_fq(ij:ik,:,:) = cospOUT%isccp_fq(ij:ik,:,7:1:-1) |
---|
777 | |
---|
778 | ! Check if there is any value slightly greater than 1 |
---|
779 | where ((cospOUT%isccp_totalcldarea > 1.0-1.e-5) .and. & |
---|
780 | (cospOUT%isccp_totalcldarea < 1.0+1.e-5)) |
---|
781 | cospOUT%isccp_totalcldarea = 1.0 |
---|
782 | endwhere |
---|
783 | |
---|
784 | ! Clear up memory (if necessary) |
---|
785 | if (allocated(isccp_boxttop)) deallocate(isccp_boxttop) |
---|
786 | if (allocated(isccp_boxptop)) deallocate(isccp_boxptop) |
---|
787 | if (allocated(isccp_boxtau)) deallocate(isccp_boxtau) |
---|
788 | if (allocated(isccp_meantbclr)) deallocate(isccp_meantbclr) |
---|
789 | if (allocated(isccpLEVMATCH)) deallocate(isccpLEVMATCH) |
---|
790 | if (allocated(out1D_1)) then |
---|
791 | deallocate(out1D_1) |
---|
792 | nullify(cospOUT%isccp_meanalbedocld) |
---|
793 | endif |
---|
794 | if (allocated(out1D_2)) then |
---|
795 | deallocate(out1D_2) |
---|
796 | nullify(cospOUT%isccp_meanptop) |
---|
797 | endif |
---|
798 | if (allocated(out1D_3)) then |
---|
799 | deallocate(out1D_3) |
---|
800 | nullify(cospOUT%isccp_meantaucld) |
---|
801 | endif |
---|
802 | if (allocated(out1D_4)) then |
---|
803 | deallocate(out1D_4) |
---|
804 | nullify(cospOUT%isccp_totalcldarea) |
---|
805 | endif |
---|
806 | if (allocated(out1D_5)) then |
---|
807 | deallocate(out1D_5) |
---|
808 | nullify(cospOUT%isccp_meantb) |
---|
809 | endif |
---|
810 | if (allocated(out1D_6)) then |
---|
811 | deallocate(out1D_6) |
---|
812 | nullify(cospOUT%isccp_fq) |
---|
813 | endif |
---|
814 | endif |
---|
815 | |
---|
816 | ! MISR |
---|
817 | if (Lmisr_column) then |
---|
818 | ! Check to see which outputs are requested. If not requested, use a local dummy array |
---|
819 | if (.not. associated(cospOUT%misr_cldarea)) then |
---|
820 | allocate(out1D_1(Npoints)) |
---|
821 | cospOUT%misr_cldarea(ij:ik) => out1D_1 |
---|
822 | endif |
---|
823 | if (.not. associated(cospOUT%misr_meanztop)) then |
---|
824 | allocate(out1D_2(Npoints)) |
---|
825 | cospOUT%misr_meanztop(ij:ik) => out1D_2 |
---|
826 | endif |
---|
827 | if (.not. associated(cospOUT%misr_fq)) then |
---|
828 | allocate(out1D_3(Npoints*numMISRTauBins*numMISRHgtBins)) |
---|
829 | cospOUT%misr_fq(ij:ik,1:numMISRTauBins,1:numMISRHgtBins) => out1D_3 |
---|
830 | endif |
---|
831 | |
---|
832 | ! Call simulator |
---|
833 | call misr_column(misrIN%Npoints,misrIN%Ncolumns,misr_boxztop,misrIN%sunlit,& |
---|
834 | misr_boxtau,cospOUT%misr_cldarea(ij:ik), & |
---|
835 | cospOUT%misr_meanztop(ij:ik),cospOUT%misr_fq(ij:ik,:,:)) |
---|
836 | |
---|
837 | ! Clear up memory |
---|
838 | if (allocated(misr_boxtau)) deallocate(misr_boxtau) |
---|
839 | if (allocated(misr_boxztop)) deallocate(misr_boxztop) |
---|
840 | if (allocated(misr_dist_model_layertops)) deallocate(misr_dist_model_layertops) |
---|
841 | if (allocated(out1D_1)) then |
---|
842 | deallocate(out1D_1) |
---|
843 | nullify(cospOUT%misr_cldarea) |
---|
844 | endif |
---|
845 | if (allocated(out1D_2)) then |
---|
846 | deallocate(out1D_2) |
---|
847 | nullify(cospOUT%misr_meanztop) |
---|
848 | endif |
---|
849 | if (allocated(out1D_3)) then |
---|
850 | deallocate(out1D_3) |
---|
851 | nullify(cospOUT%misr_fq) |
---|
852 | endif |
---|
853 | endif |
---|
854 | |
---|
855 | ! CALIPSO LIDAR Simulator |
---|
856 | if (Lcalipso_column) then |
---|
857 | ! Check to see which outputs are requested. If not requested, use a local dummy array |
---|
858 | if (.not. associated(cospOUT%calipso_cfad_sr)) then |
---|
859 | allocate(out1D_1(Npoints*SR_BINS*Nlvgrid)) |
---|
860 | cospOUT%calipso_cfad_sr(ij:ik,1:SR_BINS,1:Nlvgrid) => out1D_1 |
---|
861 | endif |
---|
862 | if (.not. associated(cospOUT%calipso_lidarcld)) then |
---|
863 | allocate(out1D_2(Npoints*Nlvgrid)) |
---|
864 | cospOUT%calipso_lidarcld(ij:ik,1:Nlvgrid) => out1D_2 |
---|
865 | endif |
---|
866 | if (.not. associated(cospOUT%calipso_lidarcldphase)) then |
---|
867 | allocate(out1D_3(Npoints*Nlvgrid*6)) |
---|
868 | cospOUT%calipso_lidarcldphase(ij:ik,1:Nlvgrid,1:6) => out1D_3 |
---|
869 | endif |
---|
870 | if (.not. associated(cospOUT%calipso_cldlayer)) then |
---|
871 | allocate(out1D_4(Npoints*LIDAR_NCAT)) |
---|
872 | cospOUT%calipso_cldlayer(ij:ik,1:LIDAR_NCAT) => out1D_4 |
---|
873 | endif |
---|
874 | if (.not. associated(cospOUT%calipso_cldlayerphase)) then |
---|
875 | allocate(out1D_5(Npoints*LIDAR_NCAT*6)) |
---|
876 | cospOUT%calipso_cldlayerphase(ij:ik,1:LIDAR_NCAT,1:6) => out1D_5 |
---|
877 | endif |
---|
878 | if (.not. associated(cospOUT%calipso_lidarcldtmp)) then |
---|
879 | allocate(out1D_6(Npoints*40*5)) |
---|
880 | cospOUT%calipso_lidarcldtmp(ij:ik,1:40,1:5) => out1D_6 |
---|
881 | endif |
---|
882 | |
---|
883 | ! Call simulator |
---|
884 | ok_lidar_cfad=.true. |
---|
885 | call lidar_column(calipsoIN%Npoints,calipsoIN%Ncolumns,calipsoIN%Nlevels, & |
---|
886 | Nlvgrid,SR_BINS,cospgridIN%at(:,:), & |
---|
887 | calipso_beta_tot(:,:,:),calipso_betaperp_tot(:,:,:), & |
---|
888 | calipso_beta_mol(:,:), & |
---|
889 | cospgridIN%phalf(:,2:calipsoIN%Nlevels),ok_lidar_cfad, & |
---|
890 | LIDAR_NCAT,cospOUT%calipso_cfad_sr(ij:ik,:,:), & |
---|
891 | cospOUT%calipso_lidarcld(ij:ik,:), & |
---|
892 | cospOUT%calipso_lidarcldphase(ij:ik,:,:), & |
---|
893 | cospOUT%calipso_cldlayer(ij:ik,:), & |
---|
894 | cospgridIN%hgt_matrix,cospgridIN%hgt_matrix_half, & |
---|
895 | cospOUT%calipso_cldlayerphase(ij:ik,:,:), & |
---|
896 | cospOUT%calipso_lidarcldtmp(ij:ik,:,:)) |
---|
897 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval = calipso_histBsct |
---|
898 | |
---|
899 | ! Free up memory (if necessary) |
---|
900 | if (allocated(out1D_1)) then |
---|
901 | deallocate(out1D_1) |
---|
902 | nullify(cospOUT%calipso_cfad_sr) |
---|
903 | endif |
---|
904 | if (allocated(out1D_2)) then |
---|
905 | deallocate(out1D_2) |
---|
906 | nullify(cospOUT%calipso_lidarcld) |
---|
907 | endif |
---|
908 | if (allocated(out1D_3)) then |
---|
909 | deallocate(out1D_3) |
---|
910 | nullify(cospOUT%calipso_lidarcldphase) |
---|
911 | endif |
---|
912 | if (allocated(out1D_4)) then |
---|
913 | deallocate(out1D_4) |
---|
914 | nullify(cospOUT%calipso_cldlayer) |
---|
915 | endif |
---|
916 | if (allocated(out1D_5)) then |
---|
917 | deallocate(out1D_5) |
---|
918 | nullify(cospOUT%calipso_cldlayerphase) |
---|
919 | endif |
---|
920 | if (allocated(out1D_6)) then |
---|
921 | deallocate(out1D_6) |
---|
922 | nullify(cospOUT%calipso_lidarcldtmp) |
---|
923 | endif |
---|
924 | endif |
---|
925 | |
---|
926 | ! PARASOL |
---|
927 | if (Lparasol_column) then |
---|
928 | call parasol_column(parasolIN%Npoints,PARASOL_NREFL,parasolIN%Ncolumns, & |
---|
929 | cospgridIN%land(:),parasolPix_refl(:,:,:), & |
---|
930 | cospOUT%parasolGrid_refl(ij:ik,:)) |
---|
931 | if (allocated(parasolPix_refl)) deallocate(parasolPix_refl) |
---|
932 | endif |
---|
933 | |
---|
934 | ! CLOUDSAT |
---|
935 | if (Lcloudsat_column) then |
---|
936 | ! Check to see which outputs are requested. If not requested, use a local dummy array |
---|
937 | if (.not. associated(cospOUT%cloudsat_cfad_ze)) then |
---|
938 | allocate(out1D_1(Npoints*DBZE_BINS*Nlvgrid)) |
---|
939 | cospOUT%cloudsat_cfad_ze(ij:ik,1:DBZE_BINS,1:Nlvgrid) => out1D_1 |
---|
940 | endif |
---|
941 | |
---|
942 | ! Call simulator |
---|
943 | call quickbeam_column(cloudsatIN%Npoints,cloudsatIN%Ncolumns,cloudsatIN%Nlevels, & |
---|
944 | Nlvgrid,cloudsatDBZe,cospgridIN%hgt_matrix, & |
---|
945 | cospgridIN%hgt_matrix_half,cospOUT%cloudsat_cfad_ze(ij:ik,:,:)) |
---|
946 | ! Free up memory (if necessary) |
---|
947 | if (allocated(out1D_1)) then |
---|
948 | deallocate(out1D_1) |
---|
949 | nullify(cospOUT%cloudsat_cfad_ze) |
---|
950 | endif |
---|
951 | endif |
---|
952 | |
---|
953 | ! MODIS |
---|
954 | if (Lmodis_column) then |
---|
955 | if(modisiN%nSunlit > 0) then |
---|
956 | ! Allocate space for local variables |
---|
957 | allocate(modisCftotal(modisIN%nSunlit), modisCfLiquid(modisIN%nSunlit), & |
---|
958 | modisCfIce(modisIN%nSunlit),modisCfHigh(modisIN%nSunlit), & |
---|
959 | modisCfMid(modisIN%nSunlit),modisCfLow(modisIN%nSunlit), & |
---|
960 | modisMeanTauTotal(modisIN%nSunlit), & |
---|
961 | modisMeanTauLiquid(modisIN%nSunlit),modisMeanTauIce(modisIN%nSunlit), & |
---|
962 | modisMeanLogTauTotal(modisIN%nSunlit), & |
---|
963 | modisMeanLogTauLiquid(modisIN%nSunlit), & |
---|
964 | modisMeanLogTauIce(modisIN%nSunlit), & |
---|
965 | modisMeanSizeLiquid(modisIN%nSunlit), & |
---|
966 | modisMeanSizeIce(modisIN%nSunlit), & |
---|
967 | modisMeanCloudTopPressure(modisIN%nSunlit), & |
---|
968 | modisMeanLiquidWaterPath(modisIN%nSunlit), & |
---|
969 | modisMeanIceWaterPath(modisIN%nSunlit), & |
---|
970 | modisJointHistogram(modisIN%nSunlit,numMODISTauBins,numMODISPresBins),& |
---|
971 | modisJointHistogramIce(modisIN%nSunlit,numModisTauBins,numMODISReffIceBins),& |
---|
972 | modisJointHistogramLiq(modisIN%nSunlit,numModisTauBins,numMODISReffLiqBins)) |
---|
973 | ! Call simulator |
---|
974 | call modis_column(modisIN%nSunlit, modisIN%Ncolumns,modisRetrievedPhase, & |
---|
975 | modisRetrievedCloudTopPressure,modisRetrievedTau, & |
---|
976 | modisRetrievedSize, modisCfTotal, modisCfLiquid, modisCfIce,& |
---|
977 | modisCfHigh, modisCfMid, modisCfLow, modisMeanTauTotal, & |
---|
978 | modisMeanTauLiquid, modisMeanTauIce, modisMeanLogTauTotal, & |
---|
979 | modisMeanLogTauLiquid, modisMeanLogTauIce, & |
---|
980 | modisMeanSizeLiquid, modisMeanSizeIce, & |
---|
981 | modisMeanCloudTopPressure, modisMeanLiquidWaterPath, & |
---|
982 | modisMeanIceWaterPath, modisJointHistogram, & |
---|
983 | modisJointHistogramIce,modisJointHistogramLiq) |
---|
984 | ! Store data (if requested) |
---|
985 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) then |
---|
986 | cospOUT%modis_Cloud_Fraction_Total_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
987 | modisCfTotal |
---|
988 | endif |
---|
989 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) then |
---|
990 | cospOUT%modis_Cloud_Fraction_Water_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
991 | modisCfLiquid |
---|
992 | endif |
---|
993 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) then |
---|
994 | cospOUT%modis_Cloud_Fraction_Ice_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
995 | modisCfIce |
---|
996 | endif |
---|
997 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) then |
---|
998 | cospOUT%modis_Cloud_Fraction_High_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
999 | modisCfHigh |
---|
1000 | endif |
---|
1001 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) then |
---|
1002 | cospOUT%modis_Cloud_Fraction_Mid_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1003 | modisCfMid |
---|
1004 | endif |
---|
1005 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) then |
---|
1006 | cospOUT%modis_Cloud_Fraction_Low_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1007 | modisCfLow |
---|
1008 | endif |
---|
1009 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) then |
---|
1010 | cospOUT%modis_Optical_Thickness_Total_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1011 | modisMeanTauTotal |
---|
1012 | endif |
---|
1013 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) then |
---|
1014 | cospOUT%modis_Optical_Thickness_Water_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1015 | modisMeanTauLiquid |
---|
1016 | endif |
---|
1017 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) then |
---|
1018 | cospOUT%modis_Optical_Thickness_Ice_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1019 | modisMeanTauIce |
---|
1020 | endif |
---|
1021 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) then |
---|
1022 | cospOUT%modis_Optical_Thickness_Total_LogMean(ij+int(modisIN%sunlit(:))-1)= & |
---|
1023 | modisMeanLogTauTotal |
---|
1024 | endif |
---|
1025 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) then |
---|
1026 | cospOUT%modis_Optical_Thickness_Water_LogMean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1027 | modisMeanLogTauLiquid |
---|
1028 | endif |
---|
1029 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) then |
---|
1030 | cospOUT%modis_Optical_Thickness_Ice_LogMean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1031 | modisMeanLogTauIce |
---|
1032 | endif |
---|
1033 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) then |
---|
1034 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1035 | modisMeanSizeLiquid |
---|
1036 | endif |
---|
1037 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) then |
---|
1038 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1039 | modisMeanSizeIce |
---|
1040 | endif |
---|
1041 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) then |
---|
1042 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1043 | modisMeanCloudTopPressure |
---|
1044 | endif |
---|
1045 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) then |
---|
1046 | cospOUT%modis_Liquid_Water_Path_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1047 | modisMeanLiquidWaterPath |
---|
1048 | endif |
---|
1049 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) then |
---|
1050 | cospOUT%modis_Ice_Water_Path_Mean(ij+int(modisIN%sunlit(:))-1) = & |
---|
1051 | modisMeanIceWaterPath |
---|
1052 | endif |
---|
1053 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) then |
---|
1054 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij+ & |
---|
1055 | int(modisIN%sunlit(:))-1, 1:numModisTauBins, :) = modisJointHistogram(:, :, :) |
---|
1056 | ! Reorder pressure bins in joint histogram to go from surface to TOA |
---|
1057 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij:ik,:,:) = & |
---|
1058 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij:ik,:,numMODISPresBins:1:-1) |
---|
1059 | endif |
---|
1060 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffIce)) then |
---|
1061 | cospOUT%modis_Optical_Thickness_vs_ReffIce(ij+int(modisIN%sunlit(:))-1, 1:numMODISTauBins,:) = & |
---|
1062 | modisJointHistogramIce(:,:,:) |
---|
1063 | endif |
---|
1064 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLiq)) then |
---|
1065 | cospOUT%modis_Optical_Thickness_vs_ReffLiq(ij+int(modisIN%sunlit(:))-1, 1:numMODISTauBins,:) = & |
---|
1066 | modisJointHistogramLiq(:,:,:) |
---|
1067 | endif |
---|
1068 | |
---|
1069 | if(modisIN%nSunlit < modisIN%Npoints) then |
---|
1070 | ! Where it's night and we haven't done the retrievals the values are undefined |
---|
1071 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1072 | cospOUT%modis_Cloud_Fraction_Total_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1073 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1074 | cospOUT%modis_Cloud_Fraction_Water_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1075 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1076 | cospOUT%modis_Cloud_Fraction_Ice_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1077 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1078 | cospOUT%modis_Cloud_Fraction_High_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1079 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1080 | cospOUT%modis_Cloud_Fraction_Mid_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1081 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1082 | cospOUT%modis_Cloud_Fraction_Low_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1083 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1084 | cospOUT%modis_Optical_Thickness_Total_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1085 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1086 | cospOUT%modis_Optical_Thickness_Water_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1087 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1088 | cospOUT%modis_Optical_Thickness_Ice_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1089 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1090 | cospOUT%modis_Optical_Thickness_Total_LogMean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1091 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1092 | cospOUT%modis_Optical_Thickness_Water_LogMean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1093 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1094 | cospOUT%modis_Optical_Thickness_Ice_LogMean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1095 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1096 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1097 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1098 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1099 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1100 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1101 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1102 | cospOUT%modis_Liquid_Water_Path_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1103 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1104 | cospOUT%modis_Ice_Water_Path_Mean(ij+int(modisIN%notSunlit(:))-1) = R_UNDEF |
---|
1105 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1106 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij+int(modisIN%notSunlit(:))-1, :, :) = R_UNDEF |
---|
1107 | end if |
---|
1108 | else |
---|
1109 | ! It's nightime everywhere - everything is undefined |
---|
1110 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1111 | cospOUT%modis_Cloud_Fraction_Total_Mean(ij:ik) = R_UNDEF |
---|
1112 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1113 | cospOUT%modis_Cloud_Fraction_Water_Mean(ij:ik) = R_UNDEF |
---|
1114 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1115 | cospOUT%modis_Cloud_Fraction_Ice_Mean(ij:ik) = R_UNDEF |
---|
1116 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1117 | cospOUT%modis_Cloud_Fraction_High_Mean(ij:ik) = R_UNDEF |
---|
1118 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1119 | cospOUT%modis_Cloud_Fraction_Mid_Mean(ij:ik) = R_UNDEF |
---|
1120 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1121 | cospOUT%modis_Cloud_Fraction_Low_Mean(ij:ik) = R_UNDEF |
---|
1122 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1123 | cospOUT%modis_Optical_Thickness_Total_Mean(ij:ik) = R_UNDEF |
---|
1124 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1125 | cospOUT%modis_Optical_Thickness_Water_Mean(ij:ik) = R_UNDEF |
---|
1126 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1127 | cospOUT%modis_Optical_Thickness_Ice_Mean(ij:ik) = R_UNDEF |
---|
1128 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1129 | cospOUT%modis_Optical_Thickness_Total_LogMean(ij:ik) = R_UNDEF |
---|
1130 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1131 | cospOUT%modis_Optical_Thickness_Water_LogMean(ij:ik) = R_UNDEF |
---|
1132 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1133 | cospOUT%modis_Optical_Thickness_Ice_LogMean(ij:ik) = R_UNDEF |
---|
1134 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1135 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(ij:ik) = R_UNDEF |
---|
1136 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1137 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(ij:ik) = R_UNDEF |
---|
1138 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1139 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(ij:ik) = R_UNDEF |
---|
1140 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1141 | cospOUT%modis_Liquid_Water_Path_Mean(ij:ik) = R_UNDEF |
---|
1142 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1143 | cospOUT%modis_Ice_Water_Path_Mean(ij:ik) = R_UNDEF |
---|
1144 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1145 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij:ik, :, :) = R_UNDEF |
---|
1146 | endif |
---|
1147 | ! Free up memory (if necessary) |
---|
1148 | if (allocated(modisRetrievedTau)) deallocate(modisRetrievedTau) |
---|
1149 | if (allocated(modisRetrievedSize)) deallocate(modisRetrievedSize) |
---|
1150 | if (allocated(modisRetrievedPhase)) deallocate(modisRetrievedPhase) |
---|
1151 | if (allocated(modisRetrievedCloudTopPressure)) deallocate(modisRetrievedCloudTopPressure) |
---|
1152 | if (allocated(modisCftotal)) deallocate(modisCftotal) |
---|
1153 | if (allocated(modisCfLiquid)) deallocate(modisCfLiquid) |
---|
1154 | if (allocated(modisCfIce)) deallocate(modisCfIce) |
---|
1155 | if (allocated(modisCfHigh)) deallocate(modisCfHigh) |
---|
1156 | if (allocated(modisCfMid)) deallocate(modisCfMid) |
---|
1157 | if (allocated(modisCfLow)) deallocate(modisCfLow) |
---|
1158 | if (allocated(modisMeanTauTotal)) deallocate(modisMeanTauTotal) |
---|
1159 | if (allocated(modisMeanTauLiquid)) deallocate(modisMeanTauLiquid) |
---|
1160 | if (allocated(modisMeanTauIce)) deallocate(modisMeanTauIce) |
---|
1161 | if (allocated(modisMeanLogTauTotal)) deallocate(modisMeanLogTauTotal) |
---|
1162 | if (allocated(modisMeanLogTauLiquid)) deallocate(modisMeanLogTauLiquid) |
---|
1163 | if (allocated(modisMeanLogTauIce)) deallocate(modisMeanLogTauIce) |
---|
1164 | if (allocated(modisMeanSizeLiquid)) deallocate(modisMeanSizeLiquid) |
---|
1165 | if (allocated(modisMeanSizeIce)) deallocate(modisMeanSizeIce) |
---|
1166 | if (allocated(modisMeanCloudTopPressure)) deallocate(modisMeanCloudTopPressure) |
---|
1167 | if (allocated(modisMeanLiquidWaterPath)) deallocate(modisMeanLiquidWaterPath) |
---|
1168 | if (allocated(modisMeanIceWaterPath)) deallocate(modisMeanIceWaterPath) |
---|
1169 | if (allocated(modisJointHistogram)) deallocate(modisJointHistogram) |
---|
1170 | if (allocated(modisJointHistogramIce)) deallocate(modisJointHistogramIce) |
---|
1171 | if (allocated(modisJointHistogramLiq)) deallocate(modisJointHistogramLiq) |
---|
1172 | if (allocated(isccp_boxttop)) deallocate(isccp_boxttop) |
---|
1173 | if (allocated(isccp_boxptop)) deallocate(isccp_boxptop) |
---|
1174 | if (allocated(isccp_boxtau)) deallocate(isccp_boxtau) |
---|
1175 | if (allocated(isccp_meantbclr)) deallocate(isccp_meantbclr) |
---|
1176 | if (allocated(isccpLEVMATCH)) deallocate(isccpLEVMATCH) |
---|
1177 | endif |
---|
1178 | |
---|
1179 | ! RTTOV |
---|
1180 | ! if (lrttov_column) then |
---|
1181 | ! call rttov_column(rttovIN%nPoints,rttovIN%nLevels,rttovIN%nSubCols,rttovIN%q, & |
---|
1182 | ! rttovIN%p,rttovIN%t,rttovIN%o3,rttovIN%ph,rttovIN%h_surf, & |
---|
1183 | ! rttovIN%u_surf,rttovIN%v_surf,rttovIN%p_surf,rttovIN%t_skin, & |
---|
1184 | ! rttovIN%t2m,rttovIN%q2m,rttovIN%lsmask,rttovIN%longitude, & |
---|
1185 | ! rttovIN%latitude,rttovIN%seaice,rttovIN%co2,rttovIN%ch4, & |
---|
1186 | ! rttovIN%n2o,rttovIN%co,rttovIN%zenang,lrttov_cleanUp, & |
---|
1187 | ! cospOUT%rttov_tbs(ij:ik,:),cosp_simulator(nError+1), & |
---|
1188 | ! ! Optional arguments for surface emissivity calculation |
---|
1189 | ! month=rttovIN%month) |
---|
1190 | ! ! Optional arguments to rttov for all-sky calculation |
---|
1191 | ! ! rttovIN%month, rttovIN%tca,rttovIN%cldIce,rttovIN%cldLiq, & |
---|
1192 | ! ! rttovIN%fl_rain,rttovIN%fl_snow) |
---|
1193 | ! endif |
---|
1194 | |
---|
1195 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1196 | ! 6) Compute multi-instrument products |
---|
1197 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1198 | |
---|
1199 | ! CLOUDSAT/CALIPSO products |
---|
1200 | if (Lradar_lidar_tcc .or. Llidar_only_freq_cloud) then |
---|
1201 | |
---|
1202 | if (use_vgrid) then |
---|
1203 | allocate(lidar_only_freq_cloud(cloudsatIN%Npoints,Nlvgrid), & |
---|
1204 | radar_lidar_tcc(cloudsatIN%Npoints)) |
---|
1205 | allocate(betamol_in(cloudsatIN%Npoints,1,cloudsatIN%Nlevels), & |
---|
1206 | betamolFlip(cloudsatIN%Npoints,1,Nlvgrid), & |
---|
1207 | pnormFlip(cloudsatIN%Npoints,cloudsatIN%Ncolumns,Nlvgrid), & |
---|
1208 | Ze_totFlip(cloudsatIN%Npoints,cloudsatIN%Ncolumns,Nlvgrid)) |
---|
1209 | |
---|
1210 | betamol_in(:,1,:) = calipso_beta_mol(:,cloudsatIN%Nlevels:1:-1) |
---|
1211 | call cosp_change_vertical_grid(cloudsatIN%Npoints,1,cloudsatIN%Nlevels, & |
---|
1212 | cospgridIN%hgt_matrix(:,cloudsatIN%Nlevels:1:-1), & |
---|
1213 | cospgridIN%hgt_matrix_half(:,cloudsatIN%Nlevels:1:-1),betamol_in, & |
---|
1214 | Nlvgrid,vgrid_zl(Nlvgrid:1:-1),vgrid_zu(Nlvgrid:1:-1), & |
---|
1215 | betamolFlip(:,1,Nlvgrid:1:-1)) |
---|
1216 | |
---|
1217 | call cosp_change_vertical_grid(cloudsatIN%Npoints,cloudsatIN%Ncolumns, & |
---|
1218 | cloudsatIN%Nlevels,cospgridIN%hgt_matrix(:,cloudsatIN%Nlevels:1:-1), & |
---|
1219 | cospgridIN%hgt_matrix_half(:,cloudsatIN%Nlevels:1:-1), & |
---|
1220 | calipso_beta_tot(:,:,cloudsatIN%Nlevels:1:-1),Nlvgrid, & |
---|
1221 | vgrid_zl(Nlvgrid:1:-1),vgrid_zu(Nlvgrid:1:-1),pnormFlip(:,:,Nlvgrid:1:-1)) |
---|
1222 | |
---|
1223 | call cosp_change_vertical_grid(cloudsatIN%Npoints,cloudsatIN%Ncolumns, & |
---|
1224 | cloudsatIN%Nlevels,cospgridIN%hgt_matrix(:,cloudsatIN%Nlevels:1:-1), & |
---|
1225 | cospgridIN%hgt_matrix_half(:,cloudsatIN%Nlevels:1:-1), & |
---|
1226 | cloudsatDBZe(:,:,cloudsatIN%Nlevels:1:-1),Nlvgrid,vgrid_zl(Nlvgrid:1:-1), & |
---|
1227 | vgrid_zu(Nlvgrid:1:-1),Ze_totFlip(:,:,Nlvgrid:1:-1),log_units=.true.) |
---|
1228 | |
---|
1229 | call cosp_lidar_only_cloud(cloudsatIN%Npoints,cloudsatIN%Ncolumns, & |
---|
1230 | Nlvgrid,pnormFlip,betamolFlip,Ze_totFlip, & |
---|
1231 | lidar_only_freq_cloud,radar_lidar_tcc) |
---|
1232 | |
---|
1233 | deallocate(betamol_in,betamolFlip,pnormFlip,ze_totFlip) |
---|
1234 | else |
---|
1235 | allocate(lidar_only_freq_cloud(cloudsatIN%Npoints,cloudsatIN%Nlevels), & |
---|
1236 | radar_lidar_tcc(cloudsatIN%Npoints)) |
---|
1237 | call cosp_lidar_only_cloud(cloudsatIN%Npoints,cloudsatIN%Ncolumns, & |
---|
1238 | cospIN%Nlevels,calipso_beta_tot(:,:,cloudsatIN%Nlevels:1:-1), & |
---|
1239 | calipso_beta_mol(:,cloudsatIN%Nlevels:1:-1), & |
---|
1240 | cloudsatDBZe(:,:,cloudsatIN%Nlevels:1:-1),lidar_only_freq_cloud, & |
---|
1241 | radar_lidar_tcc) |
---|
1242 | endif |
---|
1243 | |
---|
1244 | ! Store, when necessary |
---|
1245 | if (associated(cospOUT%lidar_only_freq_cloud)) then |
---|
1246 | cospOUT%lidar_only_freq_cloud(ij:ik,:) = lidar_only_freq_cloud |
---|
1247 | endif |
---|
1248 | if (associated(cospOUT%radar_lidar_tcc)) then |
---|
1249 | cospOUT%radar_lidar_tcc(ij:ik) = radar_lidar_tcc |
---|
1250 | endif |
---|
1251 | |
---|
1252 | endif |
---|
1253 | |
---|
1254 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1255 | ! 7) Cleanup |
---|
1256 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1257 | if (Lisccp_subcolumn .or. Lmodis_subcolumn) then |
---|
1258 | nullify(isccpIN%Npoints,isccpIN%Ncolumns,isccpIN%Nlevels,isccpIN%emsfc_lw, & |
---|
1259 | isccpIN%skt,isccpIN%qv,isccpIN%at,isccpIN%frac_out,isccpIN%dtau, & |
---|
1260 | isccpIN%dem,isccpIN%phalf,isccpIN%sunlit,isccpIN%pfull) |
---|
1261 | endif |
---|
1262 | |
---|
1263 | if (Lmisr_subcolumn) then |
---|
1264 | nullify(misrIN%Npoints,misrIN%Ncolumns,misrIN%Nlevels,misrIN%dtau,misrIN%sunlit, & |
---|
1265 | misrIN%zfull,misrIN%at) |
---|
1266 | endif |
---|
1267 | |
---|
1268 | if (Lcalipso_subcolumn) then |
---|
1269 | nullify(calipsoIN%Npoints,calipsoIN%Ncolumns,calipsoIN%Nlevels,calipsoIN%beta_mol,& |
---|
1270 | calipsoIN%betatot,calipsoIN%betatot_liq,calipsoIN%betatot_ice, & |
---|
1271 | calipsoIN%tau_mol,calipsoIN%tautot,calipsoIN%tautot_liq,calipsoIN%tautot_ice) |
---|
1272 | endif |
---|
1273 | |
---|
1274 | if (Lparasol_subcolumn) then |
---|
1275 | nullify(parasolIN%Npoints,parasolIN%Nlevels,parasolIN%Ncolumns,parasolIN%Nrefl, & |
---|
1276 | parasolIN%tautot_S_liq,parasolIN%tautot_S_ice) |
---|
1277 | endif |
---|
1278 | |
---|
1279 | if (Lcloudsat_subcolumn) then |
---|
1280 | nullify(cloudsatIN%Npoints,cloudsatIN%Nlevels,cloudsatIN%Ncolumns,cloudsatIN%rcfg,& |
---|
1281 | cloudsatIN%kr_vol,cloudsatIN%g_vol,cloudsatIN%z_vol,cloudsatIN%hgt_matrix) |
---|
1282 | endif |
---|
1283 | |
---|
1284 | if (Lmodis_subcolumn) then |
---|
1285 | nullify(modisIN%Npoints,modisIN%Ncolumns,modisIN%Nlevels,modisIN%tau,modisIN%g, & |
---|
1286 | modisIN%liqFrac,modisIN%w0) |
---|
1287 | if (allocated(modisIN%sunlit)) deallocate(modisIN%sunlit) |
---|
1288 | if (allocated(modisIN%notSunlit)) deallocate(modisIN%notSunlit) |
---|
1289 | if (allocated(modisIN%pres)) deallocate(modisIN%pres) |
---|
1290 | endif |
---|
1291 | |
---|
1292 | if (allocated(calipso_beta_tot)) deallocate(calipso_beta_tot) |
---|
1293 | if (allocated(calipso_beta_mol)) deallocate(calipso_beta_mol) |
---|
1294 | if (allocated(calipso_betaperp_tot)) deallocate(calipso_betaperp_tot) |
---|
1295 | if (allocated(cloudsatDBZe)) deallocate(cloudsatDBZe) |
---|
1296 | if (allocated(lidar_only_freq_cloud)) deallocate(lidar_only_freq_cloud) |
---|
1297 | if (allocated(radar_lidar_tcc)) deallocate(radar_lidar_tcc) |
---|
1298 | |
---|
1299 | end function COSP_SIMULATOR |
---|
1300 | ! ###################################################################################### |
---|
1301 | ! SUBROUTINE cosp_init |
---|
1302 | ! ###################################################################################### |
---|
1303 | SUBROUTINE COSP_INIT(Lisccp,Lmodis,Lmisr,Lcloudsat,Lcalipso,Lparasol,Lrttov, & |
---|
1304 | Npoints,Nlevels,cloudsat_radar_freq,cloudsat_k2, & |
---|
1305 | cloudsat_use_gas_abs,cloudsat_do_ray,isccp_top_height, & |
---|
1306 | isccp_top_height_direction,surface_radar,rcfg,rttov_Nchannels, & |
---|
1307 | rttov_Channels,rttov_platform,rttov_satellite,rttov_instrument, & |
---|
1308 | lusevgrid,luseCSATvgrid,Nvgrid,cloudsat_micro_scheme,cospOUT) |
---|
1309 | |
---|
1310 | ! INPUTS |
---|
1311 | logical,intent(in) :: Lisccp,Lmodis,Lmisr,Lcloudsat,Lcalipso,Lparasol,Lrttov |
---|
1312 | integer,intent(in) :: & |
---|
1313 | cloudsat_use_gas_abs, & ! |
---|
1314 | cloudsat_do_ray, & ! |
---|
1315 | isccp_top_height, & ! |
---|
1316 | isccp_top_height_direction, & ! |
---|
1317 | Npoints, & ! |
---|
1318 | Nlevels, & ! |
---|
1319 | Nvgrid, & ! Number of levels for new L3 grid |
---|
1320 | surface_radar, & ! |
---|
1321 | rttov_Nchannels, & ! Number of RTTOV channels |
---|
1322 | rttov_platform, & ! RTTOV platform |
---|
1323 | rttov_satellite, & ! RTTOV satellite |
---|
1324 | rttov_instrument ! RTTOV instrument |
---|
1325 | integer,intent(in),dimension(RTTOV_MAX_CHANNELS) :: & |
---|
1326 | rttov_channels ! RTTOV channels |
---|
1327 | real(wp),intent(in) :: & |
---|
1328 | cloudsat_radar_freq, & ! |
---|
1329 | cloudsat_k2 ! |
---|
1330 | logical,intent(in) :: & |
---|
1331 | lusevgrid, & ! Switch to use different vertical grid |
---|
1332 | luseCSATvgrid ! Switch to use CLOUDSAT grid spacing for new |
---|
1333 | ! vertical grid |
---|
1334 | character(len=64),intent(in) :: & |
---|
1335 | cloudsat_micro_scheme ! Microphysical scheme used by CLOUDSAT |
---|
1336 | type(cosp_outputs),intent(inout) :: cospOUT |
---|
1337 | |
---|
1338 | ! OUTPUTS |
---|
1339 | type(radar_cfg) :: rcfg |
---|
1340 | |
---|
1341 | ! Local variables |
---|
1342 | integer :: i |
---|
1343 | real(wp) :: zstep |
---|
1344 | |
---|
1345 | ! Initialize MODIS optical-depth bin boundaries for joint-histogram. (defined in cosp_config.F90) |
---|
1346 | if (.not. allocated(modis_histTau)) then |
---|
1347 | allocate(modis_histTau(ntau+1),modis_histTauEdges(2,ntau),modis_histTauCenters(ntau)) |
---|
1348 | numMODISTauBins = ntau |
---|
1349 | modis_histTau = tau_binBounds |
---|
1350 | modis_histTauEdges = tau_binEdges |
---|
1351 | modis_histTauCenters = tau_binCenters |
---|
1352 | endif |
---|
1353 | |
---|
1354 | ! Set up vertical grid used by CALIPSO and CLOUDSAT L3 |
---|
1355 | use_vgrid = lusevgrid |
---|
1356 | |
---|
1357 | if (use_vgrid) then |
---|
1358 | Nlvgrid = Nvgrid |
---|
1359 | print*,'allocation vgrid_zl zu z dans COSP_INIT' |
---|
1360 | allocate(vgrid_zl(Nlvgrid),vgrid_zu(Nlvgrid),vgrid_z(Nlvgrid)) |
---|
1361 | ! CloudSat grid requested |
---|
1362 | if (luseCSATvgrid) zstep = 480._wp |
---|
1363 | ! Other grid requested. Constant vertical spacing with top at 20 km |
---|
1364 | if (.not. luseCSATvgrid) zstep = 20000._wp/Nvgrid |
---|
1365 | do i=1,Nvgrid |
---|
1366 | vgrid_zl(Nlvgrid-i+1) = (i-1)*zstep |
---|
1367 | vgrid_zu(Nlvgrid-i+1) = i*zstep |
---|
1368 | enddo |
---|
1369 | vgrid_z = (vgrid_zl+vgrid_zu)/2._wp |
---|
1370 | else |
---|
1371 | Nlvgrid = Nlevels |
---|
1372 | allocate(vgrid_zl(Nlvgrid),vgrid_zu(Nlvgrid),vgrid_z(Nlvgrid)) |
---|
1373 | endif |
---|
1374 | |
---|
1375 | ! Initialize simulators |
---|
1376 | if (Lisccp) call cosp_isccp_init(isccp_top_height,isccp_top_height_direction) |
---|
1377 | if (Lmodis) call cosp_modis_init() |
---|
1378 | if (Lmisr) call cosp_misr_init() |
---|
1379 | !if (Lrttov) call cosp_rttov_init(rttov_Nchannels,rttov_platform,rttov_satellite, & |
---|
1380 | ! rttov_instrument,rttov_channels) |
---|
1381 | ! if (Lrttov) call cosp_rttov_init() |
---|
1382 | if (Lcloudsat) call cosp_cloudsat_init(cloudsat_radar_freq,cloudsat_k2, & |
---|
1383 | cloudsat_use_gas_abs,cloudsat_do_ray,R_UNDEF,N_HYDRO, surface_radar, & |
---|
1384 | rcfg,cloudsat_micro_scheme) |
---|
1385 | if (Lcalipso) call cosp_calipso_init() |
---|
1386 | if (Lparasol) call cosp_parasol_init() |
---|
1387 | |
---|
1388 | linitialization = .FALSE. |
---|
1389 | END SUBROUTINE COSP_INIT |
---|
1390 | |
---|
1391 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1392 | ! SUBROUTINE cosp_cleanUp |
---|
1393 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1394 | subroutine cosp_cleanUp() |
---|
1395 | deallocate(vgrid_zl,vgrid_zu,vgrid_z) |
---|
1396 | end subroutine cosp_cleanUp |
---|
1397 | |
---|
1398 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1399 | ! SUBROUTINE cosp_errorCheck |
---|
1400 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1401 | subroutine cosp_errorCheck(cospgridIN,cospIN,Lisccp_subcolumn,Lisccp_column,Lmisr_subcolumn,Lmisr_column, & |
---|
1402 | Lmodis_subcolumn,Lmodis_column,Lcloudsat_subcolumn,Lcloudsat_column,Lcalipso_subcolumn, & |
---|
1403 | Lcalipso_column,Lrttov_subcolumn,Lrttov_column,Lparasol_subcolumn,Lparasol_column, & |
---|
1404 | Lradar_lidar_tcc,Llidar_only_freq_cloud,cospOUT,errorMessage,nError) |
---|
1405 | ! Inputs |
---|
1406 | type(cosp_column_inputs),intent(in) :: & |
---|
1407 | cospgridIN ! Model grid inputs to COSP |
---|
1408 | type(cosp_optical_inputs),intent(in) :: & |
---|
1409 | cospIN ! Derived (optical) input to COSP |
---|
1410 | |
---|
1411 | ! Outputs |
---|
1412 | logical,intent(inout) :: & |
---|
1413 | Lisccp_subcolumn, & ! ISCCP subcolumn simulator on/off switch |
---|
1414 | Lisccp_column, & ! ISCCP column simulator on/off switch |
---|
1415 | Lmisr_subcolumn, & ! MISR subcolumn simulator on/off switch |
---|
1416 | Lmisr_column, & ! MISR column simulator on/off switch |
---|
1417 | Lmodis_subcolumn, & ! MODIS subcolumn simulator on/off switch |
---|
1418 | Lmodis_column, & ! MODIS column simulator on/off switch |
---|
1419 | Lcloudsat_subcolumn, & ! CLOUDSAT subcolumn simulator on/off switch |
---|
1420 | Lcloudsat_column, & ! CLOUDSAT column simulator on/off switch |
---|
1421 | Lcalipso_subcolumn, & ! CALIPSO subcolumn simulator on/off switch |
---|
1422 | Lcalipso_column, & ! CALIPSO column simulator on/off switch |
---|
1423 | Lparasol_subcolumn, & ! PARASOL subcolumn simulator on/off switch |
---|
1424 | Lparasol_column, & ! PARASOL column simulator on/off switch |
---|
1425 | Lrttov_subcolumn, & ! RTTOV subcolumn simulator on/off switch |
---|
1426 | Lrttov_column, & ! RTTOV column simulator on/off switch |
---|
1427 | Lradar_lidar_tcc, & ! On/Off switch for joint Calipso/Cloudsat product |
---|
1428 | Llidar_only_freq_cloud ! On/Off switch for joint Calipso/Cloudsat product |
---|
1429 | type(cosp_outputs),intent(inout) :: & |
---|
1430 | cospOUT ! COSP Outputs |
---|
1431 | character(len=256),dimension(100) :: errorMessage |
---|
1432 | integer,intent(out) :: nError |
---|
1433 | |
---|
1434 | ! Local variables |
---|
1435 | character(len=100) :: parasolErrorMessage |
---|
1436 | |
---|
1437 | nError = 0 |
---|
1438 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1439 | ! PART 1: Check input array values for out-of-bounds values. When an out-of-bound value |
---|
1440 | ! is encountered, COSP outputs that are dependent on that input are filled with |
---|
1441 | ! an undefined value (set in cosp_config.f90) and if necessary, that simulator |
---|
1442 | ! is turned off. |
---|
1443 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1444 | if (any(cospgridIN%sunlit .lt. 0)) then |
---|
1445 | nError=nError+1 |
---|
1446 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%sunlit contains values out of range (0 or 1)' |
---|
1447 | Lisccp_subcolumn = .false. |
---|
1448 | Lisccp_column = .false. |
---|
1449 | Lmisr_subcolumn = .false. |
---|
1450 | Lmisr_column = .false. |
---|
1451 | Lmodis_subcolumn = .false. |
---|
1452 | Lmodis_column = .false. |
---|
1453 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1454 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1455 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1456 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1457 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1458 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1459 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1460 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1461 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1462 | if (associated(cospOUT%misr_fq)) cospOUT%misr_fq(:,:,:) = R_UNDEF |
---|
1463 | if (associated(cospOUT%misr_dist_model_layertops)) cospOUT%misr_dist_model_layertops(:,:) = R_UNDEF |
---|
1464 | if (associated(cospOUT%misr_meanztop)) cospOUT%misr_meanztop(:) = R_UNDEF |
---|
1465 | if (associated(cospOUT%misr_cldarea)) cospOUT%misr_cldarea(:) = R_UNDEF |
---|
1466 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1467 | cospOUT%modis_Cloud_Fraction_Total_Mean(:) = R_UNDEF |
---|
1468 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1469 | cospOUT%modis_Cloud_Fraction_Water_Mean(:) = R_UNDEF |
---|
1470 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1471 | cospOUT%modis_Cloud_Fraction_Ice_Mean(:) = R_UNDEF |
---|
1472 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1473 | cospOUT%modis_Cloud_Fraction_High_Mean(:) = R_UNDEF |
---|
1474 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1475 | cospOUT%modis_Cloud_Fraction_Mid_Mean(:) = R_UNDEF |
---|
1476 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1477 | cospOUT%modis_Cloud_Fraction_Low_Mean(:) = R_UNDEF |
---|
1478 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1479 | cospOUT%modis_Optical_Thickness_Total_Mean(:) = R_UNDEF |
---|
1480 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1481 | cospOUT%modis_Optical_Thickness_Water_Mean(:) = R_UNDEF |
---|
1482 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1483 | cospOUT%modis_Optical_Thickness_Ice_Mean(:) = R_UNDEF |
---|
1484 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1485 | cospOUT%modis_Optical_Thickness_Total_LogMean(:) = R_UNDEF |
---|
1486 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1487 | cospOUT%modis_Optical_Thickness_Water_LogMean(:) = R_UNDEF |
---|
1488 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1489 | cospOUT%modis_Optical_Thickness_Ice_LogMean(:) = R_UNDEF |
---|
1490 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1491 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(:) = R_UNDEF |
---|
1492 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1493 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(:) = R_UNDEF |
---|
1494 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1495 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(:) = R_UNDEF |
---|
1496 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1497 | cospOUT%modis_Liquid_Water_Path_Mean(:) = R_UNDEF |
---|
1498 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1499 | cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF |
---|
1500 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1501 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF |
---|
1502 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & |
---|
1503 | cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF |
---|
1504 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & |
---|
1505 | cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:) = R_UNDEF |
---|
1506 | endif |
---|
1507 | if (any(cospgridIN%at .lt. 0)) then |
---|
1508 | nError=nError+1 |
---|
1509 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%at contains values out of range (at<0), expected units (K)' |
---|
1510 | Lisccp_subcolumn = .false. |
---|
1511 | Lisccp_column = .false. |
---|
1512 | Lmisr_subcolumn = .false. |
---|
1513 | Lmisr_column = .false. |
---|
1514 | Lrttov_subcolumn = .false. |
---|
1515 | Lcalipso_column = .false. |
---|
1516 | Lcloudsat_column = .false. |
---|
1517 | Lradar_lidar_tcc = .false. |
---|
1518 | Llidar_only_freq_cloud = .false. |
---|
1519 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1520 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1521 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1522 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1523 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1524 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1525 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1526 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1527 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1528 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1529 | if (associated(cospOUT%misr_fq)) cospOUT%misr_fq(:,:,:) = R_UNDEF |
---|
1530 | if (associated(cospOUT%misr_dist_model_layertops)) cospOUT%misr_dist_model_layertops(:,:) = R_UNDEF |
---|
1531 | if (associated(cospOUT%misr_meanztop)) cospOUT%misr_meanztop(:) = R_UNDEF |
---|
1532 | if (associated(cospOUT%misr_cldarea)) cospOUT%misr_cldarea(:) = R_UNDEF |
---|
1533 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1534 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1535 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1536 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1537 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1538 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1539 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
1540 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
1541 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
1542 | endif |
---|
1543 | if (any(cospgridIN%pfull .lt. 0)) then |
---|
1544 | nError=nError+1 |
---|
1545 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%pfull contains values out of range' |
---|
1546 | Lisccp_subcolumn = .false. |
---|
1547 | Lisccp_column = .false. |
---|
1548 | Lrttov_subcolumn = .false. |
---|
1549 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1550 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1551 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1552 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1553 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1554 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1555 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1556 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1557 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1558 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1559 | endif |
---|
1560 | if (any(cospgridIN%phalf .lt. 0)) then |
---|
1561 | nError=nError+1 |
---|
1562 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%phalf contains values out of range' |
---|
1563 | Lisccp_subcolumn = .false. |
---|
1564 | Lisccp_column = .false. |
---|
1565 | Lrttov_subcolumn = .false. |
---|
1566 | Lmodis_subcolumn = .false. |
---|
1567 | Lmodis_column = .false. |
---|
1568 | Lcalipso_column = .false. |
---|
1569 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1570 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1571 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1572 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1573 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1574 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1575 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1576 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1577 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1578 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1579 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1580 | cospOUT%modis_Cloud_Fraction_Total_Mean(:) = R_UNDEF |
---|
1581 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1582 | cospOUT%modis_Cloud_Fraction_Water_Mean(:) = R_UNDEF |
---|
1583 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1584 | cospOUT%modis_Cloud_Fraction_Ice_Mean(:) = R_UNDEF |
---|
1585 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1586 | cospOUT%modis_Cloud_Fraction_High_Mean(:) = R_UNDEF |
---|
1587 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1588 | cospOUT%modis_Cloud_Fraction_Mid_Mean(:) = R_UNDEF |
---|
1589 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1590 | cospOUT%modis_Cloud_Fraction_Low_Mean(:) = R_UNDEF |
---|
1591 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1592 | cospOUT%modis_Optical_Thickness_Total_Mean(:) = R_UNDEF |
---|
1593 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1594 | cospOUT%modis_Optical_Thickness_Water_Mean(:) = R_UNDEF |
---|
1595 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1596 | cospOUT%modis_Optical_Thickness_Ice_Mean(:) = R_UNDEF |
---|
1597 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1598 | cospOUT%modis_Optical_Thickness_Total_LogMean(:) = R_UNDEF |
---|
1599 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1600 | cospOUT%modis_Optical_Thickness_Water_LogMean(:) = R_UNDEF |
---|
1601 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1602 | cospOUT%modis_Optical_Thickness_Ice_LogMean(:) = R_UNDEF |
---|
1603 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1604 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(:) = R_UNDEF |
---|
1605 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1606 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(:) = R_UNDEF |
---|
1607 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1608 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(:) = R_UNDEF |
---|
1609 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1610 | cospOUT%modis_Liquid_Water_Path_Mean(:) = R_UNDEF |
---|
1611 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1612 | cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF |
---|
1613 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1614 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF |
---|
1615 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & |
---|
1616 | cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF |
---|
1617 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & |
---|
1618 | cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:) = R_UNDEF |
---|
1619 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1620 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1621 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1622 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1623 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1624 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1625 | endif |
---|
1626 | if (any(cospgridIN%qv .lt. 0)) then |
---|
1627 | nError=nError+1 |
---|
1628 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%qv contains values out of range' |
---|
1629 | Lisccp_subcolumn = .false. |
---|
1630 | Lisccp_column = .false. |
---|
1631 | Lrttov_subcolumn = .false. |
---|
1632 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1633 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1634 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1635 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1636 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1637 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1638 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1639 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1640 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1641 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1642 | endif |
---|
1643 | if (any(cospgridIN%hgt_matrix .lt. -300)) then |
---|
1644 | nError=nError+1 |
---|
1645 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%hgt_matrix contains values out of range' |
---|
1646 | Lmisr_subcolumn = .false. |
---|
1647 | Lmisr_column = .false. |
---|
1648 | Lcloudsat_subcolumn = .false. |
---|
1649 | Lcloudsat_column = .false. |
---|
1650 | Lcalipso_column = .false. |
---|
1651 | Lradar_lidar_tcc = .false. |
---|
1652 | Llidar_only_freq_cloud = .false. |
---|
1653 | if (associated(cospOUT%misr_fq)) cospOUT%misr_fq(:,:,:) = R_UNDEF |
---|
1654 | if (associated(cospOUT%misr_dist_model_layertops)) cospOUT%misr_dist_model_layertops(:,:) = R_UNDEF |
---|
1655 | if (associated(cospOUT%misr_meanztop)) cospOUT%misr_meanztop(:) = R_UNDEF |
---|
1656 | if (associated(cospOUT%misr_cldarea)) cospOUT%misr_cldarea(:) = R_UNDEF |
---|
1657 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1658 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1659 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1660 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1661 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1662 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1663 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
1664 | if (associated(cospOUT%cloudsat_Ze_tot)) cospOUT%cloudsat_Ze_tot(:,:,:) = R_UNDEF |
---|
1665 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
1666 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
1667 | endif |
---|
1668 | if (any(cospgridIN%hgt_matrix_half .lt. -300)) then |
---|
1669 | nError=nError+1 |
---|
1670 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%hgt_matrix_half contains values out of range' |
---|
1671 | Lrttov_subcolumn = .false. |
---|
1672 | Lcloudsat_column = .false. |
---|
1673 | Lcalipso_column = .false. |
---|
1674 | Lradar_lidar_tcc = .false. |
---|
1675 | Llidar_only_freq_cloud = .false. |
---|
1676 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1677 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1678 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1679 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1680 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1681 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1682 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1683 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
1684 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
1685 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
1686 | endif |
---|
1687 | if (any(cospgridIN%land .lt. 0)) then |
---|
1688 | nError=nError+1 |
---|
1689 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%land contains values out of range' |
---|
1690 | Lrttov_subcolumn = .false. |
---|
1691 | Lcalipso_column = .false. |
---|
1692 | Lparasol_column = .false. |
---|
1693 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1694 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1695 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1696 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1697 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1698 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1699 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1700 | if (associated(cospOUT%parasolGrid_refl)) cospOUT%parasolGrid_refl(:,:) = R_UNDEF |
---|
1701 | endif |
---|
1702 | if (any(cospgridIN%skt .lt. 0)) then |
---|
1703 | nError=nError+1 |
---|
1704 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%skt contains values out of range' |
---|
1705 | Lisccp_subcolumn = .false. |
---|
1706 | Lisccp_column = .false. |
---|
1707 | Lrttov_subcolumn = .false. |
---|
1708 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1709 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1710 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1711 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1712 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1713 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1714 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1715 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1716 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1717 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1718 | endif |
---|
1719 | |
---|
1720 | ! RTTOV Inputs |
---|
1721 | if (cospgridIN%zenang .lt. -90. .OR. cospgridIN%zenang .gt. 90) then |
---|
1722 | nError=nError+1 |
---|
1723 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%zenang contains values out of range' |
---|
1724 | Lrttov_subcolumn = .false. |
---|
1725 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1726 | endif |
---|
1727 | if (cospgridIN%co2 .lt. 0) then |
---|
1728 | nError=nError+1 |
---|
1729 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%co2 contains values out of range' |
---|
1730 | Lrttov_subcolumn = .false. |
---|
1731 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1732 | endif |
---|
1733 | if (cospgridIN%ch4 .lt. 0) then |
---|
1734 | nError=nError+1 |
---|
1735 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%ch4 contains values out of range' |
---|
1736 | Lrttov_subcolumn = .false. |
---|
1737 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1738 | endif |
---|
1739 | if (cospgridIN%n2o .lt. 0) then |
---|
1740 | nError=nError+1 |
---|
1741 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%n2o contains values out of range' |
---|
1742 | Lrttov_subcolumn = .false. |
---|
1743 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1744 | endif |
---|
1745 | if (cospgridIN%co.lt. 0) then |
---|
1746 | nError=nError+1 |
---|
1747 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%co contains values out of range' |
---|
1748 | Lrttov_subcolumn = .false. |
---|
1749 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1750 | endif |
---|
1751 | if (any(cospgridIN%o3 .lt. 0)) then |
---|
1752 | nError=nError+1 |
---|
1753 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%o3 contains values out of range' |
---|
1754 | Lrttov_subcolumn = .false. |
---|
1755 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1756 | endif |
---|
1757 | if (any(cospgridIN%emis_sfc .lt. 0. .OR. cospgridIN%emis_sfc .gt. 1)) then |
---|
1758 | nError=nError+1 |
---|
1759 | errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%emis_sfc contains values out of range' |
---|
1760 | Lrttov_subcolumn = .false. |
---|
1761 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1762 | endif |
---|
1763 | if (any(cospgridIN%u_sfc .lt. -100. .OR. cospgridIN%u_sfc .gt. 100.)) then |
---|
1764 | nError=nError+1 |
---|
1765 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%u_sfc contains values out of range' |
---|
1766 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1767 | Lrttov_subcolumn = .false. |
---|
1768 | endif |
---|
1769 | if (any(cospgridIN%v_sfc .lt. -100. .OR. cospgridIN%v_sfc .gt. 100.)) then |
---|
1770 | nError=nError+1 |
---|
1771 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%v_sfc contains values out of range' |
---|
1772 | Lrttov_subcolumn = .false. |
---|
1773 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1774 | endif |
---|
1775 | if (any(cospgridIN%lat .lt. -90 .OR. cospgridIN%lat .gt. 90)) then |
---|
1776 | nError=nError+1 |
---|
1777 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%lat contains values out of range' |
---|
1778 | Lrttov_subcolumn = .false. |
---|
1779 | if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF |
---|
1780 | endif |
---|
1781 | |
---|
1782 | ! COSP_INPUTS |
---|
1783 | if (cospIN%emsfc_lw .lt. 0. .OR. cospIN%emsfc_lw .gt. 1.) then |
---|
1784 | nError=nError+1 |
---|
1785 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%emsfc_lw contains values out of range' |
---|
1786 | Lisccp_subcolumn = .false. |
---|
1787 | Lisccp_column = .false. |
---|
1788 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1789 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1790 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1791 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1792 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1793 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1794 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1795 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1796 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1797 | |
---|
1798 | endif |
---|
1799 | if (any(cospIN%tau_067 .lt. 0)) then |
---|
1800 | nError=nError+1 |
---|
1801 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tau_067 contains values out of range' |
---|
1802 | Lisccp_subcolumn = .false. |
---|
1803 | Lisccp_column = .false. |
---|
1804 | Lmisr_subcolumn = .false. |
---|
1805 | Lmisr_column = .false. |
---|
1806 | Lmodis_subcolumn = .false. |
---|
1807 | Lmodis_column = .false. |
---|
1808 | |
---|
1809 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1810 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1811 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1812 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1813 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1814 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1815 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1816 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1817 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1818 | if (associated(cospOUT%misr_fq)) cospOUT%misr_fq(:,:,:) = R_UNDEF |
---|
1819 | if (associated(cospOUT%misr_dist_model_layertops)) cospOUT%misr_dist_model_layertops(:,:) = R_UNDEF |
---|
1820 | if (associated(cospOUT%misr_meanztop)) cospOUT%misr_meanztop(:) = R_UNDEF |
---|
1821 | if (associated(cospOUT%misr_cldarea)) cospOUT%misr_cldarea(:) = R_UNDEF |
---|
1822 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1823 | cospOUT%modis_Cloud_Fraction_Total_Mean(:) = R_UNDEF |
---|
1824 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1825 | cospOUT%modis_Cloud_Fraction_Water_Mean(:) = R_UNDEF |
---|
1826 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1827 | cospOUT%modis_Cloud_Fraction_Ice_Mean(:) = R_UNDEF |
---|
1828 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1829 | cospOUT%modis_Cloud_Fraction_High_Mean(:) = R_UNDEF |
---|
1830 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1831 | cospOUT%modis_Cloud_Fraction_Mid_Mean(:) = R_UNDEF |
---|
1832 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1833 | cospOUT%modis_Cloud_Fraction_Low_Mean(:) = R_UNDEF |
---|
1834 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1835 | cospOUT%modis_Optical_Thickness_Total_Mean(:) = R_UNDEF |
---|
1836 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1837 | cospOUT%modis_Optical_Thickness_Water_Mean(:) = R_UNDEF |
---|
1838 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1839 | cospOUT%modis_Optical_Thickness_Ice_Mean(:) = R_UNDEF |
---|
1840 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1841 | cospOUT%modis_Optical_Thickness_Total_LogMean(:) = R_UNDEF |
---|
1842 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1843 | cospOUT%modis_Optical_Thickness_Water_LogMean(:) = R_UNDEF |
---|
1844 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1845 | cospOUT%modis_Optical_Thickness_Ice_LogMean(:) = R_UNDEF |
---|
1846 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1847 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(:) = R_UNDEF |
---|
1848 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1849 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(:) = R_UNDEF |
---|
1850 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1851 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(:) = R_UNDEF |
---|
1852 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1853 | cospOUT%modis_Liquid_Water_Path_Mean(:) = R_UNDEF |
---|
1854 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1855 | cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF |
---|
1856 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1857 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF |
---|
1858 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & |
---|
1859 | cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF |
---|
1860 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & |
---|
1861 | cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:) = R_UNDEF |
---|
1862 | |
---|
1863 | endif |
---|
1864 | if (any(cospIN%emiss_11 .lt. 0. .OR. cospIN%emiss_11 .gt. 1)) then |
---|
1865 | nError=nError+1 |
---|
1866 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%emiss_11 contains values out of range' |
---|
1867 | Lisccp_subcolumn = .false. |
---|
1868 | Lisccp_column = .false. |
---|
1869 | if (associated(cospOUT%isccp_totalcldarea)) cospOUT%isccp_totalcldarea(:) = R_UNDEF |
---|
1870 | if (associated(cospOUT%isccp_meantb)) cospOUT%isccp_meantb(:) = R_UNDEF |
---|
1871 | if (associated(cospOUT%isccp_meantbclr)) cospOUT%isccp_meantbclr(:) = R_UNDEF |
---|
1872 | if (associated(cospOUT%isccp_meanptop)) cospOUT%isccp_meanptop(:) = R_UNDEF |
---|
1873 | if (associated(cospOUT%isccp_meantaucld)) cospOUT%isccp_meantaucld(:) = R_UNDEF |
---|
1874 | if (associated(cospOUT%isccp_meanalbedocld)) cospOUT%isccp_meanalbedocld(:) = R_UNDEF |
---|
1875 | if (associated(cospOUT%isccp_boxtau)) cospOUT%isccp_boxtau(:,:) = R_UNDEF |
---|
1876 | if (associated(cospOUT%isccp_boxptop)) cospOUT%isccp_boxptop(:,:) = R_UNDEF |
---|
1877 | if (associated(cospOUT%isccp_fq)) cospOUT%isccp_fq(:,:,:) = R_UNDEF |
---|
1878 | |
---|
1879 | endif |
---|
1880 | if (any(cospIN%asym .lt. -1. .OR. cospIN%asym .gt. 1)) then |
---|
1881 | nError=nError+1 |
---|
1882 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%asym contains values out of range' |
---|
1883 | Lmodis_subcolumn = .false. |
---|
1884 | Lmodis_column = .false. |
---|
1885 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1886 | cospOUT%modis_Cloud_Fraction_Total_Mean(:) = R_UNDEF |
---|
1887 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1888 | cospOUT%modis_Cloud_Fraction_Water_Mean(:) = R_UNDEF |
---|
1889 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1890 | cospOUT%modis_Cloud_Fraction_Ice_Mean(:) = R_UNDEF |
---|
1891 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1892 | cospOUT%modis_Cloud_Fraction_High_Mean(:) = R_UNDEF |
---|
1893 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1894 | cospOUT%modis_Cloud_Fraction_Mid_Mean(:) = R_UNDEF |
---|
1895 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1896 | cospOUT%modis_Cloud_Fraction_Low_Mean(:) = R_UNDEF |
---|
1897 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1898 | cospOUT%modis_Optical_Thickness_Total_Mean(:) = R_UNDEF |
---|
1899 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1900 | cospOUT%modis_Optical_Thickness_Water_Mean(:) = R_UNDEF |
---|
1901 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1902 | cospOUT%modis_Optical_Thickness_Ice_Mean(:) = R_UNDEF |
---|
1903 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1904 | cospOUT%modis_Optical_Thickness_Total_LogMean(:) = R_UNDEF |
---|
1905 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1906 | cospOUT%modis_Optical_Thickness_Water_LogMean(:) = R_UNDEF |
---|
1907 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1908 | cospOUT%modis_Optical_Thickness_Ice_LogMean(:) = R_UNDEF |
---|
1909 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1910 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(:) = R_UNDEF |
---|
1911 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1912 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(:) = R_UNDEF |
---|
1913 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1914 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(:) = R_UNDEF |
---|
1915 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1916 | cospOUT%modis_Liquid_Water_Path_Mean(:) = R_UNDEF |
---|
1917 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1918 | cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF |
---|
1919 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1920 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF |
---|
1921 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & |
---|
1922 | cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF |
---|
1923 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & |
---|
1924 | cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:) = R_UNDEF |
---|
1925 | endif |
---|
1926 | if (any(cospIN%ss_alb .lt. 0 .OR. cospIN%ss_alb .gt. 1)) then |
---|
1927 | nError=nError+1 |
---|
1928 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%ss_alb contains values out of range' |
---|
1929 | Lmodis_subcolumn = .false. |
---|
1930 | Lmodis_column = .false. |
---|
1931 | if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) & |
---|
1932 | cospOUT%modis_Cloud_Fraction_Total_Mean(:) = R_UNDEF |
---|
1933 | if (associated(cospOUT%modis_Cloud_Fraction_Water_Mean)) & |
---|
1934 | cospOUT%modis_Cloud_Fraction_Water_Mean(:) = R_UNDEF |
---|
1935 | if (associated(cospOUT%modis_Cloud_Fraction_Ice_Mean)) & |
---|
1936 | cospOUT%modis_Cloud_Fraction_Ice_Mean(:) = R_UNDEF |
---|
1937 | if (associated(cospOUT%modis_Cloud_Fraction_High_Mean)) & |
---|
1938 | cospOUT%modis_Cloud_Fraction_High_Mean(:) = R_UNDEF |
---|
1939 | if (associated(cospOUT%modis_Cloud_Fraction_Mid_Mean)) & |
---|
1940 | cospOUT%modis_Cloud_Fraction_Mid_Mean(:) = R_UNDEF |
---|
1941 | if (associated(cospOUT%modis_Cloud_Fraction_Low_Mean)) & |
---|
1942 | cospOUT%modis_Cloud_Fraction_Low_Mean(:) = R_UNDEF |
---|
1943 | if (associated(cospOUT%modis_Optical_Thickness_Total_Mean)) & |
---|
1944 | cospOUT%modis_Optical_Thickness_Total_Mean(:) = R_UNDEF |
---|
1945 | if (associated(cospOUT%modis_Optical_Thickness_Water_Mean)) & |
---|
1946 | cospOUT%modis_Optical_Thickness_Water_Mean(:) = R_UNDEF |
---|
1947 | if (associated(cospOUT%modis_Optical_Thickness_Ice_Mean)) & |
---|
1948 | cospOUT%modis_Optical_Thickness_Ice_Mean(:) = R_UNDEF |
---|
1949 | if (associated(cospOUT%modis_Optical_Thickness_Total_LogMean)) & |
---|
1950 | cospOUT%modis_Optical_Thickness_Total_LogMean(:) = R_UNDEF |
---|
1951 | if (associated(cospOUT%modis_Optical_Thickness_Water_LogMean)) & |
---|
1952 | cospOUT%modis_Optical_Thickness_Water_LogMean(:) = R_UNDEF |
---|
1953 | if (associated(cospOUT%modis_Optical_Thickness_Ice_LogMean)) & |
---|
1954 | cospOUT%modis_Optical_Thickness_Ice_LogMean(:) = R_UNDEF |
---|
1955 | if (associated(cospOUT%modis_Cloud_Particle_Size_Water_Mean)) & |
---|
1956 | cospOUT%modis_Cloud_Particle_Size_Water_Mean(:) = R_UNDEF |
---|
1957 | if (associated(cospOUT%modis_Cloud_Particle_Size_Ice_Mean)) & |
---|
1958 | cospOUT%modis_Cloud_Particle_Size_Ice_Mean(:) = R_UNDEF |
---|
1959 | if (associated(cospOUT%modis_Cloud_Top_Pressure_Total_Mean)) & |
---|
1960 | cospOUT%modis_Cloud_Top_Pressure_Total_Mean(:) = R_UNDEF |
---|
1961 | if (associated(cospOUT%modis_Liquid_Water_Path_Mean)) & |
---|
1962 | cospOUT%modis_Liquid_Water_Path_Mean(:) = R_UNDEF |
---|
1963 | if (associated(cospOUT%modis_Ice_Water_Path_Mean)) & |
---|
1964 | cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF |
---|
1965 | if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & |
---|
1966 | cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF |
---|
1967 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & |
---|
1968 | cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF |
---|
1969 | if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & |
---|
1970 | cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:) = R_UNDEF |
---|
1971 | endif |
---|
1972 | if (any(cospIN%betatot .lt. 0)) then |
---|
1973 | nError=nError+1 |
---|
1974 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%betatot contains values out of range' |
---|
1975 | Lcalipso_subcolumn = .false. |
---|
1976 | Lcalipso_column = .false. |
---|
1977 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1978 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1979 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1980 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1981 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1982 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1983 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
1984 | endif |
---|
1985 | if (any(cospIN%betatot_liq .lt. 0)) then |
---|
1986 | nError=nError+1 |
---|
1987 | errorMessage(nError) = ('ERROR: COSP input variable: cospIN%betatot_liq contains values out of range') |
---|
1988 | Lcalipso_subcolumn = .false. |
---|
1989 | Lcalipso_column = .false. |
---|
1990 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
1991 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
1992 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
1993 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
1994 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
1995 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
1996 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
1997 | endif |
---|
1998 | if (any(cospIN%betatot_ice .lt. 0)) then |
---|
1999 | nError=nError+1 |
---|
2000 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%betatot_ice contains values out of range' |
---|
2001 | Lcalipso_subcolumn = .false. |
---|
2002 | Lcalipso_column = .false. |
---|
2003 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2004 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2005 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2006 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2007 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2008 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2009 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2010 | endif |
---|
2011 | if (any(cospIN%beta_mol .lt. 0)) then |
---|
2012 | nError=nError+1 |
---|
2013 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%beta_mol contains values out of range' |
---|
2014 | Lcalipso_subcolumn = .false. |
---|
2015 | Lcalipso_column = .false. |
---|
2016 | Lcloudsat_column = .false. |
---|
2017 | Lradar_lidar_tcc = .false. |
---|
2018 | Llidar_only_freq_cloud = .false. |
---|
2019 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2020 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2021 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2022 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2023 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2024 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2025 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2026 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
2027 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
2028 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
2029 | endif |
---|
2030 | if (any(cospIN%tautot .lt. 0)) then |
---|
2031 | nError=nError+1 |
---|
2032 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot contains values out of range' |
---|
2033 | Lcalipso_subcolumn = .false. |
---|
2034 | Lcalipso_column = .false. |
---|
2035 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2036 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2037 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2038 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2039 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2040 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2041 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2042 | endif |
---|
2043 | if (any(cospIN%tautot_liq .lt. 0)) then |
---|
2044 | nError=nError+1 |
---|
2045 | errorMessage(nError) = ('ERROR: COSP input variable: cospIN%tautot_liq contains values out of range') |
---|
2046 | Lcalipso_subcolumn = .false. |
---|
2047 | Lcalipso_column = .false. |
---|
2048 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2049 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2050 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2051 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2052 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2053 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2054 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2055 | endif |
---|
2056 | if (any(cospIN%tautot_ice .lt. 0)) then |
---|
2057 | nError=nError+1 |
---|
2058 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_ice contains values out of range' |
---|
2059 | Lcalipso_subcolumn = .false. |
---|
2060 | Lcalipso_column = .false. |
---|
2061 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2062 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2063 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2064 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2065 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2066 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2067 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2068 | endif |
---|
2069 | if (any(cospIN%tau_mol .lt. 0)) then |
---|
2070 | nError=nError+1 |
---|
2071 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tau_mol contains values out of range' |
---|
2072 | Lcalipso_subcolumn = .false. |
---|
2073 | Lcalipso_column = .false. |
---|
2074 | if (associated(cospOUT%calipso_cfad_sr)) cospOUT%calipso_cfad_sr(:,:,:) = R_UNDEF |
---|
2075 | if (associated(cospOUT%calipso_lidarcld)) cospOUT%calipso_lidarcld(:,:) = R_UNDEF |
---|
2076 | if (associated(cospOUT%calipso_lidarcldphase)) cospOUT%calipso_lidarcldphase(:,:,:) = R_UNDEF |
---|
2077 | if (associated(cospOUT%calipso_cldlayer)) cospOUT%calipso_cldlayer(:,:) = R_UNDEF |
---|
2078 | if (associated(cospOUT%calipso_cldlayerphase)) cospOUT%calipso_cldlayerphase(:,:,:) = R_UNDEF |
---|
2079 | if (associated(cospOUT%calipso_lidarcldtmp)) cospOUT%calipso_lidarcldtmp(:,:,:) = R_UNDEF |
---|
2080 | if (associated(cospOUT%calipso_srbval)) cospOUT%calipso_srbval(:) = R_UNDEF |
---|
2081 | endif |
---|
2082 | if (any(cospIN%tautot_S_liq .lt. 0)) then |
---|
2083 | nError=nError+1 |
---|
2084 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_S_liq contains values out of range' |
---|
2085 | Lparasol_subcolumn = .false. |
---|
2086 | Lparasol_column = .false. |
---|
2087 | if (associated(cospOUT%parasolPix_refl)) cospOUT%parasolPix_refl(:,:,:) = R_UNDEF |
---|
2088 | if (associated(cospOUT%parasolGrid_refl)) cospOUT%parasolGrid_refl(:,:) = R_UNDEF |
---|
2089 | endif |
---|
2090 | if (any(cospIN%tautot_S_ice .lt. 0)) then |
---|
2091 | nError=nError+1 |
---|
2092 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_S_ice contains values out of range' |
---|
2093 | Lparasol_subcolumn = .false. |
---|
2094 | Lparasol_column = .false. |
---|
2095 | if (associated(cospOUT%parasolPix_refl)) cospOUT%parasolPix_refl(:,:,:) = R_UNDEF |
---|
2096 | if (associated(cospOUT%parasolGrid_refl)) cospOUT%parasolGrid_refl(:,:) = R_UNDEF |
---|
2097 | endif |
---|
2098 | if (any(cospIN%z_vol_cloudsat .lt. 0)) then |
---|
2099 | nError=nError+1 |
---|
2100 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%z_vol_cloudsat contains values out of range' |
---|
2101 | Lcloudsat_subcolumn = .false. |
---|
2102 | Lcloudsat_column = .false. |
---|
2103 | Lradar_lidar_tcc = .false. |
---|
2104 | Llidar_only_freq_cloud = .false. |
---|
2105 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
2106 | if (associated(cospOUT%cloudsat_Ze_tot)) cospOUT%cloudsat_Ze_tot(:,:,:) = R_UNDEF |
---|
2107 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
2108 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
2109 | endif |
---|
2110 | if (any(cospIN%kr_vol_cloudsat .lt. 0)) then |
---|
2111 | nError=nError+1 |
---|
2112 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%kr_vol_cloudsat contains values out of range' |
---|
2113 | Lcloudsat_subcolumn = .false. |
---|
2114 | Lcloudsat_column = .false. |
---|
2115 | Lradar_lidar_tcc = .false. |
---|
2116 | Llidar_only_freq_cloud = .false. |
---|
2117 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
2118 | if (associated(cospOUT%cloudsat_Ze_tot)) cospOUT%cloudsat_Ze_tot(:,:,:) = R_UNDEF |
---|
2119 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
2120 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
2121 | endif |
---|
2122 | if (any(cospIN%g_vol_cloudsat .lt. 0)) then |
---|
2123 | nError=nError+1 |
---|
2124 | errorMessage(nError) = 'ERROR: COSP input variable: cospIN%g_vol_cloudsat contains values out of range' |
---|
2125 | Lcloudsat_subcolumn = .false. |
---|
2126 | Lcloudsat_column = .false. |
---|
2127 | Lradar_lidar_tcc = .false. |
---|
2128 | Llidar_only_freq_cloud = .false. |
---|
2129 | if (associated(cospOUT%cloudsat_cfad_ze)) cospOUT%cloudsat_cfad_ze(:,:,:) = R_UNDEF |
---|
2130 | if (associated(cospOUT%cloudsat_Ze_tot)) cospOUT%cloudsat_Ze_tot(:,:,:) = R_UNDEF |
---|
2131 | if (associated(cospOUT%lidar_only_freq_cloud)) cospOUT%lidar_only_freq_cloud(:,:) = R_UNDEF |
---|
2132 | if (associated(cospOUT%radar_lidar_tcc)) cospOUT%radar_lidar_tcc(:) = R_UNDEF |
---|
2133 | endif |
---|
2134 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
2135 | ! Part 2: Check input fields array size for consistency. This needs to be done for each |
---|
2136 | ! simulator |
---|
2137 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
2138 | ! ISCCP |
---|
2139 | if (size(cospIN%frac_out,1) .ne. cospIN%Npoints .OR. & |
---|
2140 | size(cospIN%tau_067,1) .ne. cospIN%Npoints .OR. & |
---|
2141 | size(cospIN%emiss_11,1) .ne. cospIN%Npoints .OR. & |
---|
2142 | size(cospgridIN%skt) .ne. cospIN%Npoints .OR. & |
---|
2143 | size(cospgridIN%qv,1) .ne. cospIN%Npoints .OR. & |
---|
2144 | size(cospgridIN%at,1) .ne. cospIN%Npoints .OR. & |
---|
2145 | size(cospgridIN%phalf,1) .ne. cospIN%Npoints .OR. & |
---|
2146 | size(cospgridIN%sunlit) .ne. cospIN%Npoints .OR. & |
---|
2147 | size(cospgridIN%pfull,1) .ne. cospIN%Npoints) then |
---|
2148 | Lisccp_subcolumn = .false. |
---|
2149 | Lisccp_column = .false. |
---|
2150 | nError=nError+1 |
---|
2151 | errorMessage(nError) = 'ERROR(isccp_simulator): The number of points in the input fields are inconsistent' |
---|
2152 | endif |
---|
2153 | if (size(cospIN%frac_out,2) .ne. cospIN%Ncolumns .OR. & |
---|
2154 | size(cospIN%tau_067,2) .ne. cospIN%Ncolumns .OR. & |
---|
2155 | size(cospIN%emiss_11,2) .ne. cospIN%Ncolumns) then |
---|
2156 | Lisccp_subcolumn = .false. |
---|
2157 | Lisccp_column = .false. |
---|
2158 | nError=nError+1 |
---|
2159 | errorMessage(nError) = 'ERROR(isccp_simulator): The number of sub-columns in the input fields are inconsistent' |
---|
2160 | endif |
---|
2161 | if (size(cospIN%frac_out,3) .ne. cospIN%Nlevels .OR. & |
---|
2162 | size(cospIN%tau_067,3) .ne. cospIN%Nlevels .OR. & |
---|
2163 | size(cospIN%emiss_11,3) .ne. cospIN%Nlevels .OR. & |
---|
2164 | size(cospgridIN%qv,2) .ne. cospIN%Nlevels .OR. & |
---|
2165 | size(cospgridIN%at,2) .ne. cospIN%Nlevels .OR. & |
---|
2166 | size(cospgridIN%pfull,2) .ne. cospIN%Nlevels .OR. & |
---|
2167 | size(cospgridIN%phalf,2) .ne. cospIN%Nlevels+1) then |
---|
2168 | Lisccp_subcolumn = .false. |
---|
2169 | Lisccp_column = .false. |
---|
2170 | nError=nError+1 |
---|
2171 | errorMessage(nError) = 'ERROR(isccp_simulator): The number of levels in the input fields are inconsistent' |
---|
2172 | endif |
---|
2173 | |
---|
2174 | ! MISR |
---|
2175 | if (size(cospIN%tau_067,1) .ne. cospIN%Npoints .OR. & |
---|
2176 | size(cospgridIN%sunlit) .ne. cospIN%Npoints .OR. & |
---|
2177 | size(cospgridIN%hgt_matrix,1) .ne. cospIN%Npoints .OR. & |
---|
2178 | size(cospgridIN%at,1) .ne. cospIN%Npoints) then |
---|
2179 | Lmisr_subcolumn = .false. |
---|
2180 | Lmisr_column = .false. |
---|
2181 | nError=nError+1 |
---|
2182 | errorMessage(nError) = 'ERROR(misr_simulator): The number of points in the input fields are inconsistent' |
---|
2183 | endif |
---|
2184 | if (size(cospIN%tau_067,2) .ne. cospIN%Ncolumns) then |
---|
2185 | Lmisr_subcolumn = .false. |
---|
2186 | Lmisr_column = .false. |
---|
2187 | nError=nError+1 |
---|
2188 | errorMessage(nError) = 'ERROR(misr_simulator): The number of sub-columns in the input fields are inconsistent' |
---|
2189 | endif |
---|
2190 | if (size(cospIN%tau_067,3) .ne. cospIN%Nlevels .OR. & |
---|
2191 | size(cospgridIN%hgt_matrix,2) .ne. cospIN%Nlevels .OR. & |
---|
2192 | size(cospgridIN%at,2) .ne. cospIN%Nlevels) then |
---|
2193 | Lmisr_subcolumn = .false. |
---|
2194 | Lmisr_column = .false. |
---|
2195 | nError=nError+1 |
---|
2196 | errorMessage(nError) = 'ERROR(misr_simulator): The number of levels in the input fields are inconsistent' |
---|
2197 | endif |
---|
2198 | |
---|
2199 | ! MODIS |
---|
2200 | if (size(cospIN%fracLiq,1) .ne. cospIN%Npoints .OR. & |
---|
2201 | size(cospIN%tau_067,1) .ne. cospIN%Npoints .OR. & |
---|
2202 | size(cospIN%asym,1) .ne. cospIN%Npoints .OR. & |
---|
2203 | size(cospIN%ss_alb,1) .ne. cospIN%Npoints) then |
---|
2204 | Lmodis_subcolumn = .false. |
---|
2205 | Lmodis_column = .false. |
---|
2206 | nError=nError+1 |
---|
2207 | errorMessage(nError) = 'ERROR(modis_simulator): The number of points in the input fields are inconsistent' |
---|
2208 | endif |
---|
2209 | if (size(cospIN%fracLiq,2) .ne. cospIN%Ncolumns .OR. & |
---|
2210 | size(cospIN%tau_067,2) .ne. cospIN%Ncolumns .OR. & |
---|
2211 | size(cospIN%asym,2) .ne. cospIN%Ncolumns .OR. & |
---|
2212 | size(cospIN%ss_alb,2) .ne. cospIN%Ncolumns) then |
---|
2213 | Lmodis_subcolumn = .false. |
---|
2214 | Lmodis_column = .false. |
---|
2215 | nError=nError+1 |
---|
2216 | errorMessage(nError) = 'ERROR(modis_simulator): The number of sub-columns in the input fields are inconsistent' |
---|
2217 | endif |
---|
2218 | if (size(cospIN%fracLiq,3) .ne. cospIN%Nlevels .OR. & |
---|
2219 | size(cospIN%tau_067,3) .ne. cospIN%Nlevels .OR. & |
---|
2220 | size(cospIN%asym,3) .ne. cospIN%Nlevels .OR. & |
---|
2221 | size(cospIN%ss_alb,3) .ne. cospIN%Nlevels) then |
---|
2222 | Lmodis_subcolumn = .false. |
---|
2223 | Lmodis_column = .false. |
---|
2224 | nError=nError+1 |
---|
2225 | errorMessage(nError) = 'ERROR(modis_simulator): The number of levels in the input fields are inconsistent' |
---|
2226 | endif |
---|
2227 | |
---|
2228 | ! CLOUDSAT |
---|
2229 | if (size(cospIN%z_vol_cloudsat,1) .ne. cospIN%Npoints .OR. & |
---|
2230 | size(cospIN%kr_vol_cloudsat,1) .ne. cospIN%Npoints .OR. & |
---|
2231 | size(cospIN%g_vol_cloudsat,1) .ne. cospIN%Npoints .OR. & |
---|
2232 | size(cospgridIN%hgt_matrix,1) .ne. cospIN%Npoints) then |
---|
2233 | Lcloudsat_subcolumn = .false. |
---|
2234 | Lcloudsat_column = .false. |
---|
2235 | nError=nError+1 |
---|
2236 | errorMessage(nError) = 'ERROR(cloudsat_simulator): The number of points in the input fields are inconsistent' |
---|
2237 | endif |
---|
2238 | if (size(cospIN%z_vol_cloudsat,2) .ne. cospIN%Ncolumns .OR. & |
---|
2239 | size(cospIN%kr_vol_cloudsat,2) .ne. cospIN%Ncolumns .OR. & |
---|
2240 | size(cospIN%g_vol_cloudsat,2) .ne. cospIN%Ncolumns) then |
---|
2241 | Lcloudsat_subcolumn = .false. |
---|
2242 | Lcloudsat_column = .false. |
---|
2243 | nError=nError+1 |
---|
2244 | errorMessage(nError) = 'ERROR(cloudsat_simulator): The number of sub-columns in the input fields are inconsistent' |
---|
2245 | endif |
---|
2246 | if (size(cospIN%z_vol_cloudsat,3) .ne. cospIN%Nlevels .OR. & |
---|
2247 | size(cospIN%kr_vol_cloudsat,3) .ne. cospIN%Nlevels .OR. & |
---|
2248 | size(cospIN%g_vol_cloudsat,3) .ne. cospIN%Nlevels .OR. & |
---|
2249 | size(cospgridIN%hgt_matrix,2) .ne. cospIN%Nlevels) then |
---|
2250 | Lcloudsat_subcolumn = .false. |
---|
2251 | Lcloudsat_column = .false. |
---|
2252 | nError=nError+1 |
---|
2253 | errorMessage(nError) = 'ERROR(cloudsat_simulator): The number of levels in the input fields are inconsistent' |
---|
2254 | endif |
---|
2255 | |
---|
2256 | ! CALIPSO |
---|
2257 | if (size(cospIN%beta_mol,1) .ne. cospIN%Npoints .OR. & |
---|
2258 | size(cospIN%betatot,1) .ne. cospIN%Npoints .OR. & |
---|
2259 | size(cospIN%betatot_liq,1) .ne. cospIN%Npoints .OR. & |
---|
2260 | size(cospIN%betatot_ice,1) .ne. cospIN%Npoints .OR. & |
---|
2261 | size(cospIN%tau_mol,1) .ne. cospIN%Npoints .OR. & |
---|
2262 | size(cospIN%tautot,1) .ne. cospIN%Npoints .OR. & |
---|
2263 | size(cospIN%tautot_liq,1) .ne. cospIN%Npoints .OR. & |
---|
2264 | size(cospIN%tautot_ice,1) .ne. cospIN%Npoints) then |
---|
2265 | Lcalipso_subcolumn = .false. |
---|
2266 | Lcalipso_column = .false. |
---|
2267 | nError=nError+1 |
---|
2268 | errorMessage(nError) = 'ERROR(calipso_simulator): The number of points in the input fields are inconsistent' |
---|
2269 | endif |
---|
2270 | if (size(cospIN%betatot,2) .ne. cospIN%Ncolumns .OR. & |
---|
2271 | size(cospIN%betatot_liq,2) .ne. cospIN%Ncolumns .OR. & |
---|
2272 | size(cospIN%betatot_ice,2) .ne. cospIN%Ncolumns .OR. & |
---|
2273 | size(cospIN%tautot,2) .ne. cospIN%Ncolumns .OR. & |
---|
2274 | size(cospIN%tautot_liq,2) .ne. cospIN%Ncolumns .OR. & |
---|
2275 | size(cospIN%tautot_ice,2) .ne. cospIN%Ncolumns) then |
---|
2276 | Lcalipso_subcolumn = .false. |
---|
2277 | Lcalipso_column = .false. |
---|
2278 | nError=nError+1 |
---|
2279 | errorMessage(nError) = 'ERROR(calipso_simulator): The number of sub-columns in the input fields are inconsistent' |
---|
2280 | endif |
---|
2281 | if (size(cospIN%beta_mol,2) .ne. cospIN%Nlevels .OR. & |
---|
2282 | size(cospIN%betatot,3) .ne. cospIN%Nlevels .OR. & |
---|
2283 | size(cospIN%betatot_liq,3) .ne. cospIN%Nlevels .OR. & |
---|
2284 | size(cospIN%betatot_ice,3) .ne. cospIN%Nlevels .OR. & |
---|
2285 | size(cospIN%tau_mol,2) .ne. cospIN%Nlevels .OR. & |
---|
2286 | size(cospIN%tautot,3) .ne. cospIN%Nlevels .OR. & |
---|
2287 | size(cospIN%tautot_liq,3) .ne. cospIN%Nlevels .OR. & |
---|
2288 | size(cospIN%tautot_ice,3) .ne. cospIN%Nlevels) then |
---|
2289 | Lcalipso_subcolumn = .false. |
---|
2290 | Lcalipso_column = .false. |
---|
2291 | nError=nError+1 |
---|
2292 | errorMessage(nError) = 'ERROR(calipso_simulator): The number of levels in the input fields are inconsistent' |
---|
2293 | endif |
---|
2294 | |
---|
2295 | ! PARASOL |
---|
2296 | if (size(cospIN%tautot_S_liq,1) .ne. cospIN%Npoints .OR. & |
---|
2297 | size(cospIN%tautot_S_ice,1) .ne. cospIN%Npoints) then |
---|
2298 | Lparasol_subcolumn = .false. |
---|
2299 | Lparasol_column = .false. |
---|
2300 | nError=nError+1 |
---|
2301 | errorMessage(nError) = 'ERROR(parasol_simulator): The number of points in the input fields are inconsistent' |
---|
2302 | endif |
---|
2303 | if (size(cospIN%tautot_S_liq,2) .ne. cospIN%Ncolumns .OR. & |
---|
2304 | size(cospIN%tautot_S_ice,2) .ne. cospIN%Ncolumns) then |
---|
2305 | Lparasol_subcolumn = .false. |
---|
2306 | Lparasol_column = .false. |
---|
2307 | nError=nError+1 |
---|
2308 | errorMessage(nError) = 'ERROR(parasol_simulator): The number of levels in the input fields are inconsistent' |
---|
2309 | endif |
---|
2310 | |
---|
2311 | ! RTTOV |
---|
2312 | if (size(cospgridIN%pfull,1) .ne. cospIN%Npoints .OR. & |
---|
2313 | size(cospgridIN%at,1) .ne. cospIN%Npoints .OR. & |
---|
2314 | size(cospgridIN%qv,1) .ne. cospIN%Npoints .OR. & |
---|
2315 | size(cospgridIN%hgt_matrix_half,1) .ne. cospIN%Npoints .OR. & |
---|
2316 | size(cospgridIN%u_sfc) .ne. cospIN%Npoints .OR. & |
---|
2317 | size(cospgridIN%v_sfc) .ne. cospIN%Npoints .OR. & |
---|
2318 | size(cospgridIN%skt) .ne. cospIN%Npoints .OR. & |
---|
2319 | size(cospgridIN%phalf,1) .ne. cospIN%Npoints .OR. & |
---|
2320 | size(cospgridIN%qv,1) .ne. cospIN%Npoints .OR. & |
---|
2321 | size(cospgridIN%land) .ne. cospIN%Npoints .OR. & |
---|
2322 | size(cospgridIN%lat) .ne. cospIN%Npoints) then |
---|
2323 | Lrttov_subcolumn = .false. |
---|
2324 | Lrttov_column = .false. |
---|
2325 | nError=nError+1 |
---|
2326 | errorMessage(nError) = 'ERROR(rttov_simulator): The number of points in the input fields are inconsistent' |
---|
2327 | endif |
---|
2328 | if (size(cospgridIN%pfull,2) .ne. cospIN%Nlevels .OR. & |
---|
2329 | size(cospgridIN%at,2) .ne. cospIN%Nlevels .OR. & |
---|
2330 | size(cospgridIN%qv,2) .ne. cospIN%Nlevels .OR. & |
---|
2331 | size(cospgridIN%hgt_matrix_half,2) .ne. cospIN%Nlevels+1 .OR. & |
---|
2332 | size(cospgridIN%phalf,2) .ne. cospIN%Nlevels+1 .OR. & |
---|
2333 | size(cospgridIN%qv,2) .ne. cospIN%Nlevels) then |
---|
2334 | Lrttov_subcolumn = .false. |
---|
2335 | Lrttov_column = .false. |
---|
2336 | nError=nError+1 |
---|
2337 | errorMessage(nError) = 'ERROR(rttov_simulator): The number of levels in the input fields are inconsistent' |
---|
2338 | endif |
---|
2339 | |
---|
2340 | end subroutine cosp_errorCheck |
---|
2341 | |
---|
2342 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
2343 | ! END MODULE |
---|
2344 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
2345 | END MODULE MOD_COSP |
---|