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

Cannot read AVHRR in HRPT format (geoloc dtype error) #175

Closed
howff opened this issue Jan 31, 2018 · 4 comments · Fixed by #1531
Closed

Cannot read AVHRR in HRPT format (geoloc dtype error) #175

howff opened this issue Jan 31, 2018 · 4 comments · Fixed by #1531
Assignees
Milestone

Comments

@howff
Copy link

howff commented Jan 31, 2018

satpy 0.8.1 pyorbital 1.1.1

Trying to load AVHRR in HRPT format

satpy/readers/hrpt.py calls
        s_times = sgeom.times(
            self.times[:, np.newaxis]).ravel()
pyorbital/geoloc.py calls
        tds = [timedelta(seconds=i) for i in self._times]
        return np.array(tds) + start_of_scan

The last line gives the error:
TypeError: ufunc add cannot use operands with types dtype('O') and dtype('<M8[ms]')

  File "/packages/pytroll/bin/satpy_to_png.py", line 229, in process_list_of_filenames
    global_scene.load([band_name])
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/scene.py", line 564, in load
    self.read(**kwargs)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/scene.py", line 505, in read
    return self.read_datasets(nodes, **kwargs)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/scene.py", line 378, in read_datasets
    new_datasets = reader_instance.load(ds_ids, **kwargs)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/yaml_reader.py", line 875, in load
    ds = self._load_dataset_with_area(dsid, coords)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/yaml_reader.py", line 853, in _load_dataset_with_area
    ds = self._load_dataset_data(file_handlers, dsid, **slice_kwargs)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/yaml_reader.py", line 713, in _load_dataset_data
    proj = self._load_entire_dataset(dsid, ds_info, file_handlers)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/yaml_reader.py", line 631, in _load_entire_dataset
    projectable = fh.get_dataset(dsid, ds_info)
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/hrpt.py", line 149, in get_dataset
    lons, lats = self.get_lonlats()
  File "/packages/pytroll/local/lib/python2.7/site-packages/satpy/readers/hrpt.py", line 236, in get_lonlats
    self.times[:, np.newaxis]).ravel()
  File "/packages/pytroll/local/lib/python2.7/site-packages/pyorbital/geoloc.py", line 128, in times
    return np.array(tds) + start_of_scan
TypeError: ufunc add cannot use operands with types dtype('O') and dtype('<M8[ms]')
@howff
Copy link
Author

howff commented Feb 1, 2021

Trying satpy==0.23

error: cannot import name 'Dataset'

Trying satpy==0.22

error: operands could not be broadcast together with shapes
and
'str' object has no attribute 'date_of_launch'

@djhoese
Copy link
Member

djhoese commented Feb 1, 2021

It seems this isn't the highest priority for the original developers. I'll let them comment if there has been any progress, but otherwise (since we are doing this when we have free time) I'm not sure when it will get worked on.

@gerritholl
Copy link
Collaborator

gerritholl commented Feb 1, 2021

@howff I think most users preprocess HRPT data with AAPP, then use the avhrr_l1b_aapp reader to read the AAPP output. I didn't even know Satpy had a reader for reading HRPT data directly.

@mraspaud
Copy link
Member

mraspaud commented Feb 3, 2021

@howff I just pushed PR #1531, could you check if it fixes the problem for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants