gridded_obs a package for the verification of gridded observations
-
Any quantity, does not care about units
-
Easy to add readers
-
Contingency scores
-
Lmin from Fraction Skill Score
-
Correlation coefficient
Like other verification packages, Obtaining score figures with gridded_obs is a two-step process. 1. Compute atomic scores for each forecast that will be verified 2. Aggregate scores for a given period, lead time, start hour, etc.
Getting the code
To get gridded_obs, simply clone this repository.
Add gridded_obs to your working conda environment
-
Activate a conda environment with a Python installation.
If you don't already have one, you can build one with:
conda create -n gridded_obs_test_environment python cartopy numpy matplotlib dask scipy
Here,
gridded_obs_test_environmentis the name of the environment we are creating. You can chose any other name. -
Install gridded_obs and domcmc
pip install gridded_obs domcmc
If you are not using "standard" files used at the CMC in Dorval, you can omit to install domcmc.
ALTERNATIVELY,
If you want make modifications to gridded_obs, you can install the editable package.
Install dependencies manually:
conda install dask domutils domcmc -c dja001
Install an editable version of gridded_obs:
pip install --editable /path/to/gridded_obs/package
1- Compute atomic scores
Atomic scores can be computed from an interactive session on a compute node.
-
Start by requesting a compute node on one of the PPPs
qsub -I -lselect=1:ncpus=80:mem=185gb,place=scatter:excl -lwalltime=6:0:0 -
Activate the conda environment that allows to run gridded_obs
First get access to
condawitheval "$(/fs/ssm/main/opt/intelcomp/master/inteloneapi_2022.1.2_multi/oneapi/intelpython/python3.9/bin/conda shell.bash hook)"Ignore the error:
-bash: syntax error near unexpected token '(', I don't know why it shows up and things still work...Then activate your gridded_obs environment
conda activate gridded_obs_test_environmentIf this works, you should see
(gridded_obs_test_environment)at the beginning of your shell prompt. -
Make a local copy of the launch script that you will be using
cp .../gridded_obs/scripts/launch_verification.sh ./your_launch_script.shThe script name is not important but its helpful to relate it to a given project so that the verification can be reproduced later if needed.
-
Edit
your_launch_script.shfor the experiments and date range that you want to compare. Most default option should be good as a start. -
Compute scores
./your_launch_script.shSay you verify precipitation every 10 minutes for 12 hours = 96 lead times in total. You can expect the verification to take approx one minute.
-
View images
The images have been generated in the output directory specified by the
figure_diroption in the launch script. I like to use firefox to look at them in mypublic_html.
2- Aggregate scores and generate images
Aggregating scores and making figures is easy and takes no time.
-
Make a local copy of the launch script that you will be using
cp .../gridded_obs/scripts/launch_aggregate.sh ./your_aggregate_script.sh
and edit it for the experiments, period and scores that you want to plot.
-
Run it in your conda environment
./your_aggregate_script.sh
The figures will be in a directory listing all experiments being verified.
Use multiple compute nodes to accelerate computation of scores
If you are verifying a large number of forecasts, computing sores can take a while. To accelerate this, we can trow more resources at the problem.
Open an interactive session with 10 compute nodes:
qsub -I -lselect=80:ncpus=10:mpiprocs=10:mem=23gb,place=scatter:excl -lwalltime=6:0:0
# activate your conda env with dask
conda activate gridded_obs_test_environment
Start a dask cluster that will use the 10 nodes. This can take a little while.
. ssmuse-sh -x main/opt/intelcomp/master/inteloneapi-mpi_2022.1.2_all
. ssmuse-sh -d /home/mde000/ssm/maestro-dask-cluster/0.6
start_dask_cluster
Compute scores 10x faster than before
./your_launch_script.sh
Stop cluster when you are done using it
stop_dask_cluster
Metadata
Release files for gridded-obs 1.0.5
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 |
|---|---|---|---|---|
| gridded_obs-1.0.5.tar.gz | 53.7 kB | Without provenance | Details for gridded_obs-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gridded_obs-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for gridded_obs-1.0.5-py3-none-any.whl |
Total release size: 115.1 kB
Release files / gridded_obs-1.0.5.tar.gz
| Download URL | gridded_obs-1.0.5.tar.gz |
|---|---|
| Size | 53.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb00934fd3e2d061870287d37d00669511cf1259f44e38b837d52fd6e7038029
|
|
BLAKE2b-256 checksum How to use checksums |
18c2da4ccc63c0bd75fa2b8d5be1656243af348f7c541de68e73fdddb065d31f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / gridded_obs-1.0.5-py3-none-any.whl
| Download URL | gridded_obs-1.0.5-py3-none-any.whl |
|---|---|
| Size | 61.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9bdc854371cad27f756040d3fb3e37bb73a2423ac0fd45abd7e7b03dcc9333f
|
|
BLAKE2b-256 checksum How to use checksums |
2653123415dafd8813f998c47aa0e33d50acf5e749126f1379945cc16db12684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for gridded-obs 1.0.5
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.