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

GOES Composites failling #552

Closed
simonrp84 opened this issue Dec 16, 2018 · 4 comments · Fixed by #553
Closed

GOES Composites failling #552

simonrp84 opened this issue Dec 16, 2018 · 4 comments · Fixed by #553

Comments

@simonrp84
Copy link
Member

Describe the bug
If I try to create a composite based upon a GOES-16 image then I get an error message saying that there is no matching dataset

To Reproduce

# Your code here
from		satpy			 import Scene
from		glob				 import glob
import	os

BASE_DIR		=	{my_in_dir}
OUT_DIR		=	{my_out_dir}

count			=	0
fnames	=	glob(os.path.join(BASE_DIR, 'OR*-Rad*-*C01*.nc'))
fnames.sort()

incount			=	1
f		=	fnames[0]

infs	=	glob(f.replace('C01', 'C*')[:len(BASE_DIR) + 50] + '*.nc')
scn	=	Scene(reader='abi_l1b', filenames=infs)

print('	-	Processing',incount,'of',len(fnames))
scn.load(['convection'])
new	=	scn.resample(scn.min_area(), resampler='native')
outf	=	OUT_DIR+'GOES_'+str(incount).zfill(4)+'.png'

new.save_dataset('convection', outf)

**Expected behavior**
A PNG file to be created in OUT_DIR that shows the generated convection composite for a given timeslot.

**Actual results**
Traceback (most recent call last):
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/readers/__init__.py", line 301, in __getitem__
    return super(DatasetDict, self).__getitem__(item)
KeyError: 'convection'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/scene.py", line 1043, in save_dataset
    return writer.save_dataset(self[dataset_id],
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/scene.py", line 616, in __getitem__
    return self.datasets[key]
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/readers/__init__.py", line 303, in __getitem__
    key = self.get_key(item)
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/readers/__init__.py", line 292, in get_key
    best=best, **dfilter)
  File "/network/aopp/apres/users/proud/Progs/conda/lib/python3.6/site-packages/satpy/readers/__init__.py", line 243, in get_key
    raise KeyError("No dataset matching '{}' found".format(str(key)))
KeyError: "No dataset matching 'DatasetID(name='convection', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=None)' found"



**Environment Info:**
Ubuntu 14.04 LTS + Ubuntu 18.04
Python 3.6, SatPy 0.10.0

**Additional context**
All 16 GOES NetCDF files are available in the BASE_DIR, missing channels is not the problem.
@djhoese
Copy link
Member

djhoese commented Dec 16, 2018

Thanks @simonrp84. You found a legit bug and I've fixed it in #553. It should be released in satpy 0.11 next week hopefully.

@simonrp84
Copy link
Member Author

Thanks all. I don't know how to make SatPy from github, so I'll wait for the next release :)

@mraspaud
Copy link
Member

pip install git+https://github.com/pytroll/satpy.git :)

@simonrp84
Copy link
Member Author

Cheers Martin, that works!

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

Successfully merging a pull request may close this issue.

3 participants