How can I extract data from a netCDF variable using Generic Mapping Tools (GMT)

I have a netCDF file (e.g. 'file.nc') with 26 variables. These each have 500 time slices, on a grid (y=333, x=386).

Using Generic Mapping Tools (GMT), I'd firstly like to create a new netCDF file consisting of 1 variable (e.g. 'temp'), while retaining the variable's time, x and y dimensions.

I'd then like to extract the variable's values through time for a specific point on the grid.

What tools should I use, and how can I extract this data?

Thanks

Answers


Use NCO and the answers are firstly

ncks -v var_nm in.nc out.nc

and secondly

ncks -d lat,25.0 -d lon,64.3 out.nc out2.nc

Need Your Help

API for finding the category of a domain

java web-services api web categories

Is there an API for finding the category of a domain? I'm looking for an alternative to reading the website's meta tags with jsoup.

When loading a web page in UIWebView in iphone, the click does not work

iphone uiwebview click hyperlink

I use and UIWebView in my application to load www.google.com. After the page is loaded, I am not able to click on any of the links. Basically the links dont work. Am I missing something ?