Re: GMT - Help is needed

Joaquim Luis <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
On 28-01-2014 13:26, Peter wrote:
> Thank you... but I never used netcdf in GMT.. some one please show me 
> how netcdf file can be used to plot data.. please consider netcdf file 
> I provided..

Well, I just did gave you an example with grdinfo where I used the 
netcdf file that you provided.
Just use xy_data.nc=gd instead of the junk.grd in your script.
But note however, that this needs a GMT build with GDAL support.

>
> - Peter
>
>
> On Tue, Jan 28, 2014 at 5:38 PM, Joaquim Luis <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Your grid claims to follow the CF convention but from the output
>     of grdinfo I doubt that is true. I could get a better info when
>     forcing the reading through GDAL.
>
>     So the easy way is probably to use
>
>     grdimage xy_data.nc <http://xy_data.nc>=gd ....
>
>     Joaquim
>
>     grdinfo xy_data.nc <http://xy_data.nc>
>     xy_data.nc <http://xy_data.nc>: Title:
>     xy_data.nc <http://xy_data.nc>: Command: FERRET V6.85   28-Jan-14
>     xy_data.nc <http://xy_data.nc>: Remark:
>     xy_data.nc <http://xy_data.nc>: Gridline node registration used
>     [Cartesian grid]
>     xy_data.nc <http://xy_data.nc>: Grid file format: nd = GMT netCDF
>     format (64-bit float), COARDS, CF-1.5
>     xy_data.nc <http://xy_data.nc>: x_min: 0 x_max: 1 x_inc: 1 name: 
>     nx: 2
>     xy_data.nc <http://xy_data.nc>: y_min: 1167868800 y_max:
>     1167868800 y_inc: Na name: TIME [days since 1800-01-01 00:00:00] ny: 1
>     xy_data.nc <http://xy_data.nc>: z_min: NaN z_max: NaN name: TIME_bnds
>     xy_data.nc <http://xy_data.nc>: scale_factor: 1 add_offset: 0
>     xy_data.nc <http://xy_data.nc>: format: classic
>
>     grdinfo xy_data.nc <http://xy_data.nc>=gd
>     xy_data.nc <http://xy_data.nc>: Title: Grid imported via GDAL
>     xy_data.nc <http://xy_data.nc>: Command:
>     xy_data.nc <http://xy_data.nc>: Remark:
>     xy_data.nc <http://xy_data.nc>: Gridline node registration used
>     [Cartesian grid]
>     xy_data.nc <http://xy_data.nc>: Grid file format: gd =
>     Import/export through GDAL
>     xy_data.nc <http://xy_data.nc>: x_min: 75 x_max: 95 x_inc: 0.5
>     name: x nx: 41
>     xy_data.nc <http://xy_data.nc>: y_min: -5 y_max: 25 y_inc: 0.5
>     name: y ny: 61
>     xy_data.nc <http://xy_data.nc>: z_min: -2.78499996662 z_max:
>     1.43999996781 name: z
>     xy_data.nc <http://xy_data.nc>: scale_factor: 1 add_offset: 0
>
>>      Dear all
>>
>>     I am trying to do simple xy contour plot in gmt, I have extracted
>>     data using ferret software since its in netcdf format and I don't
>>     know how to use netcdf file in gmt.
>>
>>     Please look at my attachment I plotted same data using ferret and
>>     now tried extracted ascii file on GMT, not able to find what I am
>>     doing wrong please someone correct my script.
>>
>>     Here test.gif is plotted using ferret software, and test.ps
>>     <http://test.ps> using gmt
>>
>>     I here I attached following
>>
>>     1 . My bash script
>>     2 . My datafile
>>     3 . plot from ferret test.gif
>>     4 . plot from GMT
>>     5.  Netcdf file I used
>>
>>     Someone please help me and correct me as well I want to use GMT
>>     since plot quality is very good compare any other software available
>>
>>     Please someone modify my script
>>
>>     - Peter
>>
>>
>>
>>     To unsubscribe, send the message "signoff gmt-help" to
>>     [email protected] <mailto:[email protected]>
>
>


To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.