{"id":39279,"name":"PyPRECIS","description":"A learning tool to faciliate processing of regional climate model output.","url":"https://github.com/MetOffice/PyPRECIS","last_synced_at":"2026-05-02T02:02:34.965Z","repository":{"id":41666608,"uuid":"109696209","full_name":"MetOffice/PyPRECIS","owner":"MetOffice","description":"PyPRECIS is the python based training environment for Met Office PRECIS training courses.","archived":false,"fork":false,"pushed_at":"2025-07-13T14:37:36.000Z","size":10996,"stargazers_count":20,"open_issues_count":13,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-23T22:03:26.710Z","etag":null,"topics":["applied-science","climate-model-evaluation","cordex","iasas","python3","regional-climate-model","training-materials","visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MetOffice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.ipynb","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-06T13:04:45.000Z","updated_at":"2025-07-13T14:37:11.000Z","dependencies_parsed_at":"2025-07-25T08:03:41.967Z","dependency_job_id":"3f28bad6-60fb-4155-b269-5d22870b8815","html_url":"https://github.com/MetOffice/PyPRECIS","commit_stats":{"total_commits":298,"total_committers":12,"mean_commits":"24.833333333333332","dds":0.7013422818791946,"last_synced_commit":"de27cf17a218f3886dcffa24b9eee1d947b3f8ba"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/MetOffice/PyPRECIS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetOffice","download_url":"https://codeload.github.com/MetOffice/PyPRECIS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32510943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"MetOffice","name":"Met Office","uuid":"6997732","kind":"organization","description":"The Met Office is the UK's National Weather Service","email":"enquiries@metoffice.gov.uk","website":"www.metoffice.gov.uk","location":"Exeter, UK","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/6997732?v=4","repositories_count":61,"last_synced_at":"2024-04-14T06:14:32.860Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/MetOffice","funding_links":[],"total_stars":274,"followers":192,"following":0,"created_at":"2022-11-08T05:53:36.466Z","updated_at":"2024-04-14T06:14:49.829Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetOffice","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetOffice/repositories"},"packages":[],"commits":{"id":1350002,"full_name":"MetOffice/PyPRECIS","default_branch":"main","total_commits":302,"total_committers":10,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":30.2,"dds":0.705298013245033,"past_year_total_commits":2,"past_year_total_committers":1,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":2.0,"past_year_dds":0.0,"last_synced_at":"2026-05-01T20:14:32.998Z","last_synced_commit":"83f4133a7a06de6c9b0968385a123c58084490b5","created_at":"2023-09-12T10:45:44.642Z","updated_at":"2026-05-01T20:13:28.513Z","committers":[{"name":"Steptoe, Hamish","email":"hamish.steptoe@metoffice.gov.uk","login":"hsteptoe","count":89},{"name":"zmaalick","email":"zubair.maalick@metoffice.gov.uk","login":"zmaalick","count":82},{"name":"Nick Savage","email":"nhsavage42@gmail.com","login":"nhsavage","count":71},{"name":"Josh Wiggs","email":"joshua.wiggs@metoffice.gov.uk","login":"JoshuaWiggs","count":23},{"name":"balazagi","email":"ssadri@vld711.cmpd1.metoffice.gov.uk","login":null,"count":16},{"name":"saeed.sadri","email":"ssadri@eld319.cmpd1.metoffice.gov.uk","login":null,"count":8},{"name":"gredmond","email":"grace.redmond@metoffice.gov.uk","login":"gredmond-mo","count":6},{"name":"saeed.sadri","email":"ssadri@vld153.cmpd1.metoffice.gov.uk","login":null,"count":5},{"name":"Rosanna","email":"34257276+rosannaamato","login":"rosannaamato","count":1},{"name":"CM Team","email":"cmteam-metoffice","login":"cmteam-metoffice","count":1}],"past_year_committers":[{"name":"Joshua Wiggs","email":"joshua.wiggs@metoffice.gov.uk","login":"JoshuaWiggs","count":2}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-02T00:00:10.230Z","repositories_count":6224728,"commits_count":900452522,"contributors_count":34908105,"owners_count":1147776,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"MetOffice/PyPRECIS","html_url":"https://github.com/MetOffice/PyPRECIS","last_synced_at":"2026-04-05T13:00:31.008Z","status":"error","issues_count":52,"pull_requests_count":56,"avg_time_to_close_issue":14402233.609756097,"avg_time_to_close_pull_request":1177555.2142857143,"issues_closed_count":41,"pull_requests_closed_count":56,"pull_request_authors_count":6,"issue_authors_count":5,"avg_comments_per_issue":1.75,"avg_comments_per_pull_request":0.9107142857142857,"merged_pull_requests_count":55,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":3,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":1035.3333333333333,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":3,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.3333333333333333,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":3,"created_at":"2023-09-12T10:46:15.285Z","updated_at":"2026-04-05T13:00:31.009Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetOffice%2FPyPRECIS/issues","issue_labels_count":{"enhancement":9,"paused":4,"review needed":1},"pull_request_labels_count":{"enhancement":1},"issue_author_associations_count":{"COLLABORATOR":38,"CONTRIBUTOR":14},"pull_request_author_associations_count":{"COLLABORATOR":39,"CONTRIBUTOR":20},"issue_authors":{"nhsavage":25,"zmaalick":13,"hsteptoe":10,"JoshuaWiggs":3,"rosannaamato":1},"pull_request_authors":{"nhsavage":23,"zmaalick":16,"JoshuaWiggs":15,"balazagi":3,"rosannaamato":1,"hsteptoe":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-02T00:00:10.923Z","repositories_count":14458604,"issues_count":34117436,"pull_requests_count":111959079,"authors_count":11250973,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"COLLABORATOR":1},"past_year_pull_request_author_associations_count":{"COLLABORATOR":4},"past_year_issue_authors":{"hsteptoe":1},"past_year_pull_request_authors":{"JoshuaWiggs":4},"maintainers":[{"login":"nhsavage","count":48,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/nhsavage"},{"login":"JoshuaWiggs","count":18,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/JoshuaWiggs"},{"login":"hsteptoe","count":11,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/hsteptoe"}],"active_maintainers":[{"login":"JoshuaWiggs","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/JoshuaWiggs"},{"login":"hsteptoe","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/hsteptoe"}]},"events":{"total":{"DeleteEvent":4,"IssueCommentEvent":2,"PushEvent":3,"PullRequestEvent":6,"PullRequestReviewEvent":4,"CreateEvent":2},"last_year":{"DeleteEvent":2,"IssueCommentEvent":1,"PushEvent":2,"PullRequestReviewEvent":2,"PullRequestEvent":3,"CreateEvent":1}},"keywords":["applied-science","climate-model-evaluation","cordex","iasas","python3","regional-climate-model","training-materials","visualization"],"dependencies":[{"ecosystem":"conda","filepath":"environment.yml","sha":null,"kind":"manifest","created_at":"2025-07-25T08:03:40.570Z","updated_at":"2025-07-25T08:03:40.570Z","repository_link":"https://github.com/MetOffice/PyPRECIS/blob/main/environment.yml","dependencies":[{"id":24321695139,"package_name":"boto3","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695140,"package_name":"cdo","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695141,"package_name":"dask","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695142,"package_name":"iris","ecosystem":"conda","requirements":"3.6.*","direct":true,"kind":"runtime","optional":false},{"id":24321695143,"package_name":"iris-sample-data","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695144,"package_name":"jupyter","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695145,"package_name":"matplotlib","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695146,"package_name":"nc-time-axis","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695147,"package_name":"nco","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695148,"package_name":"ncview","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695149,"package_name":"numpy","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695150,"package_name":"pre-commit","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695151,"package_name":"python","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":24321695152,"package_name":"tqdm","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false}]}],"score":5.799092654460527,"created_at":"2023-09-12T07:49:22.599Z","updated_at":"2026-05-02T02:02:34.967Z","avatar_url":"https://github.com/MetOffice.png","language":"Jupyter Notebook","category":"Sustainable Development","sub_category":"Education","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# PyPRECIS\n\n\u003ch4 align=\"center\"\u003e\nPyPRECIS is the python based training environment for Met Office PRECIS training courses.\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n\u003c!-- Github Sheilds - comment out until repo is public --\u003e\n\u003c!-- https://shields.io/ is a good source of these --\u003e\n\u003ca href=\"https://github.com/MetOffice/PyPRECIS/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/tag/MetOffice/PyPRECIS.svg\"\n        alt=\"Latest version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/MetOffice/PyPRECIS/commits/master\"\u003e\n     \u003cimg src=\"https://img.shields.io/github/commits-since/MetOffice/PyPRECIS/latest.svg\"\n          alt=\"Commits since last release\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/github/release-date/MetOffice/PyPRECIS.svg\"\n    alt=\"Release date\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/github/repo-size/MetOffice/PyPRECIS.svg\"\n    alt=\"Repo size\" /\u003e\u003c/a\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/metoffice/PyPRECIS?style=flat\"\u003e\n    \u003c/p\u003e\n\u003cbr\u003e\n\n\n\n## Overview\nPyPRECIS 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.\n\nPyPRECIS is built on [Jupyter Notebooks](https://jupyter.org/), with data processing performed in python, making use of [Iris](https://scitools.org.uk/iris/docs/latest/). 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](install-conda-env.md). \n\nThe 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](https://cordex.org/experiment-guidelines/cordex-core/cordex-core-simulations/). There is also a [Special issue of Climate Dynamics](https://link.springer.com/journal/382/volumes-and-issues/57-5) which gives more information about this data. There are also a set of notebooks which analyse the 20CR-DS data set covering China.\n\n## Contents\nThe teaching elements of PyPRECIS are contained in the `notebooks` directory. The core primary worksheets are:\n\nWorksheet | Aims\n:----: | -----------\n[1](notebooks/worksheet1.ipynb) | \u003cli\u003eIdentify and list the names of CORDEX output data in netCDF format using standard Linux commands.\u003cli\u003eUse basic Iris commands to load data files, and view Iris cubes.\u003c/li\u003e\u003cli\u003eUse Iris commands to merge netCDF files - Take a subset of the data based on a date range - Save the output as NetCDF files. \u003c/li\u003e\n[2](notebooks/worksheet2.ipynb) | \u003cli\u003eApply basic statistical operations to Iris cubes\u003c/li\u003e\u003cli\u003ePlot information from Iris cubes\u003c/li\u003e\n[3](notebooks/worksheet3.ipynb) | \u003cli\u003eExtract specific regions of interested from large datasets\u003c/li\u003e\u003cli\u003eApply more advanced statistical operations to multi-annual data\u003c/li\u003e\u003cli\u003eProduce your own data processing workflow\u003c/li\u003e  \n[4](notebooks/worksheet4.ipynb) | \u003cli\u003eCalculate difference and percentage differences across cubes\u003c/li\u003e\u003cli\u003ePlot cubes using different plotting methods and with an appropriate colour scale\u003c/li\u003e\u003cli\u003eCreate time series anomalies of precipitation and tempeature\u003c/li\u003e  \n[5](notebooks/worksheet5.ipynb) | \u003cli\u003eHave an appreciation for working with daily model data\u003c/li\u003e\u003cli\u003eUnderstand how to calculate some useful climate extremes statistics\u003c/li\u003e\u003cli\u003eBe aware of some coding stratagies for dealing with large data sets\u003c/li\u003e\n[6](notebooks/worksheet6.ipynb) | An extended coding exercise designed to allow you to put everything you've learned into practise  \n\nAdditional tutorials specific to the CSSP 20th Century reanalysis dataset:\n\nWorksheet | Aims\n:----: | -----------\n[CSSP 1](notebooks/CSSP_20CRDS_Tutorials/Introduction.ipynb) | \u003cli\u003eHow to use a cloud based platform to analyse the 20CR-DS dataset\u003c/li\u003e\u003cli\u003eSetting up a python environment\u003c/li\u003e\n[CSSP 2](notebooks/CSSP_20CRDS_Tutorials/tutorial_1_data_access.ipynb) | \u003cli\u003eHow to load data into Xarrays format\u003c/li\u003e\u003cli\u003eHow to convert the data xarrays into iris cube format\u003c/li\u003e\u003cli\u003eHow to perform basic cube operations\u003c/li\u003e\n[CSSP 3](notebooks/CSSP_20CRDS_Tutorials/tutorial_3_basic_analysis.ipynb) | \u003cli\u003eCalculate and visualise annual and monthly means\u003c/li\u003e\u003cli\u003eCalculate and visualise seasonal means\u003c/li\u003e\u003cli\u003eCalculate mean differences (anomalies)\u003c/li\u003e\n[CSSP 4](notebooks/CSSP_20CRDS_Tutorials/tutorial_4_advance_analysis.ipynb) | \u003cli\u003eCalculate frequency of wet days\u003c/li\u003e\u003cli\u003eCalculate percentiles\u003c/li\u003e\u003cli\u003eCalculate some useful climate extremes statistics\u003c/li\u003e\n\nThree additional worksheets are available for use by workshop instructors:\n\n* `makedata.ipynb`: Provides scripts for preparing raw model output for use in notebook exercises.\n* `worksheet_solutions.ipyn`: Solutions to worksheet exercices.\n* `worksheet6example.ipynb`: Example code for Worksheet 6.\n\n## Data\nFor information on how to access the CORDEX-Core data used in these worksheets, see: [CORDEX: How to access the data](https://cordex.org/data-access/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.\n\nData 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](https://zarr.readthedocs.io/en/stable/) 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](https://zenodo.org/record/2558135).\n\n\n\n## Contributing\nInformation on how to contribute can be found in the [Contributing guide](CONTRIBUTING.md).\nPlease 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.\n\n## Licence\nPyPRECIS is licenced under BSD 3-clause licence for use outside of the Met Office.\n\n\u003ch5 align=\"center\"\u003e\n\u003cimg src=\"notebooks/img/MO_MASTER_black_mono_for_light_backg_RBG.png\" width=\"200\" alt=\"Met Office\"\u003e \u003cbr\u003e\n\u0026copy; British Crown Copyright 2018 - 2022, Met Office\n\u003c/h5\u003e\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["iris","ciid","climate-analysis"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/39279","html_url":"https://ost.ecosyste.ms/projects/39279"}