Code Monkey home page Code Monkey logo

snowhydrology / opg-cnn-northern-utah-ciroh-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ciroh-ua/opg-cnn-northern-utah-ciroh-workshop

0.0 0.0 0.0 190.31 MB

This workshop offers participants an introduction to convolutional neural networks (CNNs) for their application in hydro-meteorology. The hands-on portion of the workshop focuses on customizing a CNN through hyperparameter exploration, adjusting CNN layers, and manipulating inputs.

Python 85.79% Jupyter Notebook 14.21%

opg-cnn-northern-utah-ciroh-workshop's Introduction

OPG-CNN-Northern-Utah-CIROH-Workshop

Problem Statement

Operational models predicting precipitation often lack the grid spacing to resolve fine-scale precipitation variations within complex terrain. To improve forecasts, precipitation is often downscaled using statistical or dynamical downscaling. These methods have limitations, such as insufficient event-to-event variability or the high computational demand of running fine-scaled model simulations. We've proposed downscaling precipitation in complex terrain from orographic precipitation gradients (OPGs), which represent the relationship between precipitation and elevation, predicted from a Convolutional Neural Network (CNN). The workshop scripts provided here detail the process of predicting OPGs in northern UT using a CNN trained on ECMWF's ERA5.

Workshop Description

This workshop offers participants an introduction to convolutional neural networks (CNNs) for their application in hydro-meteorology. Core concepts to be covered include the layers within a CNN, the learning process of the CNN, and techniques related to Explainable AI (XAI). The hands-on portion of the workshop focuses on customizing a CNN through hyperparameter exploration, adjusting CNN layers, and manipulating inputs. Participants will gain an understanding of CNN architecture, practical skills in customizing a CNN, and the apply the models in Northern Utah for downscaling ERA5 data for the quantity of liquid precipitation. Participants will use GitHub to fork the repository and clone to their machine using the CIROH Cloud Computing environment.

Datasets

  • Bohne et al. 2020 - Climatology of orographic precipitation gradients of the western United States, subsetted to the Northern Utah region of winter (DJF) events from 1988 to 2017.
  • ECMWF ERA5 - Hourly data on pressure levels and single levels from 1940 to present, subsetted to latitudes 36°N – 45°N, longitudes -119°W – -106°W, of winter (DJF) events from 1988 to 2017. This dataset was accessed through the publicly available Copernicus Climate Change Service (C3S) Climate Data Store (CDS). The ERA5 predictor variables were processed from 6-hourly data on pressure levels and 6-hourly data on single levels.

Getting Started Using 2i2c JupyterHub:

1. Fork the Repository to your GitHub

Navigate to the top-right corner of the page, select Fork.

image

Confirm the details of this page and select Create Fork.

image

2. Start CIROH JupyterHub

Go to the CIROH 2i2c JupyterHub

Select the Medium server, which contains 11GB of RAM and 4 CPUs.

In the Image dropdown, select DevCon24 workshop : CNN for downscaling climate forcing variables.

image

3. Clone Repository to your Machine

Identify a location where you would like to work in a development environment. Using the command prompt, change your working directory to this directory and git clone your forked OPG-CNN-Northern-Utah-CIROH-Workshop repository.

git clone https://github.com/YOUR-USERNAME/OPG-CNN-Northern-Utah-CIROH-Workshop

4. Register the Kernel with JupyterHub

Check that the notebook environment is activated.

conda activate notebook

Register the environment's kernel with JupyterHub. I would suggest naming the environment notebook for consistency.

python -m ipykernel install --user --name=YOUR-ENV-NAME

5. Selecting Kernel

From the Jupyter Notebook, select your kernel on the menu bar by selecting Kernel -> Change Kernel -> then select the notebook env from the dropdown menu.

Getting Started Using Personal Computer:

1. Fork the Repository to your GitHub

Navigate to the top-right corner of the page, select Fork.

image

Confirm the details of this page and select Create Fork.

image

2. Clone Repository to your Machine

Identify a location where you would like to work in a development environment. Using the command prompt, change your working directory to this folder and git clone your forked OPG-CNN-Northern-Utah-CIROH-Workshop repository.

git clone https://github.com/YOUR-USERNAME/OPG-CNN-Northern-Utah-CIROH-Workshop

3. Setting up Environment

Create the needed Python environment using the YAML file.

conda env create -f environment.yml

Activate the new environment.

conda activate cnn_env

Register the environment's kernel with JupyterHub. I would suggest naming the environment cnn_env for consistency.

python -m ipykernel install --user --name=YOUR-ENV-NAME

Folder Structure

.
├── datasets                   # Pre-processed ERA5, facets, observed precipitation, and OPGs
├── figures                    # Figures created from the scripts/ files
├── pre-processing             # Pre-process datasets from the western CONUS to northern UT
├── scripts                    # CNN Workshop scripts
├── README.md                 
├── environment_jupyter.yml    # Environment file
└── requirements.txt           # Environment requirements file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.