Skip to main content

ModImpNet (MODIS Import to netCDF): Import Snow cover NDSI and Land Surface Temperature (LST) from MODIS and produces a netCDF file from configuration files

Project description

ModImpNet

ModImpNet is a package that allows for automatic import of Snow cover NDSI and Land Surface Temperature (LST) from MODIS and produces a netCDF file from configuration files. The user only needs to provide a .toml and a .csv configuration files. Furthermore, credentials to AppEARS API (https://appeears.earthdatacloud.nasa.gov/api/) need to be specified in a .netrc file.

Thanks to this tool, the user will get snow cover and land surface temperature time series for any point location into a standardized netCDF format.

Installation

Use the package manager pip to install ModImpNet (find the PyPi page here: https://pypi.org/project/ModImpNet/).

pip install ModImpNet

Install all the required packages (dependencies) from the requirements.txt file.

pip install -r requirements.txt

Place requirements.txt in the directory where you plan to run the command. If the file is in a different directory, specify its path, for example, path/to/requirements.txt.

Usage

The package is better used directly on the command line with the built-in CLI

ModImpNet -f /<path>/<folder_name>/par/MODIS_config.toml

It is recommended to stick to the folder structure adopted in the folder ModImpNet/examples/MODIS_test_Martha. Simply create a folder for each application, and within it, create a par/ folder. This will hold two configuration files. Create the following directory structure::

/<folder_name>
    /par
        MODIS_config.toml
        MODIS_stations.csv

The two files are:

  1. MODIS_config.toml: downloads and scales reanalysis data to produce meteorological time series at any point location:
[name]
task_name = <task_name>

[directories]
# this is the home directory that will contain par/ and download/
home_dir        = '<path>/<folder_name>'
# this is the download destination directory
dest_dir        = '<path>/<folder_name>/download'
# directory where the .netrc credential file is stored
credential_dir  = '<path_to_credential_directory>'
# path to the csv configuration file 
config_csv_path = '<path>/<folder_name>/par/MODIS_stations.csv'

[config]
# in the format YYYY/MM/DD to match with GlobSim
startDate  = '<YYYY/MM/DD>'
endDate    = '<YYYY/MM/DD>'

[download]
# how long shall we wait (in seconds) between submitting a task and giving up, suggested 1day=86400s
max_wait   = 86400
# time between two status checks (in seconds), suggested 30s
time_sleep = 30
  1. MODIS_stations.csv: Land surface model of the mass and energy balance of the hydrological cycle which simulates ground thermal properties:
id,latitude,longitude
Site_name_1,lat_1,lon_1
...
Site_name_n,lat_n,lon_n

Once the package is run, a new download/ foilder is automatically created, and is populated with two csv files containing the snow cover and land surface temperature data, together with a text log file. Finally, when the conversion is done too, the final netCDF file is also created. We get the following directory structure::

/<folder_name>
    /par
        MODIS_config.toml
        MODIS_stations.csv
    /download
        <task_name>_MOD10A1_061_results.csv
        <task_name>_MOD11A1_061_results.csv
        MODIS_log_<datetime>.txt

Examples

The user can find some inspiration on how to use ModImpNet by looking at the examples provided.

License

GNU GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modimpnet-0.0.5.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modimpnet-0.0.5-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file modimpnet-0.0.5.tar.gz.

File metadata

  • Download URL: modimpnet-0.0.5.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for modimpnet-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2ef4f2fc1d8a9a5649314c6fb9c90d798ec0480be19014e33f8824288ab6f9cd
MD5 1297d8e7f4875b066d69826a10656ecb
BLAKE2b-256 e446b96425a3b9dc3a0d197208be7f9bfa7293e0e5b094754b0ea275add3126d

See more details on using hashes here.

File details

Details for the file modimpnet-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: modimpnet-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for modimpnet-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d7997caf62f7eae2cc1eed30ba9ae7ae0003b480522d1343664fc38ee9c20edf
MD5 a7859e6492365ce1b1bd6f3422acb5c0
BLAKE2b-256 b39577da7410794a96780456e5e500baf5ac6b08e5f0c87ef721ed8bd71bc111

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page