ocssw
V2022
|
interpolate_libraries.f90
Go to the documentation of this file.
7 public :: libraryinterpolate, scatangle, interpolate_wind_speed, lib_clean, lib_init ! GetReflForGivenWindSpeedIce, GetReflForGivenWindSpeedWater
30 REAL,ALLOCATABLE::phaseFunVals_water(:,:), phaseFunVals_ice(:,:), ssRefl_water(:,:,:), ssRefl_ice(:,:,:)
63 allocate(fqe_water(number_wavelengths, number_waterradii), fomega_water(number_wavelengths, number_waterradii))
64 allocate(fqe_ice(number_wavelengths, number_iceradii), fomega_ice(number_wavelengths, number_iceradii))
115 tauc_source_water(itau,:,:) = (library_taus(itau-1) * fqe_water) * (1.0 - fomega_water) !Qe sacling, tau scaling, phase func truncation
116 tauc_source_ice(itau,:,:) = (library_taus(itau-1) * fqe_ice) * (1.0 - fomega_ice) !Qe sacling, tau scaling, phase func truncation
200 real, intent(in) :: local_solarzenith, local_sensorzenith, local_relativeazimuth, local_wind_speed
245 call interpolatefluxes(cos_sza, library_fluxsolarzenith, flux_down_ice_solar, int_fluxdownice_solar, &
247 call interpolatefluxes(cos_sza, library_fluxsolarzenith, flux_down_water_solar, int_fluxdownwater_solar, &
252 call interpolatefluxes(cos_vza, library_fluxsensorzenith, flux_down_ice_sensor, int_fluxdownice_sensor, &
254 call interpolatefluxes(cos_vza, library_fluxsensorzenith, flux_up_ice_sensor, int_fluxupice_sensor, &
257 call interpolatefluxes(cos_vza, library_fluxsensorzenith, flux_down_water_sensor, int_fluxdownwater_sensor, &
259 call interpolatefluxes(cos_vza, library_fluxsensorzenith, flux_up_water_sensor, int_fluxupwater_sensor, &
397 SUBROUTINE getphasefunctionvalues(scatAngle, scatAngleArray, num_angles, phaseFunArray, phaseNormConst, &
463 if (platform_name == "AVIRIS" .or. platform_name == "RSP" .or. platform_name == "AHI" .or. platform_name == "EPIC" .or. &
493 !print*,iAngHi,iAngLow,dtheta,scatAngleArray(iAngHi)-scatAngle,scatAngle - scatAngleArray(iAngLow)
499 phasefunvals(1:nwl,:) = ( phasefunarray(ianglow,1:nwl,:) * (scatanglearray(ianghi)-scatangle) + &
518 if (platform_name == "AVIRIS" .or. platform_name == "RSP" .or. platform_name == "AHI" .or. platform_name == "EPIC" .or. &
527 ! it is generally advisable to avoid a real power whenever possible in order to make the code run faster
536 SUBROUTINE interpolatefluxes(solarOrViewAng, solarAngMuArray, inFluxArray, outFluxArray, iAngHi, iAngLow, dtheta, ierror)
680 if( platform_name == "AVIRIS" .or. platform_name == "RSP" .or. platform_name == "AHI" .or. platform_name == "EPIC" .or. &
692 fphase_lamb = phasefunvals_water/ (1.0 - fomega_water) !add something here to safeguard div by zero
716 ssrefl_water(itau,ii,jj) = (singlescattering_water(ii,jj)* fphase_lamb(ii,jj) * (1 - exp1_liq(ii,jj))) / (4.0*muplusmu0)
724 fphase_lamb(:, 1:number_iceradii) = phasefunvals_ice/ (1.0 - fomega_ice) !add something here to safeguard div by zero
743 ssrefl_ice(itau,ii,jj) = (singlescattering_ice(ii,jj)* fphase_lamb(ii,jj) * (1 - exp1_ice(ii,jj))) / (4.0*muplusmu0)
754 SUBROUTINE single_scattering_calcs_ocean(phaseFunVals_liq, phaseFunVals_ice, ssAlbedo_liq, ssAlbedo_ice, &
778 if (platform_name == "AVIRIS" .or. platform_name == "RSP" .or. platform_name == "AHI" .or. platform_name == "EPIC" .or. &
788 fphase_liq = phasefunvals_liq/ (1.0 - fomega_water) !add something here to safeguard div by zero
797 ocean_aero_phase(iwl) = ( (aerotau(iwl) -0.1) * rlphase + 0.1 * aeroomega(iwl) * aerophase(iwl) ) / aero_denom(iwl)
941 !----------------------SUBROUTINE CalcSingScatPartOfOceanReflectance---------------------------------
973 !-----------------------------------------------------------------------------------------------
1009 !--------------------SUBROUTINE InterpCloudEmissForAGivenWSpeed ---------------------------------
1011 !returns the corresponding values for particular tau, lambda and re(see the inputs and outputs)
1022 !-----------------------------------------------------------------------------------------------
1024 SUBROUTINE interpemissforagivenwspeed(solarOrViewAng,wspeed, inEmissArray, outEmissArray_ws, outEmissArray, &
1070 ! !indexing, a search is done to find the the indices of the cube that enclose the interpolation
1247 SUBROUTINE getrefl(solarAng,viewAng,azmAng,in_scat, refl_water, refl_ice, interp_MS, interp_SS, ierror)
1326 CALL getphasefunctionvalues(scat_angle, phase_angles_water, number_phase_angles_water, phase_funcs_water, &
1328 CALL getphasefunctionvalues(scat_angle, phase_angles_ice, number_phase_angles_ice, phase_funcs_ice, &
1352 !--------------------------SUBROUTINE GetReflForGivenWindSpeedWater-----------------------------
1374 !-----------------------------------------------------------------------------------------------
1375 SUBROUTINE getreflforgivenwindspeed(solarAng,viewAng,azmAng, in_scat, cos_scat, wspeed, reflAsurf_water, &
1399 CALL getphasefunctionvalues(scat_angle, phase_angles_water, number_phase_angles_water, phase_funcs_water, &
1402 CALL getphasefunctionvalues(scat_angle, phase_angles_ice, number_phase_angles_ice, phase_funcs_ice, &
1406 call single_scattering_calcs_ocean(phasefunvals_water, phasefunvals_ice, singlescattering_water, singlescattering_ice, &
1518 !--------------------------SUBROUTINE GetReflForGivenWindSpeedIce-------------------------------
1540 !-----------------------------------------------------------------------------------------------
Definition: ch_xfr.f90:1
subroutine interpolatefluxes(solarOrViewAng, solarAngMuArray, inFluxArray, outFluxArray, iAngHi, iAngLow, dtheta, ierror)
Definition: interpolate_libraries.f90:537
real(single), dimension(:,:,:,:,:), allocatable surface_emissivity_water
Definition: libraryarrays.f90:70
Definition: core_arrays.f90:1
subroutine, public lib_clean
Definition: interpolate_libraries.f90:155
real(single), dimension(:,:,:), allocatable int_surface_emissivity_water_sdev
Definition: libraryinterpolates.f90:25
real(single), dimension(:,:,:,:,:), allocatable cloud_emissivity_ice
Definition: libraryarrays.f90:71
real(single), dimension(:,:), allocatable phase_fun_norm_constant_ice
Definition: libraryarrays.f90:66
real(single), dimension(:,:,:,:,:), allocatable surface_emissivity_water_sdev
Definition: libraryarrays.f90:73
real(single), dimension(:,:,:,:,:), allocatable surface_emissivity_ice
Definition: libraryarrays.f90:71
subroutine getrefl(solarAng, viewAng, azmAng, in_scat, refl_water, refl_ice, interp_MS, interp_SS, ierror)
Definition: interpolate_libraries.f90:1248
real(single), dimension(:,:,:,:), allocatable int_surface_emis_ice_wspeed
Definition: libraryinterpolates.f90:29
integer number_phase_angles_water
Definition: libraryarrays.f90:7
real(single), dimension(:,:,:,:), allocatable flux_down_ice_sensor
Definition: libraryarrays.f90:69
Definition: libraryarrays.f90:1
real(single), dimension(:,:), allocatable phase_fun_norm_constant_water
Definition: libraryarrays.f90:55
real function, public scatangle(solarAng, viewAng, relAzm)
Definition: interpolate_libraries.f90:328
real(single), dimension(:,:,:), allocatable int_reflectance_ice
Definition: libraryinterpolates.f90:4
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(single), dimension(:,:,:,:), allocatable int_cloud_emis_water_wspeed
Definition: libraryinterpolates.f90:28
real(single), dimension(:,:,:), allocatable int_fluxdownwater_solar
Definition: libraryinterpolates.f90:20
real(single), dimension(:,:,:,:), allocatable flux_down_water_solar
Definition: libraryarrays.f90:59
Definition: science_parameters.f90:1
real(single), dimension(:,:), allocatable singlescattering_water
Definition: libraryarrays.f90:57
real(single), dimension(:,:,:,:,:), allocatable cloud_emissivity_water_sdev
Definition: libraryarrays.f90:73
real(single), dimension(:,:,:), allocatable int_cloud_emissivity_ice
Definition: libraryinterpolates.f90:24
real(single), dimension(:,:,:), allocatable int_cloud_emissivity_water
Definition: libraryinterpolates.f90:23
real(single), dimension(:), allocatable aerosol_ssa
Definition: libraryarrays.f90:45
real(single), dimension(:,:,:,:), allocatable flux_down_ice_solar
Definition: libraryarrays.f90:68
real(single), dimension(:), allocatable library_fluxsolarzenith
Definition: libraryarrays.f90:43
Definition: libraryinterpolates.f90:1
real(single), dimension(:), allocatable library_taus
Definition: libraryarrays.f90:40
real(single), dimension(:,:,:), allocatable int_reflectance_ice_sdev
Definition: libraryinterpolates.f90:5
Definition: GeneralAuxType.f90:1
real(single), dimension(:,:,:,:), allocatable int_cloud_emis_water_sdev_wspeed
Definition: libraryinterpolates.f90:30
real(single), dimension(:,:,:), allocatable int_reflectance_water_sdev
Definition: libraryinterpolates.f90:5
real(single), dimension(:,:,:,:), allocatable int_cloud_emis_ice_sdev_wspeed
Definition: libraryinterpolates.f90:31
real(single), dimension(:,:,:,:,:), allocatable surface_emissivity_ice_sdev
Definition: libraryarrays.f90:74
subroutine, public interpolate_wind_speed(wspeed, data_in, data_out)
Definition: interpolate_libraries.f90:1462
real(single), dimension(:,:,:), allocatable int_surface_emissivity_ice
Definition: libraryinterpolates.f90:24
real(single), dimension(:,:), allocatable singlescattering_ice
Definition: libraryarrays.f90:64
real(single), dimension(:,:), allocatable extinction_ice
Definition: libraryarrays.f90:64
real(single), dimension(:,:,:), allocatable int_fluxdownice_solar
Definition: libraryinterpolates.f90:21
real(single), dimension(:,:,:,:), allocatable int_refl_ice_sdev_wspeed
Definition: libraryinterpolates.f90:8
real(single), dimension(:,:), allocatable extinction_water
Definition: libraryarrays.f90:55
subroutine getphasefunctionvalues(scatAngle, scatAngleArray, num_angles, phaseFunArray, phaseNormConst, phaseFunVals, ierror)
Definition: interpolate_libraries.f90:399
real(single), dimension(:), allocatable library_sensor_zenith
Definition: libraryarrays.f90:42
real(single), dimension(:,:,:), allocatable int_surface_emissivity_water
Definition: libraryinterpolates.f90:23
real(single), dimension(:,:,:), allocatable phase_funcs_ice
Definition: libraryarrays.f90:67
real(single), dimension(:), allocatable aerosol_asym
Definition: libraryarrays.f90:45
real(single), dimension(:,:,:,:), allocatable flux_up_water_sensor
Definition: libraryarrays.f90:60
real(single), dimension(:,:,:,:), allocatable int_surface_emis_water_wspeed
Definition: libraryinterpolates.f90:28
real(single), dimension(:,:,:,:), allocatable flux_down_water_sensor
Definition: libraryarrays.f90:60
real(single), dimension(:,:,:), allocatable int_surface_emissivity_ice_sdev
Definition: libraryinterpolates.f90:26
Definition: interpolate_libraries.f90:1
real(single), dimension(:), allocatable rayleigh_tau
Definition: libraryarrays.f90:45
subroutine get_aero_params(cos_scatAngle, aeroG)
Definition: interpolate_libraries.f90:511
integer number_phase_angles_ice
Definition: libraryarrays.f90:8
subroutine getsdevreflforgivenwindspeed(solarAng, viewAng, azmAng, wspeed, inrefl_ws_water, reflAsurf_water, inrefl_ws_ice, reflAsurf_ice, wind_speed_only, ierror)
Definition: interpolate_libraries.f90:1544
subroutine getsdevrefllamb(solarAng, viewAng, azmAng, reflAsurf_water, reflAsurf_ice, ierror)
Definition: interpolate_libraries.f90:1600
real(single), dimension(:,:,:,:), allocatable int_surface_emis_water_sdev_wspeed
Definition: libraryinterpolates.f90:30
real(single), dimension(:,:,:), allocatable int_fluxupice_sensor
Definition: libraryinterpolates.f90:21
real(single), dimension(:,:,:), allocatable int_reflectance_water
Definition: libraryinterpolates.f90:4
subroutine setup_emissivity_flux(angle, angle_array, idx_hi, idx_lo, dtheta)
Definition: interpolate_libraries.f90:976
subroutine getreflforgivenwindspeed(solarAng, viewAng, azmAng, in_scat, cos_scat, wspeed, reflAsurf_water, reflAsurf_ice, wind_speed_only, interp_MS, interp_SS, ierror)
Definition: interpolate_libraries.f90:1377
real(single), dimension(:,:,:,:,:), allocatable cloud_emissivity_ice_sdev
Definition: libraryarrays.f90:74
subroutine single_scattering_calcs_ocean(phaseFunVals_liq, phaseFunVals_ice, ssAlbedo_liq, ssAlbedo_ice, RLphase, aeroPhase, RLTau, aeroTau, aeroOmega, theta, theta0, ssRefl_liq, ssRefl_ice)
Definition: interpolate_libraries.f90:757
real(single), dimension(:,:,:), allocatable int_fluxdownwater_sensor
Definition: libraryinterpolates.f90:20
real(single), dimension(:,:,:), allocatable int_cloud_emissivity_ice_sdev
Definition: libraryinterpolates.f90:26
real(single), dimension(:,:), allocatable truncation_factor_ice
Definition: libraryarrays.f90:66
real(single), dimension(:,:,:,:), allocatable int_cloud_emis_ice_wspeed
Definition: libraryinterpolates.f90:29
real(single), dimension(:,:,:,:,:), allocatable cloud_emissivity_water
Definition: libraryarrays.f90:70
real(single), dimension(:,:,:), allocatable phase_funcs_water
Definition: libraryarrays.f90:58
real(single), dimension(:,:,:), allocatable int_fluxdownice_sensor
Definition: libraryinterpolates.f90:21
real(single), dimension(:,:,:,:), allocatable int_surface_emis_ice_sdev_wspeed
Definition: libraryinterpolates.f90:31
real(single), dimension(:,:,:,:), allocatable int_reflectance_water_wspeed
Definition: libraryinterpolates.f90:7
real(single), dimension(:), allocatable phase_angles_water
Definition: libraryarrays.f90:54
real(single), dimension(:,:,:,:), allocatable flux_up_ice_sensor
Definition: libraryarrays.f90:69
real(single), dimension(:,:,:,:), allocatable int_refl_water_sdev_wspeed
Definition: libraryinterpolates.f90:8
real(single), dimension(:), allocatable phase_angles_ice
Definition: libraryarrays.f90:63
real(single), dimension(:,:,:,:), allocatable int_reflectance_ice_wspeed
Definition: libraryinterpolates.f90:7
real(single), dimension(:), allocatable library_fluxsensorzenith
Definition: libraryarrays.f90:43
real(single), dimension(:), allocatable aerosol_tau
Definition: libraryarrays.f90:45
real(single), dimension(:,:), allocatable truncation_factor_water
Definition: libraryarrays.f90:55
real(single), dimension(:,:,:), allocatable int_cloud_emissivity_water_sdev
Definition: libraryinterpolates.f90:25
real(single), dimension(:,:,:), allocatable int_fluxupwater_sensor
Definition: libraryinterpolates.f90:20