## =================README=================
# -> A Python script named "run_example.py": demonstrate how to do aerosol retrieval using 
#    "CNN_AllClearSkyAerosolRetrieval_module" in "CNN_AllClearSkyAerosolRetrieval_module.py"
## ========================================
# ----------Step1: load in the all the necessary libraries----------
import CNN_AllClearSkyAerosolRetrieval_module
import scipy.io as sio
import numpy as np
# ----------Step 2: load in example field----------
# -> example "reflectance field"----------
example_reflectance=sio.loadmat('reflectance.mat');
example_reflectance=example_reflectance['reflectance'];
# -> example "cloud_mask field"
example_cloud_mask=sio.loadmat('cloud_mask.mat');
example_cloud_mask=example_cloud_mask['cloud_mask'];
# ----------Step 3: do the aerosol retrieval----------
Retrieved_aerosol_optical_depth=CNN_AllClearSkyAerosolRetrieval_module.CNN_AllClearSkyAerosolRetrieval(example_reflectance,example_cloud_mask);
sio.savemat('Retrieved_aerosol_optical_depth.mat',{'Retrieved_aerosol_optical_depth':Retrieved_aerosol_optical_depth});