No project description provided
Project description
coloc_sat
coloc_sat is a Python package for co-locating satellite data products. It allows you to co-locate data from different satellite sources based on provided paths and common variable names. This README provides an installation guide and instructions for usage. This package also allows co-location listings. Input satellites / missions that can be treated by this tool are the following : WindSat / SMOS / SMAP / SAR (L1/L2) / ERA5 / HY2 SAR satellites are RCM, RadarSat-2 and Sentinel1.
Installation
Make sure you have Python 3.9 or higher installed.
Using pip
pip install coloc_sat
Using conda
conda install -c conda-forge coloc_sat
Usage
Configuration
Before using coloc_sat, you need to configure the paths to your satellite data products and define common variable names. Follow the steps below:
- Create a directory named
coloc_sat
in your home directory. - Inside the
coloc_sat
directory, create a file namedlocalconfig.yml
.
In localconfig.yml
, fill in the paths to your satellite products following the schema below:
paths:
SMOS:
- '/path/to/SMOS/%Y/%(dayOfYear)/*%Y%m%d*.nc'
- '/path2/to/SMOS//%Y/%(dayOfYear)/*%Y%m%d*.nc'
HY2:
- '/path/to/hy2/%Y/%(dayOfYear)/*%Y%m%d*.nc'
ERA5:
- '/path/to/era5/%Y/%m/era_5-copernicus__%Y%m%d.nc'
RS2:
L1:
- '/path/to/rs2/L1/*/%Y/%(dayOfYear)/RS2*%Y%m%d*'
L2:
- '/path/to/rs2/L2/*/%Y/%(dayOfYear)/RS2_OK*/RS2_*%Y%m%d*/post_processing/nclight_L2M/rs2*owi*%Y%m%d*0003*_ll_gd.nc'
S1:
L1:
- '/path/to/s1/L1/*/*/%Y/%(dayOfYear)/S1*%Y%m%d*SAFE'
L2:
- '/path/to/s1/L2/*/%Y/%(dayOfYear)/S1*%Y%m%d*/post_processing/nclight_L2M/s1*owi*%Y%m%d*000003*_ll_gd.nc'
- '/path2/to/s1/L2/*/%Y/%(dayOfYear)/S1*%Y%m%d*/post_processing/nclight_L2M/s1*owi*%Y%m%d*0003*_ll_gd.nc'
RCM:
L1:
- '/path/to/rcm/L1/*/%Y/%(dayOfYear)/RCM*%Y%m%d*'
L2: []
WS:
- '/path/to/windsat/%Y/%(dayOfYear)/wsat_%Y%m%d*.gz'
SMAP:
- '/path/to/smap/%Y/%(dayOfYear)/RSS_smap_*.nc'
- '/path2/to/smap/%Y/%(dayOfYear)/RSS_smap_*.nc'
common_var_names:
wind_speed: wind_speed
wind_direction: wind_direction_ecmwf
wind_from_direction: wind_from_direction
longitude: lon
latitude: lat
time: time
Replace the paths with the actual paths to your satellite data products. Use the placeholders %Y, %m, %d, and %(dayOfYear) to automatically parse dates from the paths.
Co-locating Data
Once you've configured the paths and common variable names, you can use coloc_sat to co-locate the data. Import the package and start co-locating your data based on your needs.
Now, import the package:
import coloc_sat
Then, define important variables for the co-location:
delta_time=60
destination_folder = '/tmp'
listing = True
product_generation = True
product1 = '/path/to/s1/l2/s1a-ew-owi-cm-20181009t142906-20181009t143110-000003-02A122_ll_gd.nc'
Example code for co-locating a satellite product with a mission:
ds_name = 'SMOS'
# Call the generation tool
generator = coloc_sat.GenerateColoc(product1_id=product1, ds_name=ds_namedelta_time=delta_time, product_generation=product_generation,
listing=listing, destination_folder=destination_folder)
# save the results (listing and / or co-location products)
generator.save_results()
NOTE : It is also possible to use this co-location generator with the console. Here are examples.
a) This first example shows how to generate a coloc between 2 specified products:
Coloc_2_products --product1_id /path/to/rs2/L2/rs2--owi-cm-20141004t210600-20141004t210715-00003-BDBE0_ll_gd.nc --product2_id path/to/s1/L2/s1a-iw-owi-cm-20141004t211657-20141004t211829-000003-002FF5_ll_gd.nc --listing --product_generation
b) This second example shows how to generate all possible coloc between a product and a mission (all products from this mission):
Coloc_between_product_and_mission --product1_id /path/to/rs2/L2/rs2--owi-cm-20141004t210600-20141004t210715-00003-BDBE0_ll_gd.nc --mission_name S1 --listing --product_generation
Acknowledgements
Special thanks to REMSS for their Windsat reader.
- Free software: MIT license
- Documentation: https://coloc-sat.readthedocs.io.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file coloc_sat-1.0.1.tar.gz
.
File metadata
- Download URL: coloc_sat-1.0.1.tar.gz
- Upload date:
- Size: 47.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf1d5bbd7b24a141c5071f5d0e5bf64c94f986b34f4ca3578b6d7d0dde6a5fa2 |
|
MD5 | 0fcbce7bd6f3ab81eae9c7c5ec964ac7 |
|
BLAKE2b-256 | e6757193948895daf58f90c4470e491cb07c66281f32e757b31bc02802f79119 |
File details
Details for the file coloc_sat-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: coloc_sat-1.0.1-py3-none-any.whl
- Upload date:
- Size: 77.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e310ea11540a695878a01cd6188c4bc2cca9be566b288b9b9ce586924a2d4d85 |
|
MD5 | ba05eb6531ada02abab042313b0369c1 |
|
BLAKE2b-256 | 0df3389e83755df39a5fc3d89e3fb88b2dff494fce0e74629062105f7eb1b4fd |