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

interpolation Error size 0 #83

Open
agrouaze opened this issue Sep 3, 2024 · 0 comments
Open

interpolation Error size 0 #83

agrouaze opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@agrouaze
Copy link
Member

agrouaze commented Sep 3, 2024

python

final options: --l1bsafe /home/datawork-cersat-public/cache/project/sarwave/data/products/from_creodias/slc/iw/l1b/2020/200/S1A_IW_XSP__1SSH_20200718T050550_20200718T050618_033504_03E1E4_C8B0_A13.SAFE --outp
utdir /home1/scratch/sarwave/iw_l1c_b07_from_creodias --version B07
/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/bin/python
03/09/2024 13:24:37 INFO do_IW_L1C_SAFE_from_L1B_SAFE.py(416) product version to produce: B07
03/09/2024 13:24:37 INFO do_IW_L1C_SAFE_from_L1B_SAFE.py(417) outputdir will be: /home1/scratch/sarwave/iw_l1c_b07_from_creodias
03/09/2024 13:24:37 INFO do_IW_L1C_SAFE_from_L1B_SAFE.py(85) ancillary data: {'ecmwf_0100_1h': {'step': 1, 'pattern': '/home/datawork-cersat-public/provider/ecmwf/forecast/hourly/0100deg/netcdf_light/%Y/%j/E
CMWF_FORECAST_0100_%Y%m%d%H%M_10U_10V.nc', 'name': 'ecmwf_0100_1h'}, 'ww3hindcast_field': {'step': 3, 'name': 'ww3hindcast_field', 'pattern': '/home/datawork-WW3/PROJECT/SARWAVE/HINDCAST/GLOBAL_NOGQM*/3*/GLO
B-30M/*/FIELD_NC/LOPS_WW3-GLOB-30M_%Y%m.nc'}}
03/09/2024 13:24:37 INFO do_IW_L1C_SAFE_from_L1B_SAFE.py(95) Number of files: 2
^M  0%|          | 0/2 [00:00<?, ?it/s]^M  0%|          | 0/2 [00:00<?, ?it/s]^M  0%|          | 0/2 [00:02<?, ?it/s]
Traceback (most recent call last):
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/bin/do_IW_L1C_SAFE_from_L1B_SAFE", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py", line 423, in main
    final_L1C_path = do_L1C_SAFE_from_L1B_SAFE(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py", line 116, in do_L1C_SAFE_from_L
1B_SAFE
    ds_intra, ds_inter, flag_ancillaries_added = enrich_onesubswath_l1b(
                                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py", line 210, in enrich_onesubswath
_l1b
    ds_intra, ds_inter, ancillary_fields_added = append_ancillary_field(
                                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py", line 292, in append_ancillary_f
ield
    _ds_intra = coloc_tiles_from_l1bgroup_with_raster(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/slcl1butils/coloc/coloc.py", line 83, in coloc_tiles_from_l1bgroup_with_raster
    projected_field = upscaled_da.interp(x=lonsar,y=latsar,assume_sorted=False).drop_vars(['x', 'y'])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/xarray/core/dataarray.py", line 2323, in interp
    ds = self._to_temp_dataset().interp(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/xarray/core/dataset.py", line 4032, in interp
    variables[name] = missing.interp(var, var_indexers, method, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/xarray/core/missing.py", line 632, in interp
    interped = interp_func(
               ^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/xarray/core/missing.py", line 749, in interp_func
    return _interpnd(var, x, new_x, func, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/xarray/core/missing.py", line 773, in _interpnd
    rslt = func(x, var, xi, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/scipy/interpolate/_rgi.py", line 748, in interpn
    return interp(xi)
File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/scipy/interpolate/_rgi.py", line 412, in __call__
    xi, xi_shape, ndim, nans, out_of_bounds = self._prepare_xi(xi)
                                              ^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/scipy/interpolate/_rgi.py", line 473, in _prepare_xi
    out_of_bounds = self._find_out_of_bounds(xi.T)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/datawork-cersat-public/cache/project/mpc-sentinel1/workspace/mamba/envs/l1cB07/lib/python3.11/site-packages/scipy/interpolate/_rgi.py", line 597, in _find_out_of_bounds
    out_of_bounds += x < grid[0]
                         ~~~~^^^
IndexError: index 0 is out of bounds for axis 0 with size 0

    ```
@agrouaze agrouaze added the bug Something isn't working label Sep 3, 2024
@agrouaze agrouaze changed the title interpolation Error interpolation Error size 0 Sep 3, 2024
@agrouaze agrouaze self-assigned this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant