The meteorological data is basically multidimensional data (usually 4-dimensional, space 3-dimensional plus time dimension), only one-dimensional variable in the data, the other dimensions are fixed to extract one-dimensional data. For example, in this case, the time dimension, height dimension, latitude dimension are fixed, only the longitude dimension is kept variable: hgt = f[' hgt '][0,[500],[4],[180,360]. Fixed a dimension can be ordinal (starting from 0), such as the time dimension in this example is 0, the first time. It is also possible to use the real data in the dimension, such as the high-dimensional hope is the hPa, this time need to use the brackets: [500], latitude-dimensional fixation is similar. The scope of the dimension can be qualified by ordinal number, for example: 5:20, can also be qualified by the true value of the dimension, such as the longitude dimension in this example is limited to 180-360 degrees, need to use brackets: [180,360]. One-dimensional line drawing is plotted with the plot command.
Script Program:
f = AddFile ('D:/temp/test/model.ctl') HGT= f['HGT'][0, [500],[40],[180, 360]]plot (HGT,'R-o', linewidth=2) title ('HGT') grid (True) Ylabel ('HGT') Xlabel ('Longitude') Show ()
Meteoinfolab Script Example: Get one-dimensional data and draw