scenes_mon_1[1].all_dataset_names() mscn_mon_1.load(["IR_134"]) mscn_mon_2.load(["IR_134"]) # area definition area_def_kongo = AreaDefinition( "Kongo", "A lambert azimutal equal area projection of Kongo", "Projection of Kongo", { "proj": "laea", "lat_0": 2.5, "lon_0": 6.0 }, 1000, 1000, (4E5, -17E5, 30E5, 8E5)) # resampling mscn's to area of kongo ## mscn_mon_1 new_mscn_mon_1 = mscn_mon_1.resample(area_def_kongo) ## mscn_mon_2 new_mscn_mon_2 = mscn_mon_2.resample(area_def_kongo) # create blended scenes for mon_1 and mon_2 ## mon_1 blended_scene_mon_1 = new_mscn_mon_1.blend() ## mon_2 blended_scene_mon_2 = new_mscn_mon_2.blend() # plot the blended scenes ## savenames output_mon_1 = output_dir / "cloud_coverage_january.png" output_mon_2 = output_dir / "cloud_coverage_july.png"
#https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-2-msi/level-1c/cloud-masks #https://gisgeography.com/spectral-signature/ #load SWIR mscn_mon1.load(["IR_134"]) mscn_mon2.load(["IR_134"]) #Area definition dem. rep kongo area_def_kongo = AreaDefinition("Kongo", "A Lambert Azimutal Equal Area projection of Kongo", "Projection of Kongo", {"proj":"laea", "lat_0":2.5, "lon_0":6}, 1000, 1000, (4E5, -17E5, 30E5, 8E5)) mscn1_kongo = mscn_mon1.resample(area_def_kongo) mscn2_kongo = mscn_mon2.resample(area_def_kongo) blended_scene1 = mscn1_kongo.blend() blended_scene2 = mscn2_kongo.blend() #blended_scene1["IR_134"].plot(x="x", y="y") #blended_scene2["IR_134"].plot(x="x", y="y") output_sc1 = output_dir / "month1_plot.png" output_sc2 = output_dir / "month2_plot.png" blended_scene1.show("IR_134").save(output_sc1) blended_scene2.show("IR_134").save(output_sc2) #add country borders
nebraska_scene.save_datasets() from satpy import MultiScene mscn = MultiScene(global_scene) mscn.load(['I05']) my_area = mscn['I05'].attrs['area'].compute_optimal_bb_area({ 'proj': 'lcc', 'lon_0': -95., 'lat_0': 25., 'lat_1': 25., 'lat_2': 25. }) new_scn = mscn.resample(my_area) from pyresample.geometry import AreaDefinition my_area = AreaDefinition("nebraska") import numpy as np import os import mpop from mpop.satellites import PolarFactory from datetime import datetime import glob input_folder = r"K:\Project_OpenET\PV_VIIRS_Test_Run\Input\VIIRS_RAW" output_folder = r"K:\Project_OpenET\PV_VIIRS_Test_Run\Input\VIIRS_UTM" os.chdir(input_folder)