xarry netcdf message

Dioumacor FAYE dioumacorfaye at gmail.com
Tue Aug 23 11:52:48 EDT 2022


Hello, I think you can try this.
I use Python 3.7.11 in jupyter Notebook
import xarray as xr
path = '/media/lpaosf/LPAOSF_DATA/maman/r1mm_r20mm_sdii/
chirps-v2.0.days_p05_r1mm_WA1981-2018.nc'
# Open the NetCDF files in xr.DataSet
r1mm = xr.open_dataset(path)
time=r1mm['time'].data
lon =r1mm['longitude'].data
lat =r1mm['latitude'].data
data_r1mm=r1mm['r1mm'].data

Le mar. 23 août 2022 à 15:38, Jorge Conrado Conforte Conforte <
jorgconforte at gmail.com> a écrit :

> Hi,
>
> I'm reading my netcdf data air.2m.mon.ltm.nc.
> I used the netcdf4 and I didn't have message when i read my data. But if I
> use the xarray I had this message:
>
>
> /home/conrado/.conda/envs/meuambi/lib/python3.8/site-packages/xarray/backends/plugins.py:61:
> RuntimeWarning: Engine 'cfgrib' loading failed:
> module 'cfgrib.messages' has no attribute 'DEFAULT_INDEXPATH'
>   warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
>
> /home/conrado/.conda/envs/meuambi/lib/python3.8/site-packages/xarray/coding/times.py:673:
> SerializationWarning: Unable to decode time axis into full numpy.datetime64
> objects, continuing using cftime.datetime objects instead, reason: dates
> out of range
>   dtype = _decode_cf_datetime_dtype(data, units, calendar, self.use_cftime)
>
> /home/conrado/.conda/envs/meuambi/lib/python3.8/site-packages/xarray/core/indexing.py:423:
> SerializationWarning: Unable to decode time axis into full numpy.datetime64
> objects, continuing using cftime.datetime objects instead, reason: dates
> out of range
>   return np.asarray(array[self.key], dtype=None)
>
> What can I do to solve this message.
>
> Thanks,
>
> Conrado
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Bien à vous,
---------------------    ------------------  -----------------
--------------------  -----------------
Dioumacor FAYE doctorant au  LPAOSF/ESP/UCAD/BP 5085 Dakar-Fann, Sénégal.
Tel labo: (00221) 33 825 93 64
Email: d.faye20171634 at zig.univ.sn <d.fayye20171634 at univ.zig.sn>   Tel:
+221773475098   +221783484308
Physicien en herbe
Pseudo Skype:   dioumacorfaye


More information about the Python-list mailing list