Closed kjz1997 closed 4 months ago
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
Could you provide the output of pygmt.grdinfo(radem)
? You could also try pygmt.load_dataarray(radem, engine="netcdf4")
to see if it works.
Note that pygmt.load_dataarray
is basically just a wrapper around xarray.load_dataarray
, which is intended to load NetCDF files. So depending on whether your .grd
file is actually a NetCDF-4 file internally (see https://docs.generic-mapping-tools.org/6.5/reference/file-formats.html#grid-files), it may or may not be possible to read the file into an xarray.DataArray
using the netcdf4 driver.
thanks for your reply,it works,there was an error in my file
在 2024年5月23日,下午4:44,Wei Ji @.***> 写道:
Could you provide the output of pygmt.grdinfo(radem)? You could also try pygmt.load_dataarray(radem, engine="netcdf4") to see if it works.
Note that pygmt.load_dataarray is basically just a wrapper around xarray.load_dataarray, which is intended to load NetCDF files.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
Description of the problem
When I used pygmt. load_dataarray to read the grd file, the code reported the following error:
Value Error: did not find a match in any of the current installed IO backups ['netcdf4 ','scipy'] Advisor clearly selects one of the installed engines via the
engineparameter, or installing additional IO dependencies
,but it is possible to not add an engine beforeMinimal Complete Verifiable Example
Full error message
System information