openclimatefix / metoffice_ec2

Subset Met Office MOGREPS-UK and UKV on AWS EC2
MIT License
11 stars 2 forks source link

Functions and test to generate a plot from MOGREPS wind from direction data in Zarr format #16

Closed tomwhite closed 4 years ago

tomwhite commented 4 years ago

This is an initial PR to generate images in PNG format from NWP data. It provides the functions that will form the basis of a regular cron job to save images on S3. I used fsspec so that it will be straightforward to use the S3 implementation (the unit test uses the local filesystem implementation).

I've included a Zarr file (actually files) for testing. I thought about using a zipped version, but thought that having the unzipped version is more like what will be stored on S3, so there's less to go wrong.

tomwhite commented 4 years ago

Changed my mind - using a zipped Zarr is quite easy.

JackKelly commented 4 years ago

Sorry for the slow reply! Looks great to me! (And I learnt a few things, too! I hadn't seen f-strings before - very cool! I'll definitely start using f-strings and pathlib!) Thanks so much for this PR. Very readable!