Skip to content

Commit 3bdd39b

Browse files
authored
Merge pull request #450 from dbekaert/dev
Release: v0.3.0
2 parents 4197fea + a46cd4b commit 3bdd39b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1318
-1419
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
eval "$($HOME/bin/micromamba shell hook -s posix)"
4444
micromamba activate RAiDER
4545
python -m pip install .
46-
python -c "import RAiDER; from RAiDER.delay import main"
46+
python -c "import RAiDER; from RAiDER.delay import tropo_delay"
4747
python -c "import RAiDER; from RAiDER.interpolator import interp_along_axis"
4848
- run:
4949
name: Run unit tests

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.3.0]
10+
RAiDER package was refactored to expose the main functionality as a Python library, including the `prepareWeatherModel`
11+
and `tropo_delay` functions, as well as anciliarry functions needed for defining AOIs, look vectors, etc.
12+
13+
### New/Updated Features
14+
+ Python library access to main functions for accessing weather model data and calculating delays
15+
+ Slant delay calculation through projection is supported for cubes with orbit files
16+
+ Upgrade dem-stitcher to [`>=2.3.1`](https://github.com/ACCESS-Cloud-Based-InSAR/dem-stitcher/blob/dev/CHANGELOG.md#231) so that the updated urls for the GLO-30 DEM are used.
17+
+ `raider.py ++calcDelaysGUNW GUNWFILE` is enabled as a placeholder only.
18+
+ Upgraded ISCE3 to `>=v0.9.0` to fix a conda build issue as described in [#425](https://github.com/dbekaert/RAiDER/issues/425)
19+
+ Allow user to specify --download_only or download_only=True in the configure file
20+
+ Added documentation for the Python library interface.
21+
+ Added some unit tests.
22+
+ Fixed some bugs and tweaked the CLI.
23+
+ Added unit tests, docstrings, initial API reference
24+
+ __main__ file to allow calls to different functionality. `raider.py ++process downloadGNSS ...` can now perform the functionality of `raiderDownloadGNSS.py ...
25+
26+
27+
928
## [0.2.0]
1029

1130
RAiDER package was refactored to use a configure file (yaml) to parse parameters. In addition, ocker container images

README.md

100755100644
Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# RAiDER
2+
23
Raytracing Atmospheric Delay Estimation for RADAR
34

45
[![Language](https://img.shields.io/badge/python-3.7%2B-blue.svg)](https://www.python.org/)
@@ -13,15 +14,18 @@ Copyright (c) 2019-2022, California Institute of Technology ("Caltech"). All rig
1314
THIS IS RESEARCH CODE PROVIDED TO YOU "AS IS" WITH NO WARRANTIES OF CORRECTNESS. USE AT YOUR OWN RISK.
1415

1516
## Contents
16-
- [1. Getting Started](#1-getting-started)
17-
- [Installing With Conda](#installing-with-conda)
18-
- [Using the Docker Image](#using-the-docker-image)
19-
- [Installing from Source](#installing-from-source)
20-
- [2. Setup of third party weather model access](#2-setup-of-third-party-weather-model-access)
21-
- [3. Running RAiDER and Documentation](#3-running-raider-and-documentation)
22-
- [4. Citing](#4-citation)
23-
- [5. Contributors](#5-contributors)
17+
18+
1. [Getting Started](#1-getting-started)
19+
- [Installing With Conda](#installing-with-conda)
20+
- [Using the Docker Image](#using-the-docker-image)
21+
- [Installing from Source](#installing-from-source)
22+
2. [Setup of third party weather model access](#2-setup-of-third-party-weather-model-access)
23+
3. [Running RAiDER and Documentation](#3-running-raider-and-documentation)
24+
4. [Citing](#4-citation)
25+
5. [Development](#5-development)
26+
- [Contributors](#contributors)
2427
------
28+
2529
## 1. Getting Started
2630

2731
RAiDER has been tested on the following systems:
@@ -31,6 +35,7 @@ RAiDER has been tested on the following systems:
3135
RAiDER does **not** currently run on arm64 processors on Mac. We will update this note once the build becomes available.
3236

3337
### Installing With Conda
38+
3439
RAiDER is available on [conda-forge](https://anaconda.org/conda-forge/raider). __[Conda](https://docs.conda.io/en/latest/index.html)__ is a cross-platform way to use Python that allows you to setup and use "virtual environments." These can help to keep dependencies for different sets of code separate. We recommend using [Miniforge](https://github.com/conda-forge/miniforge), a conda environment manager that uses conda-forge as its default code repo. Alternatively,see __[here](https://docs.anaconda.com/anaconda/install/)__ for help installing Anaconda and __[here](https://docs.conda.io/en/latest/miniconda.html)__ for installing Miniconda.
3540

3641
Installing RAiDER:
@@ -40,6 +45,7 @@ conda activate RAiDER
4045
```
4146

4247
### Using the Docker image
48+
4349
RAiDER provides a [docker container image](https://docs.docker.com/get-started/) with all the necessary dependencies pre-installed. To get the latest released version:
4450
```
4551
docker pull ghcr.io/dbekaert/raider:latest
@@ -64,32 +70,43 @@ cd work
6470
```
6571
For more docker run options, see: <https://docs.docker.com/engine/reference/run/>.
6672

67-
### Installing from source
68-
You can also install RAiDER directly from source. Doing so is recommended for those who would like to [contribute to the source code](https://github.com/dbekaert/RAiDER/blob/dev/CONTRIBUTING.md), which we heartily encourage! For more details on installing from source see [here](https://github.com/dbekaert/RAiDER/blob/dev/Installing_from_source.md).
69-
```
70-
git clone https://github.com/dbekaert/RAiDER.git
71-
cd RAiDER
72-
conda create -f environment.yml
73-
conda activate RAiDER
74-
python -m pip install -e .
75-
```
73+
7674
------
7775
## 2. Setup of third party weather model access
78-
RAiDER has the ability to download weather models from third-parties; some of which require license agreements. See [here](WeatherModels.md) for details.
76+
77+
RAiDER has the ability to download weather models from third-parties; some of which require license agreements. See [here](https://github.com/dbekaert/RAiDER/blob/dev/docs/WeatherModels.md) for details.
7978

8079
------
8180
## 3. Running RAiDER and Documentation
81+
8282
For detailed documentation, examples, and Jupyter notebooks see the [RAiDER-docs repository](https://github.com/dbekaert/RAiDER-docs).
83-
We welcome contributions of other examples on how to leverage the RAiDER (see [here](https://github.com/dbekaert/RAiDER/blob/master/CONTRIBUTING.md) for instructions).
83+
We welcome contributions of other examples on how to leverage the RAiDER (see [here](https://github.com/dbekaert/RAiDER/blob/dev/CONTRIBUTING.md) for instructions).
8484
``` raiderDelay.py -h ``` provides a help menu and list of example commands to get started.
85-
The RAiDER scripts are highly modulized in Python and allows for building your own processing workflow.
85+
The RAiDER scripts are highly modularized in Python and allows for building your own processing workflow.
8686

8787
------
8888
## 4. Citation
8989
TODO
9090

9191
------
92-
## 5. Contributors
92+
## 5. Development
93+
94+
Contributions are welcome and heartily encourage! See our [contributing guide](https://github.com/dbekaert/RAiDER/blob/dev/CONTRIBUTING.md).
95+
96+
### Development install
97+
For development, we recommend installing directly from source.
98+
```
99+
git clone https://github.com/dbekaert/RAiDER.git
100+
cd RAiDER
101+
conda create -f environment.yml
102+
conda activate RAiDER
103+
python -m pip install -e .
104+
```
105+
For more details on installing from source see [here](https://github.com/dbekaert/RAiDER/blob/dev/docs/Installing_from_source.md).
106+
107+
------
108+
### Contributors
109+
93110
* David Bekaert
94111
* Jeremy Maurer
95112
* Raymond Hogenson
File renamed without changes.
Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
# Accessing weather model data
2-
RAiDER has built-in support for a number of different weather models. RAiDER provides all of the interfacing to data servers required to access data for the different weather models, although some weather models require a license agreement and accounts to be set-up. Instructions for accessing data, including license-limited data, are provided below. It is the user's responsibility to accept license agreements for whatever model is desired.
2+
RAiDER has built-in support for a number of different weather models. RAiDER provides all the interfacing to data servers required to access data for the different weather models, although some weather models require a license agreement and accounts to be set-up. Instructions for accessing data, including license-limited data, are provided below. It is the user's responsibility to accept license agreements for whatever model is desired.
33

44
In addition, RAiDER provides functionality for adding additional weather models. See the [RAiDER-docs repository](https://github.com/dbekaert/RAiDER-docs) page on how to do this. We would love to expand the suite of supported models, and welcome any contributions. Please see the contributing guidelines or reach out through an issue ticket for help.
55

66
------
77

8-
## Contents
8+
## 1. Usage
99

10-
1. [NOAA weather models (HRRR)](#noaa-weather-models-(hrrr))
11-
2. [ECMWF weather models (ERA5, ERA5T, ERAI, HRES)](#ecmwf-weather-models-(era5,-era5t,-erai,-hres))
12-
3. [NASA weather models (GMAO, MERRA2)](#nasa-weather-models-(gmao,-merra2))
10+
::: RAiDER.processWM.prepareWeatherModel
11+
options:
12+
show_root_heading: true
13+
heading_level: 3
1314

14-
#Potential download failure:#
15+
### Potential download failure
1516
ERA-5/ERA-I products require access to the ESA Copernicus servers. GMAO and MERRA-2 products require access to the NASA Earthdata servers. If you are unable to download products, ensure that you have registered and have downloaded the public API key, and accepted/added the license/application for type of product you wish to download as detailed below.
1617

1718
------
1819

19-
## 1. NOAA weather models (HRRR)
20-
High-resolution rapid refresh (HRRR) weather model data products are generated by __[NOAA](https://rapidrefresh.noaa.gov/hrrr/)__ for the coninental US (CONUS) but not archived beyond three days. However a public __[archive](home.chpc.utah.edu/~u0553130/Brian_Blaylock/hrrr_FAQ.html)__ is available at the University of Utah. This archive does not require a license agreement. This model has the highest spatial resolution available in RAiDER, with a horizontal grid spacing of about 3 km, and is provided in a Lambert conformal conic projection.
21-
22-
[return to table of content](#contents)
23-
20+
## 2. NOAA weather models (HRRR)
21+
High-resolution rapid refresh (HRRR) weather model data products are generated by __[NOAA](https://rapidrefresh.noaa.gov/hrrr/)__ for the coninental US (CONUS) but not archived beyond three days. However, a public __[archive](home.chpc.utah.edu/~u0553130/Brian_Blaylock/hrrr_FAQ.html)__ is available at the University of Utah. This archive does not require a license agreement. This model has the highest spatial resolution available in RAiDER, with a horizontal grid spacing of about 3 km, and is provided in a Lambert conformal conic projection.
2422

2523
------
2624

27-
## 2. ECMWF weather models (ERA5, ERA5T, ERAI, HRES)
25+
## 3. ECMWF weather models (ERA5, ERA5T, ERAI, HRES)
2826
The Copernicus Climate Data Store (CDS) provides access to the European Centre for Medium-Range Weather Forecasts (__[ECMWF](https://www.ecmwf.int/)__) provides a number of different weather models, including ERA5 and ERA5T reanalysis models.
2927

3028
The ECMWF provides access to both reanalysis and real-time prediction models. You can read more information about their reanalysis models __[here](https://www.ecmwf.int/en/research/climate-reanalysis)__ and real-time model __[here](https://www.ecmwf.int/en/forecasts/datasets/catalogue-ecmwf-real-time-products)__. ECMWF models are global, with horizontal resolution of about 30 km for ERA-I, ERA-5, and ERA-5T, and 6 km for Hi-RES. All of these models come in a global projection (EPSG 4326, WGS-84).
@@ -34,41 +32,47 @@ The ECMWF provides access to both reanalysis and real-time prediction models. Yo
3432
2. Confirm your email, etc.
3533
3. Install the public API key and client as instructed __[here](https://cds.climate.copernicus.eu/api-how-to)__:
3634

37-
a. Copy the URL and API key from the webpage into a file in your home directory name ~/.cdsapirc
38-
url: https://cds.climate.copernicus.eu/api/v2
39-
key: your_key_here
40-
__**Note**: the key represents the API key obtained upon the registration of CDS API, and should be replaced with the user's own information.__
41-
42-
b. Install the CDS API using pip:
43-
pip install cdsapi
44-
___**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER___
35+
a. Copy the URL and API key from the webpage into a file in your home directory name `~/.cdsapirc`
36+
37+
url: https://cds.climate.copernicus.eu/api/v2
38+
key: your_key_here
39+
40+
**Note**: the key represents the API key obtained upon the registration of CDS API, and should be replaced with the user's own information.
41+
42+
b. Install the CDS API using pip
43+
44+
pip install cdsapi
45+
46+
**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER
47+
4548
4. You must accept the [license](https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products) for each product you wish to download.
4649

4750

4851
### Accessing ERAI, HRES
4952

5053
ECMWF requires a license agreement to be able to access, download, and use their products. Instructions for completing this process is below.
5154

52-
1. Create an account on the ECMWF servers __[here](https://accounts.ecmwf.int/auth/realms/ecmwf/protocol/openid-connect/auth?response_type=code&scope=openid%20email&client_id=apache-www&state=sBYlpcTRPhat8d6uuM9swLCxuP8&redirect_uri=https%3A%2F%2Fwww.ecmwf.int%2Foidc.cgi&nonce=RyEzBUy4m6oo_HxRQEmJxbc5jrKY4KFZd1Usgi8cpnM)__. The ERA-I model is open-access, while HRES requires a special liscence agreement.
55+
1. Create an account on the ECMWF servers __[here](https://accounts.ecmwf.int/auth/realms/ecmwf/protocol/openid-connect/auth?response_type=code&scope=openid%20email&client_id=apache-www&state=sBYlpcTRPhat8d6uuM9swLCxuP8&redirect_uri=https%3A%2F%2Fwww.ecmwf.int%2Foidc.cgi&nonce=RyEzBUy4m6oo_HxRQEmJxbc5jrKY4KFZd1Usgi8cpnM)__. The ERA-I model is open-access, while HRES requires a special licence agreement.
5356
2. Confirm your email, etc.
5457
3. Install the public API key and client as instructed __[here](https://confluence.ecmwf.int/display/WEBAPI/Access+ECMWF+Public+Datasets#AccessECMWFPublicDatasets-key)__:
5558

56-
a. Copy the URL and API key from the webpage into a file in your home directory name ~/.ecmwfapirc
57-
{
58-
"url" : "https://api.ecmwf.int/v1",
59-
"key" : your key here,
60-
"email" : your email here
61-
}
59+
a. Copy the URL and API key from the webpage into a file in your home directory name `~/.ecmwfapirc`
60+
61+
{
62+
"url" : "https://api.ecmwf.int/v1",
63+
"key" : your key here,
64+
"email" : your email here
65+
}
6266

63-
__**Note**: the email that is used to register the user account, and the key represents the API key obtained upon the registration of ECMWF API, and should be replaced with the user's own information.__
67+
**Note**: the email that is used to register the user account, and the key represents the API key obtained upon the registration of ECMWF API, and should be replaced with the user's own information.
6468

65-
b. Install the ECMWF API using pip:
66-
```pip install ecmwf-api-client```
67-
___**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER___
69+
b. Install the ECMWF API using pip:
6870

69-
[return to table of content](#contents)
71+
pip install ecmwf-api-client`
7072

71-
### 3. NASA weather models (GMAO, MERRA2)
73+
**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER
74+
75+
## 4. NASA weather models (GMAO, MERRA2)
7276

7377
1. The Global Modeling and Assimilation Office (__[GMAO](https://www.nccs.nasa.gov/services/data-collections/coupled-products/geos5-forecast#:~:text=The%20Global%20Modeling%20and%20Assimilation,near%2Dreal%2Dtime%20production.)__) at NASA generates reanalysis weather models. GMAO products can also be accessed without a license agreement through the pyDAP interface implemented in RAiDER. GMAO has a horizontal grid spacing of approximately 33 km, and its projection is EPSG code 4326 (WGS-84).
7478

@@ -85,17 +89,14 @@ Reference: __[The Modern-Era Retrospective Analysis for Research and Application
8589
login <USERNAME>
8690
password <PASSWORD>
8791

88-
__**Note**: the username and password represent the user's username and password.__
92+
**Note**: the username and password represent the user's username and password.
8993

9094
4. Add the application `NASA GESDISC DATA ARCHIVE` by clicking on the `Applications->Authorized Apps` on the menu after logging into your Earthdata profile, and then scrolling down to the application `NASA GESDISC DATA ARCHIVE` to approve it. _This seems not required for GMAO for now, but recommended to do so for all OpenDAP-based weather models._
9195
5. Install the OpenDAP using pip:
9296

9397
pip install pydap==3.2.1
9498
9599

96-
___**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER___
100+
**Note**: this step has been included in the conda install of RAiDER, thus can be omitted if one uses the recommended conda install of RAiDER
97101

98-
___**Note**: PyDAP v3.2.1 is required for now (thus specified in the above pip install command) because the latest v3.2.2 (as of now) has a known [bug](https://colab.research.google.com/drive/1f_ss1Oa3VzgAOd_p8sgekdnLVE5NW6s5) in accessing and slicing the GMAO data. This bug is expected to be fixed in newer versions of PyDAP.___
99-
100-
[return to table of content](#contents)
101-
102+
**Note**: PyDAP v3.2.1 is required for now (thus specified in the above pip install command) because the latest v3.2.2 (as of now) has a known [bug](https://colab.research.google.com/drive/1f_ss1Oa3VzgAOd_p8sgekdnLVE5NW6s5) in accessing and slicing the GMAO data. This bug is expected to be fixed in newer versions of PyDAP.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

docs/macros.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import requests
2+
3+
import RAiDER
4+
5+
6+
def define_env(env):
7+
"""Macros Hook"""
8+
9+
@env.macro
10+
def raider_version():
11+
return RAiDER.__version__
12+
13+
@env.macro
14+
def get_content(url):
15+
response = requests.get(url)
16+
response.raise_for_status()
17+
return response.content.decode()

docs/reference.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# RAiDER *v{{ raider_version() }}* API Reference
2+
3+
::: RAiDER
4+
options:
5+
show_submodules: true

docs/reference_td.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
***`tropo_delay`***
2+
3+
::: RAiDER.delay

docs/tutorials.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Tutorials
2+
3+
{{ get_content('https://raw.githubusercontent.com/dbekaert/RAiDER-docs/main/README.md') }}

0 commit comments

Comments
 (0)