Skip to content
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

New PR/next steps #29

Closed
2 of 4 tasks
bradyrx opened this issue Jan 11, 2019 · 6 comments
Closed
2 of 4 tasks

New PR/next steps #29

bradyrx opened this issue Jan 11, 2019 · 6 comments
Assignees

Comments

@bradyrx
Copy link
Collaborator

bradyrx commented Jan 11, 2019

@aaronspring, I think you should take on this next PR for a few more updates. I think we're in great shape following the most recent merge -- thanks for all the feedback.

What I think needs to be addressed:

  • (highest priority) Consolidate the damped persistence forecast into a function called compute_damped_persistence and it should work for perfect-model or reference, similar to compute_persistence. I imagine the new _shift function would be included. Currently, there are four separate functions pertaining to damped persistence, which is too much.

  • (medium priority) Remove everything under the "SAMPLE DATA" section. I don't like having extra dependencies we don't need (this involves BeautifulSoup). We can add to our setup.py file a package_data keyword so that users can opt to download our processed sample data with the package.

  • ( low priority) Clean up the perfect-model prediction notebook to be more clear (see the DPLE hindcast notebook now). It would be nice to have a background on what perfect-model means, using the high-level functions, etc.

  • Make sure to install something like flake8 or use your editor that does auto-PEP8. It's best we stay within these standards from every PR forward.

I think we can save the metrics updates for the next PR, unless you want to include it in this one. Basically, we should have a metrics.py submodule that is similar to xskillscore that has speedy metrics.

@bradyrx
Copy link
Collaborator Author

bradyrx commented Jan 11, 2019

Something I noticed after merging. Although your perfect model notebook compiled fine after some edits, two figures changed. I'm not sure if this is because of a data/function change since the notebook was originally uploaded or if I messed something up.

(1) See the table under "Predictability Horizon".

My version (with updated code from PR):

Your version from before the merge:

(2) See the map under "Bootstrapped threshold":

My version:

Your version:

@aaronspring
Copy link
Collaborator

If bootstrap was set to a value less than 500, it might not give stationary thresholds. This then affects PH. I think it’s fine

@bradyrx
Copy link
Collaborator Author

bradyrx commented Jan 12, 2019

See bradyrx/esmtools#4. We should add this load_dataset function to climpred as well. Then we can have sample datasets to load just like in xarray. We should probably rename our sample files to make them easier to recognize and load. We can make the default github_page keyword to this repo and then add an extension to our sample data folder.

@bradyrx
Copy link
Collaborator Author

bradyrx commented Jan 12, 2019

Okay, the load_dataset feature is done without needing any new dependencies. Example:

from climpred.loadutils import open_dataset, get_datasets

get_datasets()
>>> 'MPI-DP-1D': decadal prediction ensemble area averagesof SST/SSS/AMO.
>>> 'MPI-DP-3D': decadal prediction ensemble lat/lon/timeof SST/SSS/AMO.
>>> 'MPI-control-1D': area averages for the control run ofSST/SSS.
>>> 'MPI-control-3D': lat/lon/time for the control run ofSST/SSS.
>>> 'CESM-DP': decadal prediction ensemble of global meanSSTs.
>>> 'CESM-LE': uninitialized ensemble of global mean SSTs.
>>> 'ERSST': observations of global mean SSTs.
>>> 'CESM-reference': hindcast simulation that initializesCESM-DP.

open_dataset('CESM-reference')
<xarray.Dataset>
Dimensions:     (d2: 2, time: 816)
Coordinates:
  * time        (time) datetime64[ns] 1948-01-31 1948-02-29 ... 2015-12-31
    z_t         float32 ...
Dimensions without coordinates: d2
Data variables:
    time_bound  (time, d2) float64 ...
    SST         (time) float32 ...

@aaronspring
Copy link
Collaborator

I would prefer to label my current data as perfect-model. MPI-PM-LY-1D

@bradyrx
Copy link
Collaborator Author

bradyrx commented Jan 13, 2019

Updated in 9ff9534. I did keep "DP" instead of "LY" for consistency with CESM.

@bradyrx bradyrx closed this as completed Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants