Create met office site archive#133
Conversation
Tests and updates for packages/data/load.py
Pull Request Test Coverage Report for Build 16120407929Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
…EarthTools into create-met-office-site-archive
There was a problem hiding this comment.
Looks good!
Just a couple of things:
- The path to the era5 data needs to be changed to use the data in dscop.
- Best approach for importing the package? I had to pip install (I've left some comments about this next to the relevant lines)
- @stevehadd suggested that it might be nice to have some summary stats, perhaps for a single location across multiple times?
- Here is some code that can be used to make the plots nicer (add labels and titles where necessary):
ERA5
fig1 = plt.figure(figsize=(16,8)) ax1 = fig1.add_subplot(1,1,1,projection=ccrs.PlateCarree()) ax1.coastlines() era5_data.t2m.plot(ax=ax1, cmap=cmap, vmin=vmin, vmax=vmax)
UKV
fig1 = plt.figure(figsize=(16,8)) ax2 = fig1.add_subplot(1,1,1,projection=ccrs.RotatedPole()) # ax2.coastlines() # this wasn't working at this scale for some reason moukv_data.air_temperature.plot(ax=ax2, cmap=cmap, vmin=270, vmax=300)
Moglobal:
fig1 = plt.figure(figsize=(16,8)) ax1 = fig1.add_subplot(1,1,1,projection=ccrs.PlateCarree()) #ax1.coastlines() moglobal_data.air_temperature.plot(ax=ax1, cmap=cmap, vmin=vmin, vmax=vmax)
packages/met_office_site_archive/src/site_archive_met_office/__init__.py
Outdated
Show resolved
Hide resolved
…_init__.py Co-authored-by: millerjoel <joel.miller@metoffice.gov.uk>
…EarthTools into create-met-office-site-archive
|
I've updated the charts. In terms of adding statistics this may be better to do as a new issue as it will require a new API method to access descriptive stats from a accessor class. |
|
This all looks broadly reasonable. As discussed in our meeting, I have reviewed this to confirm (a) nothing will pose any problem for general PyEarthTools users and (b) nothing seems egregious. I did read through everything. Obviously I can't perform any manual testings since I am in a different computing environment. It all seemed quite reasonable. Feel free to ask more specific questions if you want me to provide any post-merge feedback on the change. |
Overview
Create a Met Office site archive module that can be used to access data on disk at the Met Office.
There is a config approach to detach the paths to dataset locations from the PyEarthTools repo. Met Office staff will need to add the config file to their own home dir for PET to register the locations.
Changes
New Met Office Site Archive files:
Changes / updates to existing files:
Testing
Add the .pyearthtoolsconfig file (not sure where to host this yet) to your home directory and attempt to run the Using the Met Office site archive tutorial notebook. You can also use the .set_directory() method as detailed in the notebook to add paths manually.
Considerations
It is evident there will be duplication between different site archives. Is it worth thinking about a 'Universal' site archive where common open source datasets such as ERA5 are located to prevent duplication.
This is just a start to the Met Office archive, it will require development and improvement but does work with some demo data for now. Most changes are new files in the new met office archive. Whilst there are many 'files changed' most are new files, with little changes to existing pyearthtools files.
Closes #128