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

CMIP5BranchTimes.json not included in durolib install #33

Open
durack1 opened this issue Nov 25, 2018 · 3 comments
Open

CMIP5BranchTimes.json not included in durolib install #33

durack1 opened this issue Nov 25, 2018 · 3 comments

Comments

@durack1
Copy link
Owner

durack1 commented Nov 25, 2018

This is an issue with incomplete PR resolving #6

In [8]: durolib.cmipBranchTime('ACCESS1-0','historical','r1i1p1')
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-8-39b564340367> in <module>()
----> 1 durolib.cmipBranchTime('ACCESS1-0','historical','r1i1p1')

anaconda2/envs/cdat80py2/lib/python2.7/site-packages/durolib/durolib.py in cmipBranchTime(model, experiment, r1i1p1)
    107     """
    108     # Load dictionary into memory
--> 109     cmip5 = json.load(open('CMIP5BranchTimes.json','r'))
    110     # Validate user input
    111     cm5Models = ['model','ACCESS1-0','ACCESS1-3','BNU-ESM','CCSM4','CESM1-BGC',

IOError: [Errno 2] No such file or directory: 'CMIP5BranchTimes.json'

In [9]: ls anaconda2/envs/cdat80py2/lib/python2.7/site-packages/durolib/
__init__.py  __init__.pyc  colourLib.py  colourLib.pyc  durolib.py  durolib.pyc  makeStericLib.py  makeStericLib.pyc  oceanLib.py  oceanLib.pyc
@doutriaux1
Copy link
Contributor

you need the files in your setup.py see the "share" section at: https://github.com/CDAT/vcs/blob/master/setup.py#L37
or
https://github.com/PCMDI/pcmdi_metrics/blob/master/setup.py#L137

If you have an "Egg" you then need to access them as seen at:
https://github.com/PCMDI/pcmdi_metrics/blob/master/tests/test_pmp_portraits.py#L12-L14
and
https://github.com/PCMDI/pcmdi_metrics/blob/master/tests/test_pmp_portraits.py#L58

if not an egg use:
sys.prefix+"share/filename"

@durack1
Copy link
Owner Author

durack1 commented Mar 13, 2019

Closed by #34

@durack1 durack1 closed this as completed Mar 13, 2019
@durack1
Copy link
Owner Author

durack1 commented Sep 24, 2019

Need to update following the latest Gregory (September 2019) contributions, see PCMDI/pcmdi.github.io#318

@durack1 durack1 reopened this Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants