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

Error with yaml files during tutorial need example file I think #1308

Closed
hal98x opened this issue Aug 10, 2020 · 6 comments
Closed

Error with yaml files during tutorial need example file I think #1308

hal98x opened this issue Aug 10, 2020 · 6 comments
Assignees
Labels
component:examples Dealing with examples in sphinx docs or pytroll-examples

Comments

@hal98x
Copy link

hal98x commented Aug 10, 2020

Describe the bug
I went through the tutorial and ran into a few issues. I need an example yaml file for the my_rgb definitition somehow i wasn't able to recreate the syntax.

To Reproduce

sensor_name: visir/abi
composites:
  my_rgb:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - r_band: C02
    - g_band: C11
    - b_band: C16
   enhancements:
     my_rgb:
       name: my_rgb
       operations:
       - name: color_limits
         method: !!python/name:satpy.enhancements.stretch
         kwargs: {stretch: 'crude', min_stretch: [RMIN, GMIN, BMIN], max_stretch: [RMAX, GMAX, BMAX]}

Expected behavior
I am getting error trying to load my_rgb

Actual results

ValueError                                Traceback (most recent call last)
<ipython-input-20-ef2a40ea4d11> in <module>
----> 1 new_scn = scn.resample(resampler='native')
      2 new_scn['my_rgb']

~\anaconda3\envs\satpy\lib\site-packages\satpy\scene.py in resample(self, destination, datasets, generate, unload, resampler, reduce_data, **resample_kwargs)
   1107 
   1108         if destination is None:
-> 1109             destination = self.max_area(to_resample_ids)
   1110         new_scn = self.copy(datasets=to_resample_ids)
   1111         # we may have some datasets we asked for but don't exist yet

~\anaconda3\envs\satpy\lib\site-packages\satpy\scene.py in max_area(self, datasets)
    270 
    271         """
--> 272         return self._compare_areas(datasets=datasets, compare_func=max)
    273 
    274     def min_area(self, datasets=None):

~\anaconda3\envs\satpy\lib\site-packages\satpy\scene.py in _compare_areas(self, datasets, compare_func)
    240         areas = [x for x in areas if x is not None]
    241         if not areas:
--> 242             raise ValueError("No dataset areas available")
    243 
    244         if not all(isinstance(x, type(areas[0]))

ValueError: No dataset areas available

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Info:

  • windows
  • Satpy Version: current just downloaded and installed from conda forge
  • PyResample Version:
  • Readers and writers dependencies (when relevant): [run from satpy.config import check_satpy; check_satpy()]
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\avhrr_l1b_gaclac.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\modis_l1b.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\caliop_l2_cloud.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\clavrx.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\modis_l2.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\iasi_l2_so2_bufr.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\viirs_edr_flood.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\seviri_l2_grib.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\li_l2.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\avhrr_l1b_hrpt.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\seviri_l1b_icare.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\hsaf_grib.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\grib.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\msi_safe.yaml']
    Could not import reader config from: ['C:\Users\paperspace\anaconda3\envs\satpy\Lib\site-packages\satpy\etc\readers\seviri_l2_bufr.yaml']
    Readers
    =======
    abi_l1b: ok
    abi_l1b_scmi: ok
    abi_l2_nc: ok
    acspo: ok
    agri_l1: ok
    ahi_hrit: ok
    ahi_hsd: ok
    ami_l1b: ok
    amsr2_l1b: ok
    amsr2_l2: ok
    avhrr_l1b_aapp: ok
    avhrr_l1b_eps: ok
    cmsaf-claas2_l2_nc: ok
    electrol_hrit: ok
    fci_l1c_fdhsi: ok
    fci_l2_nc: ok
    generic_image: ok
    geocat: ok
    ghrsst_l3c_sst: ok
    glm_l2: ok
    goes-imager_hrit: ok
    goes-imager_nc: ok
    gpm_imerg: ok
    hy2_scat_l2b_h5: ok
    iasi_l2: ok
    jami_hrit: ok
    maia: ok
    mersi2_l1b: ok
    mimicTPW2_comp: ok
    mtsat2-imager_hrit: ok
    nucaps: ok
    nwcsaf-geo: ok
    nwcsaf-msg2013-hdf5: ok
    nwcsaf-pps_nc: ok
    olci_l1b: ok
    olci_l2: ok
    omps_edr: ok
    safe_sar_l2_ocn: ok
    sar-c_safe: ok
    scatsat1_l2b: ok
    seviri_l1b_hrit: ok
    seviri_l1b_native: ok
    seviri_l1b_nc: ok
    slstr_l1b: ok
    slstr_l2: ok
    smos_l2_wind: ok
    tropomi_l2: ok
    vaisala_gld360: ok
    vii_l1b_nc: ok
    vii_l2_nc: ok
    viirs_compact: ok
    viirs_edr_active_fires: ok
    viirs_l1b: ok
    viirs_sdr: ok
    virr_l1b: ok

Writers

cf: ok
geotiff: ok
simple_image: ok

Extras

cartopy: ok
geoviews: ok

Additional context
Add any other context about the problem here.

@djhoese djhoese self-assigned this Aug 10, 2020
@djhoese djhoese added the component:examples Dealing with examples in sphinx docs or pytroll-examples label Aug 10, 2020
@djhoese
Copy link
Member

djhoese commented Aug 10, 2020

Interesting. Sorry you've had some trouble getting this to work. Based on the way you've pasted it, it seems you've added r_band: , g_band: , and b_band: to the prerequisite list. Was that added by you?

Edit: I see. The tutorial says name: . This is static text and is not something that the user needs to change. Sorry for the confusion.

@hal98x
Copy link
Author

hal98x commented Aug 10, 2020 via email

@djhoese
Copy link
Member

djhoese commented Aug 10, 2020

The tutorial has:

composites:
  my_rgb:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - name: YOUR_R_CHANNEL
    - name: YOUR_G_CHANNEL
    - name: YOUR_B_CHANNEL

You are meant to change the YOUR_X_CHANNEL portion of the text by replacing it with the name of the channel that we are using (ex. C01). I see now after rereading the text around it that I never explicitly showed what you are supposed to put in its place and most likely said this verbally when I presented this tutorial.

@hal98x
Copy link
Author

hal98x commented Aug 10, 2020 via email

@djhoese
Copy link
Member

djhoese commented Aug 10, 2020

I was wondering if anyone had used SATPY in conjunction with ArcGIS API for python?

Not that I'm aware.

@djhoese
Copy link
Member

djhoese commented May 4, 2022

Closing as it sounds like the original issue has been fixed.

@djhoese djhoese closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Dealing with examples in sphinx docs or pytroll-examples
Projects
None yet
Development

No branches or pull requests

2 participants