metoffice / catnip Goto Github PK
View Code? Open in Web Editor NEWClimate Analysis Tool: Now In Python
License: Other
Climate Analysis Tool: Now In Python
License: Other
Add return value to the function remove_forecast_coords() and update the unittests
There are currently dependencies in the code to some external libraries/packages as mentioned in : #14 (comment) we need to list these and then decide what is the best way to include them. So far I have found these:
But let me know if you know of anymore!
There are some suggestions in this git article
Write a doc tests for plot functions
Apply black and add test for black compliance to pytest. Check carefully if it breaks any doctests
Get the basic set of documentation of the current function.
This issue should be solved after getting regrouping of functions
#18 removed ASCEND and to make sure that the doctests pass extract_rot_cube was also removed from preparation.py
This should be reintroduced using a different approach which does not use ASCEND
Given a 2D field on a rotated pole grid, calculate a regular lat-lon grid that has the same resolution but on a regular lat-lon grid. There should be two options:
list all of the libraries that your project depends on in a file called requirement.txt and specify versions of those packages that are known to work. One line for each package e.g.
iris==2.2.0
improver==0.10.0
To enable people to install CATNIP we need to create a setup.py file and use the setuptools package to tell Python how to install the code.
Make a overall structure of library.
for reference: see iris repo
A new function to help populate fields within the cdsapi
retrieve()
function. Mainly to make dealing with date ranges quicker. The function would take a from
and to
date, and options to specify variables and time interval (frequency). This could be extended to use dask
for parallel retrievals.
VARS = ['10m_u_component_of_wind', '10m_v_component_of_wind']
getera5(from='2019-05-23', to='2019-05-30', var=VARS, freq='H')
or for a parallel version
FROMS=['2019-05-23', '2008-12-25']
TOS = ['2019-05-30', '2009-01-05']
VARS = ['10m_u_component_of_wind', '10m_v_component_of_wind']
getera5(from=FROMS, to=TOS, var=VARS, freq='H')
to retrieve different time means for the same period
getera5(from=['2019-05-23', '2019-05-23'], to= ['2019-05-30', '2019-05-30'],
var=VARS, freq=['H', 'M'])
pandas
to deal with date range wranglingpandas
frequency aliases: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliasescdsapi
retrievalsFunctions need to regroup and filenames needs to change accordingly.
Add return values to the function and update the unittests
PEP8 states:
https://www.python.org/dev/peps/pep-0008/#naming-conventions
"The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent -- nevertheless, here are the currently recommended naming standards. New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred."
This issue will review our existing code and where it does not meet the naming conventions change the code to align it with those standards
With reference to George Ford's ASKS presentation (attached below), I wonder if there is something that can be incorporated here...
Need to check that his suggested method is still up-to-date with respect to Dask etc. but I think the principal still holds... could be used in #17
documentation pages need updating and rebuilding to reflect the recent changes made to the function regrouping.
Updates required to documentation after the 20/05/20 meeting:
Write new "how to" sections
Implement unittest for utils.date_chunk
Add return value to the function add_bounds and update the unittests
Develop unittests for utils.get_date_range()
unittests should include all possible positive and negative tests
.pyc files (and others) should not be under version control and to make sure they are not added, we need a .gitignore file. We should also consider deleting any .pyc files etc that are already under verison control
Implement a separate data access module i.e. config.py
Implement a doc test to be run with single command in command line
add return values to the function coord_system and update the unittests
add return values to the function add_time_coord_cats()
for the Doc tests, test data should reside in the repo.
a separate directory "test data" should contain the data and change the paths in every doc test accordingly
as we cannot source ASCEND from any public repo, we should remove the function extract_rot_cube from preparation.py and then at a later date replace this with an approach which doesn't use ascend.shape
identifying and adding any MO specific instructions to a separate section in the documentation titled
Make use of git hooks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.