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

ValueError: Result from applying user function has unexpected coordinate variables {'wspd', 'phi', 'incidence'}. #73

Open
Skealz opened this issue Sep 9, 2024 · 3 comments

Comments

@Skealz
Copy link
Collaborator

Skealz commented Sep 9, 2024

Traceback (most recent call last):
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/bin/SAR_L1-to-L2_wind_processor", line 10, in <module>
    sys.exit(processor_starting_point())
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/grdwindinversion/main.py", line 50, in processor_starting_point
    out_file, outputds = makeL2(input_file, out_folder, config_file,
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/grdwindinversion/inversion.py", line 839, in makeL2
    xr_dataset, dual_pol, copol, crosspol, copol_gmf, crosspol_gmf, model_vv, model_vh, sigma0_ocean_cross, dsig_cross, sensor_longname, out_file, config = preprocess(
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/grdwindinversion/inversion.py", line 736, in preprocess
    xr_dataset['sigma0_detrend'] = xsarsea.sigma0_detrend(
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xsarsea/utils.py", line 119, in wrapper
    result = f(*args, **kwargs)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xsarsea/xsarsea.py", line 43, in sigma0_detrend
    gmf_ratio_sample = sigma0_gmf_sample / np.nanmean(sigma0_gmf_sample)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/numpy/lib/nanfunctions.py", line 1032, in nanmean
    arr, mask = _replace_nan(a, 0)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/numpy/lib/nanfunctions.py", line 96, in _replace_nan
    a = np.asanyarray(a)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/common.py", line 166, in __array__
    return np.asarray(self.values, dtype=dtype)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/dataarray.py", line 770, in values
    return self.variable.values
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/variable.py", line 508, in values
    return _as_array_or_item(self._data)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/variable.py", line 306, in _as_array_or_item
    data = np.asarray(data)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/dask/array/core.py", line 1694, in __array__
    x = self.compute()
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/dask/base.py", line 376, in compute
    (result,) = compute(self, traverse=False, **kwargs)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/dask/base.py", line 664, in compute
    results = schedule(dsk, keys, **kwargs)
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/parallel.py", line 384, in _wrapper
    check_result_variables(result, expected, "coords")
  File "/home/datawork-cersat-public/cache/project/sarwing/commits/xsar_2024v7v30_1v2_0v2v3vpost15_1v1v1_1v0v6_1v0v6_1v1v11_1v0v3_1v0v1_1v2v1/grdwindinversion/lib/python3.10/site-packages/xarray/core/parallel.py", line 63, in check_result_variables
    raise ValueError(
ValueError: Result from applying user function has unexpected coordinate variables {'wspd', 'phi', 'incidence'}.
@vincelhx
Copy link
Collaborator

Yes to launch this new version of grdwindinversion i need to update xsarsea => simga0_detrend

@vincelhx
Copy link
Collaborator

waiting for PR to be accepted

@agrouaze
Copy link
Member

waiting for PR to be accepted

#75 approved

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

No branches or pull requests

3 participants