-
Notifications
You must be signed in to change notification settings - Fork 2
TerraFusion Examples
Here is the workflow. The AFtool.cpp is the reference model.
- Open AF file that contains many granules.
- Generate target lat/lon datasets (using GDAL).
- Use pytaf.find_nn_block_index() function to find indices in the source dataset that corresponds to target lat/lon.
- Use pytaf.interpolate_nn() function to retrieve values from the source using the indices.
- Plot the interpolated data for comparison or save them as an HDF5 dataset.
- Alternatively, you may want to save the data in netcdf-4 or geotiff format.
See modis2ug.py for the complete code.
See misr2modis.py for the verification of pytaf against AF tool outputs.
You can compare the results using the two plots:
See misr2ceres.py to test 1-d target lat/lon handling.
You can check the MISR output plot.
pytaf generated output of AN Red Radiance
You can compare the above plot with CERES data plot from BF file.
BF plot for Solar Zenith Angle
This script loops through AF files in the current working directory and generates images. For dataset that has more than 2D, it will be subsetted. The index values in higher diemensions will be used as output file name.
Usage:
$python gen_img.py [-s] [-z] /hdf5/group/path/to/dset stride
-s: do not apply scale/offset. do not show color bar.
-z: zoom image by limiting map to lat/lon boundary
stride: subsetting stride for large dataset.
Example:
$python gen_img.py -s /Source/Data_Fields/MISR_Radiance 100
The above command will generate images by subsetting every 100th data point.