PyPRECIS

A learning tool to faciliate processing of regional climate model output.
https://github.com/MetOffice/PyPRECIS

Category: Sustainable Development
Sub Category: Education

Keywords

applied-science climate-model-evaluation cordex iasas python3 regional-climate-model training-materials visualization

Keywords from Contributors

iris ciid climate-analysis

Last synced: about 9 hours ago
JSON representation

Repository metadata

PyPRECIS is the python based training environment for Met Office PRECIS training courses.

README.md

PyPRECIS

Overview

PyPRECIS is principally designed as a learning tool to faciliate processing of regional climate model (RCM) output. It is desgined to be used in conjunction with taught workshops in an instructor led environment. The name PyPRECIS is a refefence to the initial version of these notebooks which were designed for analysis of data from the PRECIS model but the training is now designed to be more general.

PyPRECIS is built on Jupyter Notebooks, with data processing performed in python, making use of Iris. A conda environment is provided to install these packages, along with their dependencies. A guide containing instructions on how to install the conda environment can be found here.

The data analysed in the first set of notebooks is from the CORDEX-Core simulations which provide an ensemble of high-resolution (at least 25 km) regional climate change information. Further information about CORDEX-Core can be found on the CORDEX website. There is also a Special issue of Climate Dynamics which gives more information about this data. There are also a set of notebooks which analyse the 20CR-DS data set covering China.

Contents

The teaching elements of PyPRECIS are contained in the notebooks directory. The core primary worksheets are:

Worksheet Aims
1 Identify and list the names of CORDEX output data in netCDF format using standard Linux commands.Use basic Iris commands to load data files, and view Iris cubes.Use Iris commands to merge netCDF files - Take a subset of the data based on a date range - Save the output as NetCDF files.
2 Apply basic statistical operations to Iris cubesPlot information from Iris cubes
3 Extract specific regions of interested from large datasetsApply more advanced statistical operations to multi-annual dataProduce your own data processing workflow
4 Calculate difference and percentage differences across cubesPlot cubes using different plotting methods and with an appropriate colour scaleCreate time series anomalies of precipitation and tempeature
5 Have an appreciation for working with daily model dataUnderstand how to calculate some useful climate extremes statisticsBe aware of some coding stratagies for dealing with large data sets
6 An extended coding exercise designed to allow you to put everything you've learned into practise

Additional tutorials specific to the CSSP 20th Century reanalysis dataset:

Worksheet Aims
CSSP 1 How to use a cloud based platform to analyse the 20CR-DS datasetSetting up a python environment
CSSP 2 How to load data into Xarrays formatHow to convert the data xarrays into iris cube formatHow to perform basic cube operations
CSSP 3 Calculate and visualise annual and monthly meansCalculate and visualise seasonal meansCalculate mean differences (anomalies)
CSSP 4 Calculate frequency of wet daysCalculate percentilesCalculate some useful climate extremes statistics

Three additional worksheets are available for use by workshop instructors:

  • makedata.ipynb: Provides scripts for preparing raw model output for use in notebook exercises.
  • worksheet_solutions.ipyn: Solutions to worksheet exercices.
  • worksheet6example.ipynb: Example code for Worksheet 6.

Data

For information on how to access the CORDEX-Core data used in these worksheets, see: CORDEX: How to access the data. Most CORDEX data is available for unrestricted use but some is provided for non commercial use only. Before you download any CORDEX data you must ensure you are aware of the Terms of Use for the data you are accessing.

Data relating to the CSSP 20CRDS tutorials is held online in an Azure Blob Storage Service. To access this data user will need a valid shared access signature (SAS) token. The data is in Zarr format and the total volume is ~2TB. The data is in hourly, 3 hourly, 6 hourly, daily and monthly frequencies stored seperatrely under the metoffice-20cr-ds container on MS-Azure. Monthly data only is also via Zenodo.

Contributing

Information on how to contribute can be found in the Contributing guide.
Please also consult the CONTRIBUTING.ipynb for information on formatting the worksheets in Jupyter Notebooks. Note that we do not currently make use of Jupyter Lab as it doesn't currently support the types of html formatting we use in Jupyter Notebooks.

Licence

PyPRECIS is licenced under BSD 3-clause licence for use outside of the Met Office.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 300
Total Committers: 10
Avg Commits per committer: 30.0
Development Distribution Score (DDS): 0.703

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Steptoe, Hamish h****e@m****k 89
zmaalick z****k@m****k 82
Nick Savage n****2@g****m 71
Josh Wiggs j****s@m****k 21
balazagi s****i@v****k 16
saeed.sadri s****i@e****k 8
gredmond g****d@m****k 6
saeed.sadri s****i@v****k 5
Rosanna 3****o 1
CM Team c****e 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 51
Total pull requests: 54
Average time to close issues: 6 months
Average time to close pull requests: 14 days
Total issue authors: 5
Total pull request authors: 6
Average comments per issue: 1.78
Average comments per pull request: 0.94
Merged pull request: 53
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: 32 minutes
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/MetOffice/PyPRECIS

Top Issue Authors

  • nhsavage (25)
  • zmaalick (13)
  • hsteptoe (9)
  • JoshuaWiggs (3)
  • rosannaamato (1)

Top Pull Request Authors

  • nhsavage (23)
  • zmaalick (16)
  • JoshuaWiggs (10)
  • balazagi (3)
  • rosannaamato (1)
  • hsteptoe (1)

Top Issue Labels

  • enhancement (9)
  • paused (4)
  • review needed (1)

Top Pull Request Labels

  • enhancement (1)

Dependencies

environment.yml pypi

Score: 5.736572297479192