Go to the documentation of this file. 1 subroutine ch_cld_sci( tdat, nv, ubdat, nubyte, i32dat, ni32, &
2 sensor_id, cloud_hgt_file )
20 integer :: npix, nlin, nbnd, nbnd_albedo, nlvl_model, scan, st_samp, &
22 common /dim_ctl/ npix, nlin, nbnd, nbnd_albedo, nlvl_model, scan, st_samp, &
24 integer :: nv, i,j,k, na, off, nubyte, ni32, sensor_id
25 real,
dimension(nv) :: tdat
26 integer,
dimension(3) :: dim_3
27 integer*1,
dimension(nubyte) :: ubdat
28 integer,
dimension(ni32) :: i32dat
29 character(len=500) :: cloud_hgt_file
34 if( .not.
allocated(
c2_refl ) )
then
35 allocate(
c2_refl(npix, nlin, nbnd))
39 allocate(
c2_lat(npix, nlin))
40 allocate(
c2_lon(npix, nlin))
102 na = npix * nbnd * nlin
106 c2_refl = reshape( tdat(1:na), (/ npix, nbnd, nlin /) )
109 na = npix * nbnd_albedo * nlin
110 c2_bnd_unc = reshape( tdat(1+off:na+off), (/ npix, nbnd_albedo, nlin /) )
121 c2_lat = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
124 c2_lon = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
127 c2_senz = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
130 c2_sena = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
133 c2_sola = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
136 c2_solz = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
139 c2_relaz = reshape( tdat(1+off:na+off), (/ npix, nlin /) )
143 na = npix * nlin * nlvl_model
144 c2_prof_mixr = reshape( tdat(1+off:na+off), (/npix, nlin,nlvl_model/) )
147 c2_prof_t = reshape( tdat(1+off:na+off), (/npix, nlin,nlvl_model/) )
150 c2_prof_p = reshape( tdat(1+off:na+off), (/npix, nlin,nlvl_model/) )
153 c2_prof_hgt = reshape( tdat(1+off:na+off), (/npix, nlin,nlvl_model/) )
157 c2_tsfc = reshape( tdat(1+off:na+off), (/npix, nlin/) )
160 c2_psfc = reshape( tdat(1+off:na+off), (/npix, nlin/) )
163 c2_wind = reshape( tdat(1+off:na+off), (/npix, nlin/) )
166 c2_tot_o3 = reshape( tdat(1+off:na+off), (/npix, nlin/) )
169 c2_ice_frac = reshape( tdat(1+off:na+off), (/npix, nlin/) )
172 c2_snow_frac = reshape( tdat(1+off:na+off), (/npix, nlin/) )
175 c2_alt_o3 = reshape( tdat(1+off:na+off), (/npix, nlin/) )
178 c2_alt_icec = reshape( tdat(1+off:na+off), (/npix, nlin/) )
181 c2_sfc_albedo = reshape( tdat(1+off:na*5+off), (/npix, nlin, 5/))
186 c2_sfc_lvl = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
189 c2_trop_lvl = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
193 c2_cld_det = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
196 c2_conf_cld = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
199 c2_clr_66 = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
202 c2_clr_95 = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
205 c2_clr_99 = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
208 c2_sno_sfc = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
211 c2_wtr_sfc = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
214 c2_coast_sfc = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
217 c2_desert_sfc = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
220 c2_lnd_sfc = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
223 c2_night = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
226 c2_glint = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
232 c2_ocean_snow = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
238 c2_lnd_snow = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
241 c2_tst_h_138 = reshape( ubdat(1+off:na+off), (/npix, nlin/) )
354 integer :: prod_num, n_prd, iprd
356 real,
dimension(n_prd,c2_npix) :: prod_array
358 integer,
parameter :: CAT_Cld_p = 469, cat_cld_t = 470, cat_cer_2100 = 445
359 integer,
parameter :: CAT_CER_1600 = 446, cat_cot_2100 = 447
360 integer,
parameter :: CAT_COT_1600 = 448, cat_cer_1621 = 449
361 integer,
parameter :: CAT_COT_1621 = 450, cat_cwp_2100 = 451
362 integer,
parameter :: CAT_CWP_1621 = 452, cat_cwp_1600 = 453
367 integer,
parameter :: CAT_Cld_Top_Refl_650 = 459
368 integer,
parameter :: CAT_Cld_Top_Refl_860 = 460, cat_cld_top_refl_1200 = 461
369 integer,
parameter :: CAT_Cld_Top_Refl_1600 = 462, cat_cld_top_refl_2100 = 463
370 integer,
parameter :: CAT_Surface_Albedo_650 = 464, cat_surface_albedo_860 = 465
371 integer,
parameter :: CAT_Surface_Albedo_1200 = 466
372 integer,
parameter :: CAT_Surface_Albedo_1600 = 467
373 integer,
parameter :: CAT_Surface_Albedo_2100 = 468
375 integer,
parameter :: CAT_COT_fail_2100 = 471
376 integer,
parameter :: CAT_COT_fail_1600 = 472
377 integer,
parameter :: CAT_COT_fail_1621 = 473
378 integer,
parameter :: CAT_CER_fail_2100 = 474
379 integer,
parameter :: CAT_CER_fail_1600 = 475
380 integer,
parameter :: CAT_CER_fail_1621 = 476
381 integer,
parameter :: CAT_CMP_fail_pct_2100 = 477
382 integer,
parameter :: CAT_CMP_fail_pct_1600 = 478
383 integer,
parameter :: CAT_CMP_fail_pct_1621 = 479
384 integer,
parameter :: CAT_refl_loc_1600 = 480
385 integer,
parameter :: CAT_refl_loc_2100 = 481
386 integer,
parameter :: CAT_refl_loc_1621 = 482
388 real,
parameter :: bad_float = -32767.
392 select case( prod_num )
415 case( cat_cld_top_refl_650 )
417 case( cat_cld_top_refl_860 )
419 case( cat_cld_top_refl_1200 )
421 case( cat_cld_top_refl_1600 )
423 case( cat_cld_top_refl_2100 )
425 case( cat_surface_albedo_650 )
427 case( cat_surface_albedo_860 )
429 case( cat_surface_albedo_1200 )
431 case( cat_surface_albedo_1600 )
433 case( cat_surface_albedo_2100 )
436 case( cat_cot_fail_2100 )
438 case( cat_cot_fail_1600 )
440 case( cat_cot_fail_1621 )
442 case( cat_cer_fail_2100 )
444 case( cat_cer_fail_1600 )
446 case( cat_cer_fail_1621 )
448 case( cat_cmp_fail_pct_2100 )
450 case( cat_cmp_fail_pct_1600 )
452 case( cat_cmp_fail_pct_1621 )
454 case( cat_refl_loc_1600 )
458 case( cat_refl_loc_2100 )
462 case( cat_refl_loc_1621 )
467 print*,
"Improper product ID, case encountered, ID:", prod_num
468 prod_array = bad_float
472 where(prod_array < -900. )
473 prod_array = bad_float
488 integer :: prod_num, lin_mid
489 integer*1,
dimension(c2_npix) :: bprod
490 integer,
parameter :: CAT_Cld_Sfc_Type = 454, cat_cld_phase_2100 = 455
491 integer,
parameter :: CAT_Cld_Non_Abs_Band = 456, cat_cld_phase_1600 = 457
492 integer,
parameter :: CAT_Cld_Phase_1621 = 458
498 prod_sel:
select case( prod_num )
499 case( cat_cld_sfc_type )
501 where(
cloudmask(:,lin_mid)%ocean_snow == 1 ) &
503 where(
cloudmask(:,lin_mid)%land_no_snow == 1 ) &
505 where(
cloudmask(:,lin_mid)%land_snow == 1 ) &
507 case( cat_cld_phase_2100 )
510 bprod(i) = ibclr( bprod(i), 3 )
512 case( cat_cld_non_abs_band )
514 case( cat_cld_phase_1600 )
517 bprod(i) = ibclr( bprod(i), 3 )
519 case( cat_cld_phase_1621 )
522 bprod(i) = ibclr( bprod(i), 3 )
525 print*,
"Improper product ID, case encountered, ID:", prod_num
real, dimension(:,:), allocatable c2_alt_icec
integer *1, dimension(:,:), allocatable c2_trop_lvl
real, dimension(:,:), allocatable c2_psfc
integer, dimension(:,:), allocatable c2_alt_snowice
integer *1, dimension(:,:), allocatable c2_wtr_sfc
real(single), dimension(:,:), allocatable liquid_water_path
integer *1, dimension(:,:), allocatable c2_clr_99
real, dimension(:,:,:), allocatable c2_prof_hgt
real, dimension(:,:,:), allocatable c2_bnd_unc
integer *1, dimension(:,:), allocatable c2_sno_sfc
real, dimension(:,:), allocatable c2_lon
type(cloudmask_type), dimension(:,:), allocatable cloudmask
integer *1, dimension(:,:), allocatable c2_appl_hcld_138
real(single), dimension(:,:), allocatable cloud_top_pressure
integer *1, dimension(:,:), allocatable c2_vis_cld_250
real, dimension(:,:), allocatable c2_sena
integer *1, dimension(:,:), allocatable c2_tst_h_138
integer *1, dimension(:,:), allocatable c2_ocean_snow
integer *1, dimension(:,:), allocatable c2_desert_sfc
real, dimension(:), allocatable c2_unc_sf
unsigned char * get_cmp_byt(l2str *l2rec, int prodnum)
real, dimension(:,:,:), allocatable c2_prof_mixr
real, dimension(:,:,:), allocatable prd_out_refl_loc_1600
real, dimension(:,:), allocatable c2_solz
real, dimension(:,:,:), allocatable c2_sfc_albedo
real, dimension(:,:,:), allocatable atm_corr_refl
type(failed_type), dimension(:,:), allocatable failure_metric_1621
real, dimension(:,:,:), allocatable surface_albedo
integer *1, dimension(:,:), allocatable c2_night
real, dimension(:,:), allocatable c2_lat
real, dimension(:,:), allocatable c2_tsfc
type(failed_type), dimension(:,:), allocatable failure_metric_16
integer *1, dimension(:,:), allocatable c2_cld_det
integer *1, dimension(:,:), allocatable c2_appl_vis_refl
real, dimension(:,:), allocatable c2_relaz
real(single), dimension(:,:), allocatable optical_thickness_final
subroutine get_cmp_prod(prod_num, prod_array, n_prd)
real, dimension(:,:), allocatable c2_ice_frac
type(failed_type), dimension(:,:), allocatable failure_metric
integer *1, dimension(:,:), allocatable c2_tst_vis_refl
real(single), dimension(:,:), allocatable liquid_water_path_1621
character(len=500) c2_cloud_hgt_file
subroutine ch_cld_sci(tdat, nv, ubdat, nubyte, i32dat, ni32, sensor_id, cloud_hgt_file)
integer *1, dimension(:,:), allocatable c2_coast_sfc
integer *1, dimension(:,:), allocatable c2_glint
integer *1, dimension(:,:), allocatable c2_lnd_snow
subroutine zero_surround()
real, dimension(:,:,:), allocatable c2_prof_p
real(single), dimension(:,:), allocatable cloud_top_temperature
real, dimension(:,:,:), allocatable prd_out_refl_loc_1621
integer *1, dimension(:,:), allocatable c2_lnd_sfc
integer *1, dimension(:,:), allocatable c2_tst_vis_ratio
real(single), dimension(:,:), allocatable optical_thickness_1621_final
integer *1, dimension(:,:), allocatable c2_appl_vis_nir_ratio
integer *1, dimension(:,:), allocatable c2_clr_95
type(qualityanalysis), dimension(:,:), allocatable processing_information
integer *1, dimension(:,:), allocatable c2_lnd_no_snow
real(single), dimension(:,:), allocatable liquid_water_path_16
integer *1, dimension(:,:), allocatable c2_ocean_no_snow
integer *1, dimension(:,:), allocatable c2_sfc_lvl
real, dimension(:,:), allocatable c2_alt_o3
real(single), dimension(:,:), allocatable optical_thickness_16_final
real(single), dimension(:,:), allocatable effective_radius_16_final
integer *1, dimension(:,:), allocatable c2_clr_66
real, dimension(:,:), allocatable c2_snow_frac
real, dimension(:,:), allocatable c2_wind
real, dimension(:,:), allocatable c2_senz
real, dimension(:,:,:), allocatable prd_out_refl_loc_2100
real, dimension(:,:,:), allocatable c2_prof_t
real(single), dimension(:,:), allocatable effective_radius_1621_final
real, dimension(:,:), allocatable c2_sola
subroutine driver_mod_pr06od()
real, dimension(:), allocatable c2_spec_unc
real, dimension(:,:), allocatable c2_tot_o3
integer *1, dimension(:), allocatable c2_cmp_there
integer *1, dimension(:,:), allocatable c2_conf_cld
real, dimension(:,:,:), allocatable c2_refl
real(single), dimension(:,:), allocatable effective_radius_21_final