nasa / RHEAS

Regional Hydrologic Extremes Assessment System
MIT License
73 stars 54 forks source link

IRI and [domain] #17

Closed AdamJDuncan closed 8 years ago

AdamJDuncan commented 8 years ago

Whenever I try downloading IRI data with a [domain] it returns:

mrc@mrc-VPCZ114GX:/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/bin$ ./rheas -u dataPP.conf
Updating database!
Traceback (most recent call last):
  File "./rheas", line 17, in <module>
    sys.exit(rheas.run())
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/rheas.py", line 76, in run
    update(dbname, config_filename)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/rheas.py", line 64, in update
    mod.download(dbname, dt, bbox)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/datasets/iri.py", line 80, in download
    data = pds.variables["prob"][tt, m, i, j, ci]
  File "_netCDF4.pyx", line 3611, in netCDF4._netCDF4.Variable.__getitem__ (netCDF4/_netCDF4.c:31275)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/eggs/netCDF4-1.2.2-py2.7-linux-x86_64.egg/netCDF4/utils.py", line 391, in _out_array_shape
    c = count[..., i].ravel()[0] # All elements should be identical.
IndexError: index out of bounds

It DOES work without a [domain] but hangs after a dozen or so tiles (creating a corrupted precip.iri that can't be dropped but is deleted by autovacuum). This has been the case for many locations, domain sizes, and years.

Does the [domain] need to align with IRI's grid, maybe, or is it something else?

Thanks, Adam

AdamJDuncan commented 8 years ago

OK... yes it works for large areas like

minlat: 10 maxlat: 20 minlon: 100 maxlon: 130

seems to be a bug for smaller areas and "creases".

AdamJDuncan commented 8 years ago

OK this is also an issue with NCEP, where it seems to run into problems with bounding boxes of a certain size... I think a lot of the "brick walls" I've had with RHEAS were in fact caused by this.

AdamJDuncan commented 8 years ago

The modification fixed this issue, thank you.