Skip to content

Commit

Permalink
upward transmittance
Browse files Browse the repository at this point in the history
  • Loading branch information
brentwilder committed Apr 6, 2024
1 parent 20566c0 commit 2936fe8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/libradtran.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

'''
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2936fe8

Please sign in to comment.