Skip to content

Commit

Permalink
Got to version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ninahakansson committed Dec 6, 2024
1 parent 5a5a1c2 commit 737bd75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions level1c4pps/isccpng2pps_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def homogenize_channel(scene, wmo_id, illum, band, sol_zen):
data = scene[band]
dwmo_id = scene["wmo_id"].values
ch_index = coef_slope_chan.index(band)
k = coef_slope_list_v1[str(wmo_id) + illum][ch_index]
c = coef_offset_list_v1[str(wmo_id) + illum][ch_index]
k = coef_slope_list[str(wmo_id) + illum][ch_index]
c = coef_offset_list[str(wmo_id) + illum][ch_index]
logger.info(
f"Homogenizing channel {band} for {satellite_names[wmo_id]} for illum:{illum}"
f" with respect to SEVIRI on MSG4 using y={k} * x + {c}")
Expand All @@ -182,7 +182,7 @@ def homogenize_channel(scene, wmo_id, illum, band, sol_zen):
update = ((dwmo_id == wmo_id) & (data > 0) & (sol_zen < dn_discr))
scene[band].values = np.where(update, scene[band].values * k + c, scene[band].values)

if (illum == '_day'):
if (illum == '_nig'):
update = ((dwmo_id == wmo_id) & (data > 0) & (sol_zen >= dn_discr))
scene[band].values = np.where(update, scene[band].values * k + c, scene[band].values)

Expand All @@ -193,7 +193,7 @@ def homogenize(scene):
for band in BANDNAMES:
for wmo_id in [270, 271, 173, 55]:
homogenize_channel(scene, wmo_id, '_day', band, sol_zen)
# homogenize_channel(scene, wmo_id, '_nig', band, sol_zen)
homogenize_channel(scene, wmo_id, '_nig', band, sol_zen)

def recalibrate_meteosat(scene):
"""Nominal calibration is applied, redo with meirnik calibration."""
Expand Down

0 comments on commit 737bd75

Please sign in to comment.