operands cannot be broadcast together with shapes

Post Reply
Posts: 1
Joined: Tue Jul 16, 2019 1:43 pm
company / institution: University of Maryland Center for Environmental Science
Location: Cambridge, MD

operands cannot be broadcast together with shapes

Post by aewindle110 »

I am trying to run Polymer on subsetted OLCI scenes (subsetted using SNAP GPT) but am getting this error:

Code: Select all

[code]python new_batch_proc_nasa.py
OLCI product, size is 1125x640
Starting processing at 2021-04-27 08:30:54.323697
Initializing output file "/media/silsbelab/S33/S3_L2/polymer/data/subset_S3A_OL_1_EFR____20190724T144907_20190724T145207_20190725T203720_0179_047_196_2340_MAR_O_NT_002.nc.nc"
Traceback (most recent call last):
  File "/media/silsbelab/S33/S3_L2/polymer/polymer-v4.13/new_batch_proc_nasa.py", line 30, in <module>
    run_atm_corr(Level1_NETCDF(filename, ancillary=Ancillary_NASA()),
  File "/media/silsbelab/S33/S3_L2/polymer/polymer-v4.13/polymer/main.py", line 517, in run_atm_corr
    for block in block_iter:
  File "/media/silsbelab/S33/S3_L2/polymer/polymer-v4.13/polymer/main.py", line 434, in blockiterator
    for block in level1.blocks(params.bands_read()):
  File "/media/silsbelab/S33/S3_L2/polymer/polymer-v4.13/polymer/level1.py", line 175, in blocks
    yield self.read_block(size, offset, bands_read)
  File "/media/silsbelab/S33/S3_L2/polymer/polymer-v4.13/polymer/level1_netcdf.py", line 438, in read_block
    block.surf_press = P0 * np.exp(-block.altitude/8000.)

Is there an easy fix to this or has the subsetting caused this error?
User avatar
Site Admin
Posts: 198
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France

Re: operands cannot be broadcast together with shapes

Post by fsteinmetz »

Processing SNAP subsetted files is currently not supported, these files are not of the same format as the Level1 SAFE products.
However if you are interested in processing a subset, you can do so using the sline, eline, scol and ecol parameters ; see example.py
Post Reply