0
votes

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

1
Looks like You haven't used GMT much, why have You chosen exactly this tool and have You tried to read it's documentation? It is also not clear why do You need to create a new NetCDF file? If You wan't to get a good answer in stackoverflow, You should actually show something that You have tried and that did not work, and then people can help You find the problem.kakk11

1 Answers

3
votes

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