how to get the values from netcdf to ascii format through matlab?
Ältere Kommentare anzeigen
The data is in .nc form (e.g data.nc). 1) How to extract a grid from this file format? 2) How to find the values of the extracted grid in ascii form?
2 Kommentare
Ashish Uthama
am 13 Aug. 2014
Girija, please say more. Its hard to give a helpful answer since your question does not have enough information. For example - how is the data in the netcdf file structured? Do you have lat /lon and data. Are they 1D 2D or nD? What do you mean by ASCII form? As a variable as a CSV file a text file?
To get started, please have a look at the ncread function.
Gargi
am 14 Aug. 2014
Akzeptierte Antwort
Weitere Antworten (1)
Supreeth Subbaraya
am 14 Aug. 2014
Take a look at the function ncread. Here you can specify the indices of the starting location of a variable and the number of elements to be read. If a variavle "var" is a two dimensional variable, then you can use the following line of code:
ncread('data.nc','var',[1, 1], [1,1])
1 Kommentar
Gargi
am 15 Aug. 2014
Kategorien
Mehr zu NetCDF finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!