我正在尝试从NetCDF文件中绘制轮廓图。该文件的ncdump输出为
dimensions:
level = 5 ;
latidude = 345 ;
longitude = 345 ;
time = UNLIMITED ; // (1 currently)
variables:
float latidude(latidude) ;
latidude:units = "degrees_north" ;
float longitude(longitude) ;
longitude:units = "degrees_east" ;
float u_transport(time, level, latidude, longitude) ;
u_transport:units = "m^2 s^-1" ;
float v_transport(time, level, latidude, longitude) ;
v_transport:units = "m^2 s^-1" ;
float depth(time, level, latidude, longitude) ;
depth:units = "m" ;
float height(time, level, latidude, longitude) ;
height:units = "m" ;
float density(time, level, latidude, longitude) ;
density:units = "kg m^-3" ;
// global attributes:
:_NCProperties =
"version=1|netcdflibversion=4.6.1|hdf5libversion=1.10.3" ;
data:
latidude = 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
我想绘制水平4和时间1上的变量“深度”的轮廓图。
grd2xyz fluid_data.nc?depth -h4 -W1 -V0 | gmt grdcontour -JM7i -C0.1 -A0.2 -P -Ba > file.ps
返回
grdcontour [ERROR]: Syntax error: Must specify a single grid file
我也尝试过
gmt grdcontour fluid_data.nc?depth -JM7i -C0.1 -A0.2 -P -Ba -h4 > GMT_tut_11.ps
返回
grdcontour [ERROR]: "time", NetCDF: Variable not found
If something bad happens later, try importing via GDAL.
grdcontour [ERROR]: "level", NetCDF: Variable not found
If something bad happens later, try importing via GDAL.
grdcontour [ERROR]: Internal Error = GMT_MAP_BAD_LAT_MAX
grdcontour [ERROR]: Internal Error = i
我敢肯定,绘制等高线图很简单,而且我遗漏了一些明显的东西。