Coder Social home page Coder Social logo

na-ski-forecasting's Introduction

Calculate Wetbulb Temperature

Calculating wetbulb temperature with metpy.calc.wet_bulb_temperature is an extremly long and expensive computation that is not well suited to run over large ensemble members (see the docs).

Instead we present a method to calculate wetbulb from an evenely spaced reference grid over the entire range of values for pressure, temperature, and dewpoint respectively. The script wetbulb_generate_reference_grid.py allows you to specify the range of parameters and the resolution at which to compute the reference grid.

For example, the file wetbulb_metpy_lowres_200_1.0_grid.pkl contains the reference grid calculated from the following parameters:

press_min = 51000 # Pa
press_max = 105000 # Pa
press_nlayers = 200

temp_min = -81.0 # degC
temp_max = 48.0 # degC
temp_res = 1.0

dewpoint_min = -81.0
dewpoint_max = 30.0 
dewpoint_res = 1.0

Once the desired reference grid has been computed and saved (this can take several days of runtime), our method can find and return the nearest reference wetbulb value for any set of parameters [temperature, pressure, dewpoint].

To calculate wetbulb over an entire large ensemble member use wetbulb_calc_ensemble_from_reference_grid.py

To calculate wetbulb over any specified region and time use wetbulb_calc_from_reference_grid.py

This "lookup" method is a much quicker and less expensive process that still has good accuracy. The reference grid parameters shown above resulted in a mean absolute error between metpy.calc.wet_bulb_temperature and our method of <0.2 degC for an entire year (n=336). The maximum residual was 0.6 degC. By calculating a finer resolution reference grid, one can achive even better performance.

For information on the CESM Large Ensemble see www.cesm.ucar.edu/projects/community-projects/LENS/

na-ski-forecasting's People

Contributors

lennijusten avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

gaishibo60

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.