Thanks, I was able to get the angles. How now when i try to get the reflectance values from the non padded scene, I get this error.
Can you help
from satpy import Scene
from glob import glob
from satpy.modifiers.angles import get_angles
chan='vis_04'
scn = Scene(reader="fci_l1c_nc", filenames=glob("/data/scdr068/MTG/dir01/LgTZpzM2TSKChDikqhHatASS/W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1\
+FCI-1C-RRAD-FDHSI-FD--CHK-BODY--DIS-NC4E_C_EUMT_20251001104949_IDPFI_OPE_20251001104651_20251001104737_N_JLS_O_0065_0029.nc"))
scn.load(["vis_04"], upper_right_corner="NE", pad_data=False)
lons, lats = scn[chan].attrs["area"].get_lonlats()
sat_az, sat_zenith, solar_az, solar_zenith = get_angles(scn[chan])
ref_values = scn['vis_04'].values
print(sat_az.shape, sat_zenith.shape, solar_az.shape, solar_zenith.shape)#,ref_values.shape )
Traceback (most recent call last):
File "/data/home004/manik.bali/fci/linux-command-mcp/get_fci_libyas.py", line 10, in <module>
ref_values = scn['vis_04'].values
^^^^^^^^^^^^^^^^^^^^
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/xarray/core/dataarray.py", line 798, in values
return self.variable.values
^^^^^^^^^^^^^^^^^^^^
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/xarray/core/variable.py", line 556, in values
return _as_array_or_item(self._data)
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/xarray/core/variable.py", line 336, in _as_array_or_item
data = np.asarray(data)
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/dask/array/core.py", line 1723, in __array__
x = self.compute()
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/dask/base.py", line 373, in compute
(result,) = compute(self, traverse=False, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/home004/manik.bali/.conda/envs/fci/lib/python3.13/site-packages/dask/base.py", line 681, in compute
results = schedule(expr, keys, **kwargs)
File "src/netCDF4/_netCDF4.pyx", line 5094, in netCDF4._netCDF4.Variable.__getitem__
File "src/netCDF4/_netCDF4.pyx", line 6064, in netCDF4._netCDF4.Variable._get
File "src/netCDF4/_netCDF4.pyx", line 2160, in netCDF4._netCDF4._ensure_nc_success
RuntimeError: NetCDF: Filter error: undefined filter encountered