Yes, I got that.
OK, but no need, the grdconvert
example I showed do exactly the same.
Well, that gets you a netcdf file that you can easely ingest in GMT like any other grid you examples in docs.
Nope, the file has data already projected in polar stereographic and it can’t cover the full sphere.
C:\v>grdinfo pds.grd
pds.grd: Title: Produced by grdconvert
pds.grd: Command:
pds.grd: Remark:
pds.grd: Gridline node registration used [Cartesian grid]
pds.grd: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
pds.grd: x_min: -303990 x_max: 303990 x_inc: 20 name: x n_columns: 30400
pds.grd: y_min: -303990 y_max: 303990 y_inc: 20 name: y n_rows: 30400
pds.grd: v_min: 1730.10266113 v_max: 1744.42724609 name: z
pds.grd: scale_factor: 1 add_offset: 0
pds.grd: format: netCDF-4 chunk_size: 129,129 shuffle: on deflation_level: 3
pds.grd: Default CPT:
PROJCS["unknown",
GEOGCS["unknown",
DATUM["unknown",
SPHEROID["unknown",1737400,0]],
PRIMEM["Reference meridian",0],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]]],
PROJECTION["Polar_Stereographic"],
PARAMETER["latitude_of_origin",-90],
PARAMETER["central_meridian",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["Easting",NORTH],
AXIS["Northing",NORTH]]
Basically, just import the (> 3 GB) grid in PyGMT, even if you have to convert it into netCDF first (my grdconvert
or your gdal_translate examples).