Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajberkley/surface_client
https://github.com/ajberkley/surface_client
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ajberkley/surface_client
- Owner: ajberkley
- Created: 2019-10-14T19:07:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T06:46:12.000Z (about 2 years ago)
- Last Synced: 2024-12-15T10:12:38.507Z (21 days ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# surface_client
A Python client to interface with surface.canadarasp.com which serves archived HRDPS surface data.# Downloading from git:
git clone https://github.com/ajberkley/surface_client.git
# Installation on UNIX
To install on a unix machine:
```
# Make sure you have python 3.7 installed
sudo apt-get install python3.7 # Ubuntu
sudo dnf install python37 # Fedora
```
Then
```
cd surface_client
virtualenv -p `which python3.7` env # or python3.7 -m venv env
source env/bin/activate
pip install -r requirements.txt
```# Installation on Windows
For windows: Install python 3.7. Start a command shell and navigate to where you have
downloaded or installed the surface_client code, then type the following:
```
pip install virtualenv
virtualenv env
env\Scripts\activate
pip install -r requirements.txt
python surface_client.py
```# Usage
To get a list of options:```python surface_client.py -h```
Getting one variable at a single point over a time sequence
```python surface_client.py -lon -122.0 -lat 48.0 -start 2019-12-23T00:00:00Z -end 2019-12-23T01:00:00Z -var sfc_temp```
Getting one variable at a single point over a time sequence, specifying time in PST:
```python surface_client.py -lon -122.0 -lat 48.0 -start 2019-12-23T07:00:00-07:00 -end 2019-12-23T08:00:00-07:00 -var sfc_temp```
Getting a variable across a rectangular region over a time sequence:
```python surface_client.py -lon -122.0 -lat 48.0 -lon2 -122.01 -lat2 48.1 -start 2019-12-23T00:00:00Z -end 2019-12-23T01:00:00Z -var wind```
To have the output timestamps converted from UTC time to local time:
```python surface_client.py --localtime -lon -122.0 -lat 48.0 -lon2 -122.01 -lat2 48.1 -start 2019-12-23T00:00:00Z -end 2019-12-23T01:00:00Z -var wind```
To output to a file:
```python surface_client.py --localtime -lon -122.0 -lat 48.0 -lon2 -122.01 -lat2 48.1 -start 2019-12-23T00:00:00Z -end 2019-12-23T01:00:00Z -var wind -output output.csv```