harmonica.load_icgem_gdf#
- harmonica.load_icgem_gdf(fname, **kwargs)[source]#
Read data from an ICGEM .gdf file.
The ICGEM Calculation Service [BarthelmesKohler2016] generates gravity field grids from spherical harmonic models. They use a custom ASCII grid format with information in the header. This function can read the format and parse information from the header. It returns the data in a
xarray.Datasetfor convenience and reduced storage requirements.- Parameters:
- fname
stror file-likeobject Name of the ICGEM
.gdffile or an open file object to read from.- kwargs
Extra keyword arguments to this function will be passed to
numpy.loadtxt.
- fname
- Returns:
- grid
xarray.Dataset An
xarray.Datasetwith the data from the file. The header of the gdf file is available through theattrattribute of thexarray.Dataset.
- grid