ocssw
V2022
|
modis_science_module.f90
Go to the documentation of this file.
138 integer :: na_band_used, r1r2wavelengthidx(2), absorbingband_index, uncertainty_nonabsorbing_1621
139 real:: corr_meas(set_number_of_bands), temp_meas(set_number_of_bands), alb_meas(set_albedo_bands)
249 ! do not process lines 1 and 1354 of the data because there are issues with cloud mask, particularly for the last line
251 if (iterationx == 1 .and. i==1 .or. iterationx == number_of_iterationsx .and. i==xdimension ) then
315 scattering_angle = scatangle(solar_zenith_angle(i,j),sensor_zenith_angle(i,j),relative_azimuth_angle(i,j))
320 ! we have to set cloudy/not cloudy and surface type outside the cloud phase call so the retrieval actually works.
332 if (cloudmask(i,j)%land_surface .or. cloudmask(i,j)%coastal_surface .or. cloudmask(i,j)%desert_surface) then
375 call get_model_idx_geos5(geos5_istart, geos5_jstart, latitude(i,j), longitude(i,j), model_i, model_j)
535 bprime_ts = ( modis_planck(platform_name, surface_temperature(i,j) + delta_ts, channel_37um, 1) - &
657 ! set the baum phase according to the "Cloud_Phase_Infrared_1km" SDS (to pass to cloud phase and multi-layer alg.)
664 if (cloud_phase_infrared(i,j) == 1 .or. cloud_phase_infrared(i,j) == 2) ir_cloudphase%unknowncloud = 0
724 ! we need to compute water path, multilayer and uncertainty and set the tau_out_of_bounds QA bit
832 ! the new setting indicates flagging of tau only if it's more than 150. All others are considered perfectly valid
935 ! to do the 3.7um uncertainty, it is not enough to replace the re and tau with the 3.7um values. It is also
936 ! necessary to set the absorbingband_index to be 3.7um to feed the libraries in. In addition to that
938 ! If you fail to do so, you will end up with a royal mess and not know why the numbers don't make sense.
952 ! if ((nearest_used(re21) == 0 .or. (nearest_used(re21) == 1 .and. optical_thickness_final(i,j) == MAX_TAU_RTRIEVED ))&
953 ! .and. (optical_thickness_final(i,j) .ge. 0.01) .and. (effective_radius_21_final(i,j) .ge. 0.01) .and. &
954 ! (cloudsummary(i,j)%icecloud .or. cloudsummary(i,j)%watercloud .or. cloudsummary(i,j)%unknowncloud)) then!{
989 exp(band_uncertainty(uncertain_start,absorbingband_index, j)*1.0 / uncertain_sf(absorbingband_index)) * 0.01
992 if (set_bands(na_band_used) < set_bands(band_0124)) unc_reflectance(1) = max(vnir_error, unc_reflectance(1))
993 if (set_bands(na_band_used) >= set_bands(band_0124)) unc_reflectance(1) = max(swir_error, unc_reflectance(1))
994 if (set_bands(absorbingband_index) >= set_bands(band_0124)) unc_reflectance(2) = max(swir_error, unc_reflectance(2))
1045 if ((nearest_used(re16) == 0 .or. (nearest_used(re16) == 1 .and. optical_thickness_16_final(i,j) == max_tau_rtrieved ))&
1046 .and. (optical_thickness_16_final(i,j) .ge. 0.01) .and. (effective_radius_16_final(i,j) .ge. 0.01) .and. &
1047 (cloudsummary(i,j)%icecloud .or. cloudsummary(i,j)%watercloud .or. cloudsummary(i,j)%unknowncloud) &
1069 exp(band_uncertainty(uncertain_start,absorbingband_index, j)*1.0 / uncertain_sf(absorbingband_index)) * 0.01
1071 if (set_bands(na_band_used) < set_bands(band_0124)) unc_reflectance(1) = max(vnir_error, unc_reflectance(1))
1072 if (set_bands(na_band_used) >= set_bands(band_0124)) unc_reflectance(1) = max(swir_error, unc_reflectance(1))
1073 if (set_bands(absorbingband_index) >= set_bands(band_0124)) unc_reflectance(2) = max(swir_error, unc_reflectance(2))
1117 if ((nearest_used(re37) == 0 .or. (nearest_used(re37) == 1 .and. optical_thickness_37_final(i,j) == max_tau_rtrieved ))&
1118 .and. (optical_thickness_37_final(i,j) .ge. 0.01) .and. (effective_radius_37_final(i,j) .ge. 0.01) .and. &
1119 (cloudsummary(i,j)%icecloud .or. cloudsummary(i,j)%watercloud .or. cloudsummary(i,j)%unknowncloud) &
1144 if (set_bands(na_band_used) < set_bands(band_0124)) unc_reflectance(1) = max(vnir_error, unc_reflectance(1))
1145 if (set_bands(na_band_used) >= set_bands(band_0124)) unc_reflectance(1) = max(swir_error, unc_reflectance(1))
1146 if (set_bands(absorbingband_index) >= set_bands(band_0124) .and. set_bands(absorbingband_index) <= set_bands(band_0213)) &
1188 if ((nearest_used(re1621) == 0 .or. (nearest_used(re1621) == 1 .and. optical_thickness_1621_final(i,j) == max_tau_rtrieved ))&
1189 .and. (optical_thickness_1621_final(i,j) .ge. 0.01) .and. (effective_radius_1621_final(i,j) .ge. 0.01) .and. &
1190 (cloudsummary(i,j)%icecloud .or. cloudsummary(i,j)%watercloud .or. cloudsummary(i,j)%unknowncloud) &
1215 exp(band_uncertainty(uncertain_start,absorbingband_index, j)*1.0 / uncertain_sf(absorbingband_index)) * 0.01
1217 if (set_bands(uncertainty_nonabsorbing_1621) < set_bands(band_0124)) unc_reflectance(1) = max(vnir_error, unc_reflectance(1))
1218 if (set_bands(uncertainty_nonabsorbing_1621) >= set_bands(band_0124)) unc_reflectance(1) = max(swir_error, unc_reflectance(1))
1219 if (set_bands(absorbingband_index) >= set_bands(band_0124)) unc_reflectance(2) = max(swir_error, unc_reflectance(2))
1307 ! Check if 1km visible reflectance threshold or VIS/NIR ratio tests are applied and cloudy. Clear sky restoral
1308 ! Part V (CSR=3) test will only be applied over ocean if vis1km_test = .true. (i.e., either one of visible
1312 if ((cloudmask(i,j)%applied_visiblereflectance==1 .and. cloudmask(i,j)%test_visiblereflectance==1) .or. &
1313 (cloudmask(i,j)%applied_visnirratio==1 .and. cloudmask(i,j)%test_visnirratio==1) ) vis1km_test = .true.
1349 aod550_store(i,j) = (exp(aod550) - 0.01) ! that's so it can be stored in a good way in an RE sds
1508 ! print*, abovecloud_watervapor(14,884), cloud_top_pressure(14,884), surface_temperature(14,884)
1586 temp_16 = linearinterpolation( (/1.24, 2.13/), (/corr_meas(band_0124), corr_meas(band_0213)/), 1.63)
1603 sca, saz, sza, vaz, vza, 0.0d0, albedo_real4(band_0065)*1.0d0 /) ! this is really a 550nm albedo
1608 temp_16 = linearinterpolation( (/1.24, 2.13/), (/corr_meas(band_0124), corr_meas(band_0213)/), 1.63)
Definition: ch_xfr.f90:1
integer *2, dimension(:,:), allocatable optical_thickness_37_error
Definition: core_arrays.f90:65
real, dimension(nchan, model_levels), public rtm_trans_atm_clr
Definition: rtm_support.f90:47
Definition: planck_functions.f90:1
real optical_thickness_16_liquid
Definition: core_arrays.f90:24
real, dimension(nchan, model_levels), public rtm_rad_atm_clr_low
Definition: rtm_support.f90:59
real(single), dimension(:,:), allocatable liquid_water_path
Definition: core_arrays.f90:56
subroutine, public scienceinterface(threshold_solar_zenith, threshold_sensor_zenith, threshold_relative_azimuth, debug, status)
Definition: modis_science_module.f90:18
integer(integer_onebyte), dimension(:,:), allocatable cloud_layer_flag
Definition: core_arrays.f90:79
Definition: core_arrays.f90:1
integer *2, dimension(:,:), allocatable effective_radius_16_error
Definition: core_arrays.f90:68
real, dimension(nchan, model_levels), public rtm_trans_atm_clr_low
Definition: rtm_support.f90:58
real, dimension(2) thermal_correction_oneway_high
Definition: core_arrays.f90:184
real, dimension(set_number_of_bands) meandelta_trans
Definition: core_arrays.f90:115
real, dimension(2) thermal_correction_twoway_high
Definition: core_arrays.f90:185
subroutine set_quality_data(xsize, ysize)
Definition: set_quality_data_module.f90:8
integer *2, dimension(:,:), allocatable liquid_water_path_16_error
Definition: core_arrays.f90:72
subroutine set_interp_controls(i, j, scattering_angle, cur_wind_speed, drel, threshold_solar_zenith, threshold_sensor_zenith, wind_speed_only, interp_SS, interp_MS)
Definition: general_science_module.f90:30
subroutine get_model_idx_geos5(grid_xstart, grid_ystart, lat, lon, model_i, model_j)
Definition: global_model_grids.f90:68
type(cloudmask_type), dimension(:,:), allocatable cloudmask
Definition: core_arrays.f90:113
integer *2, dimension(:,:,:), allocatable cloud_mask_spi
Definition: core_arrays.f90:133
real optical_thickness_1621_ice
Definition: core_arrays.f90:26
real(single), dimension(:,:), allocatable optical_thickness_37_final
Definition: core_arrays.f90:36
subroutine cleanup_retrieval
Definition: retrieval_prep_logic.f90:35
real(single), dimension(:,:), allocatable longitude
Definition: core_arrays.f90:137
Definition: clear_sky_restoral.f90:1
real(single), dimension(:,:), allocatable effective_radius_37_final
Definition: core_arrays.f90:40
real(single), dimension(:,:), allocatable cloud_top_pressure
Definition: core_arrays.f90:143
Definition: libraryarrays.f90:1
subroutine assign_retrieval_error(xpoint, ypoint)
Definition: general_science_module.f90:696
integer *2, dimension(:,:), allocatable optical_thickness_1621_error
Definition: core_arrays.f90:75
real function, public linearinterpolation(X, Y, XX)
Definition: modis_numerical_module.f90:143
real function, public scatangle(solarAng, viewAng, relAzm)
Definition: interpolate_libraries.f90:328
integer *2, dimension(:,:), allocatable tau_liquid
Definition: core_arrays.f90:32
real, dimension(:,:), allocatable irw_temperature
Definition: core_arrays.f90:157
Definition: global_model_grids.f90:1
real(single), dimension(:,:), allocatable latitude
Definition: core_arrays.f90:136
integer *2, dimension(:,:), allocatable optical_thickness_error
Definition: core_arrays.f90:63
subroutine get_model_idx(lat, lon, i, j)
Definition: global_model_grids.f90:40
real effective_radius_21_liquid
Definition: core_arrays.f90:27
subroutine, public libraryinterpolate(local_solarzenith, local_sensorzenith, local_relativeazimuth, local_scatangle, local_wind_speed, wind_speed_only, interp_MS, interp_SS, debug, status, i, j)
Definition: interpolate_libraries.f90:188
real, dimension(set_number_of_bands) transmittance_twoway
Definition: core_arrays.f90:117
real, dimension(nchan, model_levels), public rtm_cloud_prof_high
Definition: rtm_support.f90:65
integer, parameter set_albedo_bands
Definition: mod06_run_settings.f90:21
integer *2, parameter fillvalue_int2
Definition: nonscience_parameters.f90:15
real, dimension(:,:,:), allocatable atm_corr_refl
Definition: core_arrays.f90:164
real, dimension(:,:), allocatable sensor_azimuth_angle
Definition: core_arrays.f90:102
integer *1, dimension(:,:), allocatable cloud_phase_infrared
Definition: core_arrays.f90:156
Definition: science_parameters.f90:1
type(failed_type), dimension(:,:), allocatable failure_metric_1621
Definition: core_arrays.f90:162
integer *2, dimension(:,:), allocatable liquid_water_path_error
Definition: core_arrays.f90:71
real, dimension(:,:,:), allocatable surface_albedo
Definition: core_arrays.f90:125
Definition: modis_cloudstructure.f90:1
subroutine split_pcl(xdim, ydim)
Definition: general_science_module.f90:746
real, parameter max_tau_rtrieved
Definition: nonscience_parameters.f90:20
real effective_radius_37_liquid
Definition: core_arrays.f90:30
type(processflag), dimension(:,:), allocatable cloudsummary
Definition: core_arrays.f90:87
real(single), dimension(:), allocatable water_radii
Definition: libraryarrays.f90:54
integer *2, dimension(:,:), allocatable liquid_water_path_37_error
Definition: core_arrays.f90:73
real, dimension(nchan, model_levels), public rtm_trans_atm_clr_high
Definition: rtm_support.f90:63
Definition: libraryinterpolates.f90:1
real(single), dimension(:), allocatable library_taus
Definition: libraryarrays.f90:40
real, dimension(20) emission_uncertainty_tc_liq
Definition: core_arrays.f90:187
real, dimension(nchan, model_levels), public rtm_rad_atm_clr
Definition: rtm_support.f90:48
subroutine, public get_above_cloud_properties(pprof, wprof, sfc_lev, cloud_top_pressure, abovecloud_watervapor, status)
Definition: ancillary_module.f90:1310
real optical_thickness_37_liquid
Definition: core_arrays.f90:25
integer, parameter channel_37um
Definition: mod06_run_settings.f90:41
real optical_thickness_1621_liquid
Definition: core_arrays.f90:26
subroutine set_cox_munk_albedo(albedo, lib_albedo)
Definition: specific_other.f90:139
type(failed_type), dimension(:,:), allocatable failure_metric_16
Definition: core_arrays.f90:160
Definition: retrieval_irw.f90:1
Definition: ancillary_module.f90:1
subroutine set_water_path_answers(i, j, finalize_liq, finalize_ice)
Definition: general_science_module.f90:134
subroutine, public getuncertainties(thickness, re, water_path, phase, R1R2wavelengthIdx, meas_error, surface_albedo, transmittance_w1, transmittance_w2, delta_transmittance_w1, delta_transmittance_w2, transmittance_stddev_w1, transmittance_stddev_w2, emission_pw, emission_Tc, sigma_R37_pw, uTau, uRe, uWaterPath, xpoint, ypoint)
Definition: get_retrieval_uncertainty.f90:58
integer(integer_onebyte), dimension(:,:), allocatable csr_flag_array
Definition: core_arrays.f90:80
real, dimension(:,:), allocatable solar_zenith_angle
Definition: core_arrays.f90:6
Definition: modis_science_module.f90:1
real(single), dimension(:,:), allocatable liquid_water_path_37
Definition: core_arrays.f90:58
real, dimension(nchan, model_levels), public rtm_cloud_prof_low
Definition: rtm_support.f90:60
subroutine capture_arrays
Definition: general_science_module.f90:555
Definition: mod06_run_settings.f90:1
real(single), dimension(:,:), allocatable optical_thickness_final
Definition: core_arrays.f90:34
subroutine init_science_arrays
Definition: general_science_module.f90:288
real(single), dimension(:,:,:), allocatable int_surface_emissivity_water
Definition: libraryinterpolates.f90:23
Definition: multi_layer_clouds.f90:5
real, dimension(nchan, model_levels), public rtm_cloud_prof
Definition: rtm_support.f90:49
type(failed_type), dimension(:,:), allocatable failure_metric
Definition: core_arrays.f90:159
real function, public modis_planck(platform_name, TEMP, BAND, UNITS)
Definition: planck_functions.f90:510
real(single), dimension(:,:), allocatable liquid_water_path_1621
Definition: core_arrays.f90:59
real, dimension(:), allocatable rayleigh_liq
Definition: libraryarrays.f90:78
subroutine set_failure_answers(i, j, RSS_final, set_near)
Definition: general_science_module.f90:231
real(single), dimension(:), allocatable ice_radii
Definition: libraryarrays.f90:63
integer *2, dimension(:,:), allocatable liquid_water_path_1621_error
Definition: core_arrays.f90:77
subroutine, public cloudiness_test(cloudmask, process_summary, measurement, reflectance_box, not_cloud, lowvariability_confidence_test, CSR_QA, latitude, chm, vis1km_test)
Definition: clear_sky_restoral.f90:50
subroutine, public get_rtm_parameters(platform, surface_emissivity, view_zenith, sun_zenith, i, j, x, y)
Definition: rtm_support.f90:105
real, dimension(20) emission_uncertainty_pw_liq
Definition: core_arrays.f90:186
type(ancillary_type), dimension(:,:), allocatable model_info
Definition: core_arrays.f90:169
Definition: interpolate_libraries.f90:1
subroutine init_retrieval(library_taus)
Definition: retrieval_prep_logic.f90:16
Definition: nonscience_parameters.f90:4
integer *2, dimension(:,:), allocatable re21_liquid
Definition: core_arrays.f90:32
real, dimension(:,:), allocatable precip_water_094
Definition: core_arrays.f90:149
real(single), dimension(:,:), allocatable cloud_top_temperature
Definition: core_arrays.f90:142
real(single), dimension(:,:,:), allocatable surface_emissivity_land
Definition: core_arrays.f90:140
real, parameter fillvalue_real
Definition: nonscience_parameters.f90:13
subroutine set_drel(threshold_relative_azimuth, drel)
Definition: general_science_module.f90:8
subroutine, public atmospheric_correction(xpoint, ypoint, iteration, meas_out, model, debug, status)
Definition: atmospheric_correction.f90:125
integer, dimension(set_number_of_bands), parameter set_bands
Definition: mod06_run_settings.f90:23
real(single), dimension(:,:,:), allocatable band_measurements
Definition: core_arrays.f90:106
real effective_radius_16_liquid
Definition: core_arrays.f90:28
real, dimension(:,:), allocatable sensor_zenith_angle
Definition: core_arrays.f90:100
integer(integer_onebyte), dimension(:,:), allocatable ml_test_flag
Definition: core_arrays.f90:79
real(single), dimension(:,:), allocatable relative_azimuth_angle
Definition: core_arrays.f90:105
real(single), dimension(:,:), allocatable surface_temperature
Definition: core_arrays.f90:139
real(single), dimension(:,:,:), allocatable int_reflectance_water
Definition: libraryinterpolates.f90:4
real(single), dimension(:,:), allocatable optical_thickness_1621_final
Definition: core_arrays.f90:37
Definition: names.f90:1
subroutine, public corescience(xpoint, ypoint, process, measurements, Tc_liquid, Tc_ice, debug, na_band_used, nearest_liq, nearest_ice, RSS_liq, RSS_ice, alt_ray_liq, alt_ray_ice, do_retrievals_liq, do_retrievals_ice, status)
Definition: corescience_module.f90:14
subroutine, public retrieve_irw_temp(x, y, I11_meas, idx_i, idx_j, clear_rad_table, clear_trans_table, cloud_prof, irw_temp, irw_pressure, irw_height)
Definition: retrieval_irw.f90:207
integer *2, dimension(:,:), allocatable effective_radius_1621_error
Definition: core_arrays.f90:76
type(qualityanalysis), dimension(:,:), allocatable processing_information
Definition: core_arrays.f90:173
Definition: retrieval_prep_logic.f90:1
integer *2, dimension(:,:), allocatable effective_radius_21_error
Definition: core_arrays.f90:67
real(single), dimension(:,:), allocatable liquid_water_path_16
Definition: core_arrays.f90:57
integer, parameter set_number_of_bands
Definition: mod06_run_settings.f90:20
real(single), dimension(:,:), allocatable abovecloud_watervapor
Definition: core_arrays.f90:147
type(failed_type), dimension(:,:), allocatable failure_metric_37
Definition: core_arrays.f90:161
real, dimension(20) emission_uncertainty_pw_ice
Definition: core_arrays.f90:186
real, dimension(:,:,:), allocatable band_uncertainty
Definition: core_arrays.f90:108
Definition: rtm_support.f90:1
real(single), dimension(:,:), allocatable optical_thickness_16_final
Definition: core_arrays.f90:35
Definition: corescience_module.f90:1
real(single), dimension(:,:), allocatable effective_radius_16_final
Definition: core_arrays.f90:38
Definition: cloud_phase.f90:1
real, dimension(set_number_of_bands) transmittance_stddev
Definition: core_arrays.f90:118
real, dimension(:), allocatable rayleigh_ice
Definition: libraryarrays.f90:78
subroutine, public bisectionsearch(xx, x, jlo, jhi)
Definition: modis_numerical_module.f90:51
real, dimension(:,:), allocatable solar_azimuth_angle
Definition: core_arrays.f90:103
real, dimension(nchan, model_levels), public rtm_rad_atm_clr_high
Definition: rtm_support.f90:64
integer *1, dimension(:,:), allocatable cloud_height_method
Definition: core_arrays.f90:155
subroutine, public given_p_get_t(P, model_point, T)
Definition: ancillary_module.f90:367
real, dimension(2) thermal_correction_oneway_low
Definition: core_arrays.f90:184
real, dimension(2) thermal_correction_twoway_low
Definition: core_arrays.f90:185
integer *2, dimension(:,:), allocatable optical_thickness_16_error
Definition: core_arrays.f90:64
Definition: specific_other.f90:1
subroutine, public compute_multilayer_map(platform_name, BigTransTable, measurements, cloud_phase, Baum_phase, p_ncep, mixR_ncep, t_ncep, surface, MOD06_Pc, MOD06_PW, sat_zen, sol_zen, rel_az, tau, tau1621, xpoint, ypoint, mlayer, mlayer_test)
Definition: multi_layer_clouds.f90:108
real, dimension(set_albedo_bands) albedo_real4
Definition: core_arrays.f90:130
subroutine clouddecision(platform_name, cloudmask, measurements, RSSLiq, RSSIce, optical_thickness_liquid, optical_thickness_ice, effective_radius_16_liquid, effective_radius_21_liquid, effective_radius_37_liquid, effective_radius_16_ice, effective_radius_21_ice, effective_radius_37_ice, cloud_top_temperature_1km, cloud_mask_SPI, cloudHeightMethod, ir_phase, procflag_band_used_ot, cloudsummary, debug, status, i, j)
Definition: cloud_phase.f90:27
real, dimension(:,:,:,:), allocatable transmit_correction_table
Definition: libraryarrays.f90:38
integer *2, dimension(:,:), allocatable effective_radius_37_error
Definition: core_arrays.f90:69
real(single), dimension(:,:), allocatable effective_radius_1621_final
Definition: core_arrays.f90:41
subroutine remove_edge_scenes(cloudmask, CSR_results, xsize, ysize, status)
Definition: remove_edge_scenes.f90:50
subroutine, public init_half_radii
Definition: get_retrieval_uncertainty.f90:15
subroutine compute_aod(x, y, scat_ang, corr_meas, ws, aod550)
Definition: modis_science_module.f90:1521
subroutine fill_c2_mdl(i, j)
Definition: modis_science_module.f90:1622
real, dimension(20) emission_uncertainty_tc_ice
Definition: core_arrays.f90:187
real effective_radius_1621_liquid
Definition: core_arrays.f90:29
real(single), dimension(:,:), allocatable effective_radius_21_final
Definition: core_arrays.f90:39