This release is a pre-release and may not be stable for production use.
TC PRIMED API
The NOAA/CSU Tropical Cyclone PRecipitation, Infrared, Microwave, and Environmental Dataset (TC PRIMED) is a global amelioration of tropical cyclone centric data centered on low-Earth orbiting satellite overpasses.
The TC PRIMED data is stored in an artificial intelligence (AI)-ready format via NetCDF files. These data are hosted on an Amazon Web Services (AWS) S3 Bucket as a public dataset through the NOAA Open Data Dissemination program at https://noaa-nesdis-tcprimed-pds.s3.amazonaws.com/index.html.
This API allows users to access specific storms and sensors without having to shift through each individual storm. If you are interested in pulling the entire dataset, consider using the AWS command line interface instead.
Install
Install the TC PRIMED API with:
$ pip install tcprimedapi
Example
There are more examples on using the API available in the examples directory.
This example test will print the S3 bucket object key (i.e., the file name).
$ python
>>> import tcprimedapi
>>> tcpc = tcprimedapi.Client()
>>> tcpc.query({'atcf_id': ['al092019'],
... 'file_type': ['GMI']})
>>> for key in tcpc.object_keys:
... print(key)
Interfaces
The TC PRIMED API allows users to make data requests with two different behaviors: 1) download files locally and 2) iterate through files in memory.
Query data request
Users must first query a data request.
To request TC PRIMED data, users create a dictionary containing parameters for their request. The dictionary contains three key, value pairs:
Storm options:
You can either specify storm identifiers
atcf_id— the Automated Tropical Cyclone Forecast System (ATCF) 8 character storm identifier
Or, you can specify one or multiple components of a storm identifier as strings
season— Four digit seasonbasin— Two character basin identifiercyclone_number— Two digit cyclone number
Leaving one out pulls everything for that option. For example, not specifying a cyclone number gives all storms for the subset of seasons and basins.
The overpass and environmental files options:
file_type— the low-Earth orbit satellite sensor or platform abbreviation or the environmental fileenv
Version options:
version— optional TC PRIMED version (i.e.,v01r01)version_type— optional TC PRIMED version type (i.e.,final,preliminary) withfinalbeing the default
Date time group start and end range options:
start_date— optional inclusive start date (file date time stamp must be greater than or equal to this value)end_date— optional exclusive end date (file date time stamp must be less than to this value)
As with the example above, object_keys can be examined to see if the query matches expectations.
Download
This option is best for repeatedly accessing a small subset of TC PRIMED files.
$ python
>>> import tcprimedapi
>>> tcpc = tcprimedapi.Client()
>>> tcpc.query({'atcf_id': ['al092019'],
... 'file_type': ['GMI']})
>>> target_dirname = 'save_here'
>>> tcpc.download(target_dirname=target_dirname)
In Memory
This option is best for one-time access or for saving a subset of data from TC PRIMED files.
$ python
>>> import tcprimedapi
>>> tcpc = tcprimedapi.Client()
>>> tcpc.query({'atcf_id': ['al092019'],
... 'file_type': ['GMI']})
>>> file_iter = tcpc.inmemory()
Metadata
Release files for tcprimedapi 1.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tcprimedapi-1.0b0.tar.gz | 12.5 kB | Without provenance | Details for tcprimedapi-1.0b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tcprimedapi-1.0b0-py3-none-any.whl | Python 3 | none | any | Details for tcprimedapi-1.0b0-py3-none-any.whl |
Total release size: 22.2 kB
Release files / tcprimedapi-1.0b0.tar.gz
| Download URL | tcprimedapi-1.0b0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20d55c1a277b9cb74ae5314b17c6e3b771a17b5b8ab66314506cf12516a451ec
|
|
BLAKE2b-256 checksum How to use checksums |
ac3ca20c4482808fab1182617732f5188b475a1ff6c42c3547ba528531e02829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.19
|
Release files / tcprimedapi-1.0b0-py3-none-any.whl
| Download URL | tcprimedapi-1.0b0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0d15da6a826ec9aab99f7e6c529f85bcef02520a1bd186d79b277d628d462cd
|
|
BLAKE2b-256 checksum How to use checksums |
9312afd4af796be0b8d1f101fa04157f02690bb683b684eca02b8f040d8997e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.19
|
Security for tcprimedapi 1.0b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.