coecms / ARCCSSive

ARCCSS Data Access Tools
Apache License 2.0
3 stars 1 forks source link

Updates to the README #8

Closed DamienIrving closed 7 years ago

DamienIrving commented 8 years ago

I've had a couple of issues when following the instructions in the README:

1. pip missing on Raijin

When I login to Raijin and follow the README instructions I get the following:

[dbi599@raijin4 ~]$ module use ~access/modules
[dbi599@raijin4 ~]$ module load pythonlib/ARCCSSive
[dbi599@raijin4 ~]$ pip install --user ARCCSSive
pip: Command not found.

2. Index error on accessing filenames

The sequence of commands above (plus the additional export command) works fine on the virtual desktop, however once in the IPython notebook I get the following error:

In [1]: from ARCCSSive import CMIP5
In [2]: cmip = CMIP5.DB.connect()
        for output in cmip.outputs(model='ACCESS1-0'):
              variable = output.variable
              files = output.filenames()

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-2-d1bfedb22569> in <module>()
      2 for output in cmip.outputs(model='ACCESS1-0'):
      3     variable = output.variable
----> 4     files    = output.filenames()

/home/599/dbi599/.local/lib/python2.7/site-packages/ARCCSSive/CMIP5/Model.pyc in filenames(self)
    100         :returns: List of file names
    101         """
--> 102         return self.latest()[0].filenames()
    103 
    104     def drstree_path(self):

/home/599/dbi599/.local/lib/python2.7/site-packages/ARCCSSive/CMIP5/Model.pyc in latest(self)
     89             vlatest.append(valid[-1])
     90             i=-2
---> 91             while i>-len(valid) and valid[i].version==vlatest[1]:
     92                 vlatest.append(valid[i])
     93                 i+=-1

IndexError: list index out of range
ScottWales commented 8 years ago

Thanks Damien,

For the first issue pip install is not needed on Raijin, it is loaded by the module command. pip is only required on the Virtual Desktops. Would adding the system name to a prompt help clarify this?

raijin $ module load pythonlib/arccssive

vs.

vdi $ pip install arccssive

I will investigate the other issue for you

paolap commented 8 years ago

Ok, I know what's breaking this an irregular version "hus_timestamp", it occured to me before that I should keep that into account and then forgot about it, yet another exception to keep track of thanks for spotting this

DamienIrving commented 8 years ago

Sorry about point number 1, @ScottWales. I should have read the README more closely and realised that the pip install wasn't meant for Raijin. Your idea of adding a system name is probably a good one for people who skim the document like I did.

@paolap No problem

paolap commented 8 years ago

ok, that was actually not the issue but the vlatest index in 91 should have been "0". I think I must have fix this before and then re-introduced the bug somewhere. It's fixed now. Can you check and let me know if it works?