From 2936fe88283633915c3d312a20a12518080ae660 Mon Sep 17 00:00:00 2001 From: brentwilder Date: Fri, 5 Apr 2024 19:32:31 -0700 Subject: [PATCH] upward transmittance --- scripts/libradtran.py | 4 ++-- scripts/optimization.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/libradtran.py b/scripts/libradtran.py index bc10e72..39ce9e6 100644 --- a/scripts/libradtran.py +++ b/scripts/libradtran.py @@ -251,7 +251,7 @@ def lut_grid(h20_range,a550_range, alt_range, path_to_img_base, sensor_wavelengt -def lrt_reader(h, aod, alt, cosi, vza, shadow,svf, slope, rho_surface, +def lrt_reader(h, aod, alt, cosi, sza, shadow,svf, slope, rho_surface, g_l0, g_tup, g_s, g_edir, g_edn,sensor_wavelengths): ''' @@ -279,7 +279,7 @@ def lrt_reader(h, aod, alt, cosi, vza, shadow,svf, slope, rho_surface, # Correct to local conditions ############################# - t_up = t_up / np.cos(np.radians(vza)) + t_up = t_up / np.cos(np.radians(sza)) # Adjust local Fdir and Fdiff edir = edir0 * cosi * shadow #shadow: 0=shadow, 1=sun diff --git a/scripts/optimization.py b/scripts/optimization.py index a8cafac..501ee7e 100644 --- a/scripts/optimization.py +++ b/scripts/optimization.py @@ -115,7 +115,7 @@ def fun_min(x0, cosi, cosv, theta, sensor_wavelengths, endmembers_opt, # Get the local irrad and atmos params. # This is loading the data from the precomputed LUTs. - l0, t_up, sph_alb, s_total = lrt_reader(h, aod, alt,cosi, vza, + l0, t_up, sph_alb, s_total = lrt_reader(h, aod, alt,cosi, sza, shadow,svf, slope, rho_surface, g_l0, g_tup, g_s, g_edir, g_edn, sensor_wavelengths) @@ -177,7 +177,7 @@ def fun_min_light(x0, cosi, cosv, theta, sensor_wavelengths, endmembers_opt, # Get the local irrad and atmos params. # This is loading the data from the precomputed LUTs. - l0, t_up, sph_alb, s_total = lrt_reader(h, aod, alt,cosi, vza, + l0, t_up, sph_alb, s_total = lrt_reader(h, aod, alt,cosi, sza, shadow,svf, slope, rho_surface, g_l0, g_tup, g_s, g_edir, g_edn, sensor_wavelengths) @@ -352,7 +352,7 @@ def constraint(x): # Get the local irrad and atmos params. # This is loading the data from the precomputed LUTs. l0, t_up, sph_alb, s_total = lrt_reader(h20_opt, aod_opt, alt, - cosi, vza, shadow, + cosi, sza, shadow, svf, slope, rho_surface, g_l0, g_tup, g_s, g_edir, g_edn, sensor_wavelengths)