-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anomalizer #14
base: master
Are you sure you want to change the base?
Anomalizer #14
Conversation
Merge develop
Update documentation, fix CI
* Update sphinx documentation * Update .coveragerc * Update test-requirements.txt
added MIT License
* Update sphinx documentation * Update .coveragerc * Update test-requirements.txt * Change cell grid image * Update .gitmodules * Add new submodule * Change test data path * Change url to http
* Update sphinx documentation * Update .coveragerc * Update test-requirements.txt * Change cell grid image * Update .gitmodules * Add new submodule * Change test data path * Change url to http * Add pyyaml * Add empty .coveralls.yml * Add pytest-cov * add coveralls.yml without token * Add gitattributes older pytest version * Change travis installation scheme * Fix typo * Update .gitattributes * Update .travis.yml
Fix docs requirements file name
Update reader, support new versions, restructure
Re-added xrcube.py script - why was it removed in the first place? Need to adapt code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package needs a major overhaul anyway, so I'm not too picky about the updates, but lets still try to keep it clean for the most part ;)
) | ||
|
||
|
||
if __name__ == '__main__': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please delete if __name__ ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either move to test or to docs if we should keep it
end of the considered period. Format: 'YYYY-mm-dd' | ||
**Note**: defines size of the netCDF stack | ||
|
||
Attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or fill out
# apply the function which uses the icdr and tcdr | ||
out = funct(icdr_ts, tcdr_ts, **fun_kwargs) | ||
|
||
assert type(out) == pd.Series, "The given function should return a Series" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally AssertionErrors should only be raised in Tests
if grid_subset is None: | ||
grid_subset = self.grid | ||
|
||
print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print statement or replace with log function
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
self._fillvalue_in = -777777. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to omit this, or can be make this more dynamic?
cellds = self.read_cell(cell, **kwargs) | ||
ds.append(cellds) | ||
|
||
print("Combining cell datasets in a global cube") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print -> log
@@ -12,36 +12,42 @@ | |||
import pandas as pd | |||
import os | |||
|
|||
from c3s_sm.interface import fntempl | |||
from interface import fntempl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure that this works?
@@ -592,14 +596,14 @@ def iter_ts(self, **kwargs): | |||
def write_ts(self, *args, **kwargs): | |||
pass | |||
|
|||
|
|||
if __name__ == '__main__': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
@@ -217,24 +229,24 @@ def read_ts(self, | |||
def write_stack(self, out_file, **kwargs): | |||
vars = [v for v in list(self.ds.variables.keys()) if v not in self.ds.coords.keys()] | |||
|
|||
encoding = {v : {'zlib': True, 'complevel': 6} for v in vars} | |||
encoding = {v: {'zlib': True, 'complevel': 6} for v in vars} | |||
|
|||
with ProgressBar(): | |||
self.ds.to_netcdf(out_file, encoding=encoding, **kwargs) | |||
|
|||
|
|||
if __name__ == '__main__': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
I think that comes from another branch |
Functions to combine a Thematic CDR (for climatology) and a Interim CDR (for operative data) to apply anomalies/percentiles or custom functions and generate stacks with results ready to be plotted