Tropospheric Delay Estimation workflow for global OPERA TROPO products.
Creates the science application software (SAS) using the RAiDER library.
- Download source code:
git clone https://github.com/opera-adt/opera_tropo.git
- Install dependencies, either to a new environment:
mamba env create --name opera_tropo --file tropo/conda-env.yml
conda activate opera_tropo
or install within your existing env with mamba.
- Install
tropo
via pip in editable mode
python -m pip install --no-deps -e tropo
There are 5 entrypoints for the OPERA-TROPO workflow
- Download HRES model *.nc from s3 bucket to local directory
opera_tropo download -s3 "bucket_path" --date 20190613 --hour 06
- Run troposphere phase delay estimation, require configuration file default configs can be found in opera_tropo/config/default
opera_tropo config -input input_data/D06130600061306001.zz.nc -out output/ -c runconfig.yaml
- Run troposphere phase delay estimation, require configuration file default configs can be found in opera_tropo/config/default NOTE: processing datetime is changing for each output filename
opera_tropo run runconfig.yaml
- Make browser image. NOTE. browse-image is created druing run routine Default height level 800m, plot image at different level
opera_tropo make-browse -i OPERA_L4_TROPO_GLOBAL_20190101T000000Z_20250130T232942Z_HRES_0.1_v0.1.nc --height 100
- Validate: golden_dataset vs output.
opera_tropo validate OPERA_L4_TROPO_20190613T060000Z_20250206T182940Z_HRES_0.1_v0.1.nc output/OPERA_L4_TROPO_20190613T060000Z_20250206T201820Z_HRES_0.1_v0.1.nc
We use pre-commit to automatically run linting, formatting, and mypy type checking.
Additionally, we follow numpydoc
conventions for docstrings.
To install pre-commit locally, run:
pre-commit install
This adds a pre-commit hooks so that linting/formatting is done automatically. If code does not pass the checks, you will be prompted to fix it before committing.
Remember to re-add any files you want to commit which have been altered by pre-commit
. You can do this by re-running git add
on the files.
Since we use black for formatting and flake8 for linting, it can be helpful to install these plugins into your editor so that code gets formatted and linted as you save.
After making functional changes and/or have added new tests, you should run pytest to check that everything is working as expected.
First, install the extra test dependencies:
python -m pip install --no-deps -e .[test]
Then run the tests:
pytest
To build the docker image, run:
docker build -f Dockerfile -t opera_tropo .
which will print out instructions for running the image.
or
./docker/build-docker-image.sh --tag my-tag