Skip to content

Commit 3f36aa4

Browse files
committed
Fix vgac sun-earth-distance attribute
1 parent 68482cd commit 3f36aa4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

level1c4pps/vgac2pps_lib.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,20 @@
438438
"cfg_file_night": "ch4_satz_max_15_SUNZ_90_180_tdiff_120_sec_20241120.yaml",
439439
"cfg_file_twilight": "ch7_satz_max_15_SUNZ_80_89_tdiff_120_sec_20241120.yaml",
440440
"comment": "NN based on AVHRR and VGAC matchups using all AVHRR heritage channels"
441-
}
441+
},
442+
"NN_v4": {
443+
"cfg_file_day": "ch7_satz_max_15_SUNZ_0_80_tdiff_120_sec_20241204.yaml",
444+
"cfg_file_night": "ch4_satz_max_15_SUNZ_90_180_tdiff_120_sec_20241204.yaml",
445+
"cfg_file_twilight": "ch7_satz_max_15_SUNZ_80_89_tdiff_120_sec_20241204.yaml",
446+
"comment": "NN based on AVHRR and VGAC matchups using all AVHRR heritage channels"
442447
}
448+
}
443449

444450

445451
def convert_to_noaa19_neural_network(scene, sbaf_version):
446452
"""Applies AVHRR SBAF to VGAC channels using NN approach"""
447453

448-
if sbaf_version in ["NN_v1", "NN_v2", "NN_v3"]:
454+
if sbaf_version in ["NN_v1", "NN_v2", "NN_v3", "NN_v4"]:
449455
day_cfg_file = SBAF[sbaf_version]['cfg_file_day']
450456
night_cfg_file = SBAF[sbaf_version]['cfg_file_night']
451457
twilight_cfg_file = SBAF[sbaf_version]['cfg_file_twilight']
@@ -563,8 +569,9 @@ def set_header_and_band_attrs(scene, orbit_n=0):
563569
for band in REFL_BANDS:
564570
if band not in scene:
565571
continue
566-
# For VIIRS data sun_zenith_angle_correction_applied is applied always!
572+
# Original VGAC files provide normalized reflectances AND Earth-Sun distance corrected data
567573
scene[band].attrs["sun_zenith_angle_correction_applied"] = "True"
574+
scene[band].attrs['sun_earth_distance_correction_applied'] = "True"
568575
return nimg
569576

570577

0 commit comments

Comments
 (0)