Coder Social home page Coder Social logo

pet_forecast's Introduction

pet_forecast

Create physiological equivalent temperature (PET) forecasts from opendata.dwd.de NWP.

Installation: Not really documented.

  • To update the online data you will need to be able to make git push to https://github.com/David-Rayner-GVC/pet_data using ssh. GitPython
  • need cdo Climate Data Operators, with eccodes and netcdf4, obviously.
  • Python modules netcdf4, GitPython, matplotlib, cdo. Plus xarray, lxml, everything else pretty standard.
  • https://github.com/biglimp/PETCalculatorWEB - what, this is not public???
  • modify config_RENAME_ME.py to represent your local setup

The script full_workflow:

  • download and pre-process NWP files to local netcdf, one file for each variable.
  • extract (and publish to GIT) forecast-time-series for a particular locations, based on pet_json
  • stash the forecasts in local netcdf files, one per location, for future analysis.

If you just want to retrieve a file from pet_json, use pet_git_integration_lib.RetrieveForecast. You'll need gitpython, but you don't need any authentication.

To-Do

  • No checks whether local grid files are up-to-date, they are just downloaded. This can break things if a new forecast is being written (see below)
  • no optimization of the time-series extraction, it is just a loop over locations. So the netcdf files are opened/closed/re-opened many times. But hey, that is what file-system caching is for, and it seems to run fast enough.

Things that can go wrong:

  • if the download starts before DWD has finished writing out the files for a new forecast, the script will fail with a warning about non-unique time-series. To minimize problems, the script is run at UTC+2 times:

local times for long runs: 6, 12, 18, 24 local times for short runs: 2,8,14,20

(As these are local time, the UTC+ varies with day-light savings)

pet_forecast's People

Contributors

david-rayner-gvc avatar

Watchers

 avatar

Forkers

qichen-dtt

pet_forecast's Issues

Question about PET calculation

Dear Rayner,
I have read your PET forecast program and i have a question about PET calculation.
There is a module called "petprocessingprognose" in pet_extraction_lib.py file, but i can't find any further information about that module, and it seems to have a lot to do with PET computing.
So where i can get the detail about "petprocessingprognose"?

Thanks

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.