How to read and plot NetCDF files with Matlab, file extension .nc - with script (2020)

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hi Bernardo!Thank you for this helpful video. I would like to ask you how to plot ECMWF ERA-Interim data for the sea surface temperature. I have opened the netCDF file but the matrix for the SST has an extra dimension ' time' and this makes it more cmplicated for me.Has anyone any suggestions how to plot my data in matlab?

zoekriona
Автор

Thank you for your help. I have the data in the same extension but doesn't the figure the dimensio is not equal.How can I extract globally longitude and a specific latitude at a given globally longitude and latitude data. If you help me to extract my data I can write your contribution in my paper puplished. Thank you

tsehayenegash
Автор

Hi this is very useful. Thanks Bernardo Adolfo Bastién Olvera! Just trying to plot the upwelling case for ROMS, if anyone is familiar with that...attempting to plot:
pcolor(x_rho, y_rho, h)

with the error:
Warning: MATLAB has disabled some advanced graphics rendering features by
switching to software OpenGL. For more information, click <a


Thanks

hansclarke
Автор

Good video. What about 3d arrays (sometimes Cordex data are reported as 3d arrays) with rotated lat lon? How can we easily read and extract these types of data?

giorgiosperandio
Автор

load coast is not working in my matlab. its saying its unknown.

princeabraham
Автор

Hi Bernardo, I tried like you show, but appear and error after executing :
>>ncdisp(filename)
Error using (line 1272)
Could not open for reading.


In the current folder appears some files, Do I need them? I am using a R2020b, regards

camilorendonvaldez
Автор

Hi I got this error:
Error using pcolor (line 61)
Matrix dimensions must agree.

when running :

filename = 'xndcaa.pmh9jul.nc';
lat = ncread(filename, 'latitude');
lon = ncread(filename, 'longitude');
temp = ncread(filename, 'surf_temp') - 273.15;
mymap = pcolor(lon, lat, temp);

Do you know how to fix that? I'm running Matlab 2018a.

sandyherho
Автор

Sir to plot a graph, my third variable is in column matrix, hence it is not plotting graph, can you plz tell me how I can make it a matrix so that I can use it in plotting

agirl
Автор

Hi, I tried to use the relevant m file, but got the error below:
Error using netcdflib
The NetCDF library encountered an error during execution of 'inqVar' function - 'Variable not found

(NC_ENOTVAR)'

Any suggestion?

alidanandehmehr
Автор

Amazing video! Saved me. For some people who have asked in the comments:
1. I am currently running Matlab 2020 and I needed to download the "Mapping Toolbox" in order for the load coast command to work.
2. If the map appears all black you need to the remove the edges using the .EdgeAlpha=0 function.

umedina
Автор

If your data is 3-D use this to take slices out of it. slice = squeeze(var( :, :, "your desired slice e.g. 10"));

yorkshire_tea_innit
Автор

Hi Bernardo, I'm trying to extract the points inside a watershed from a netcdf file. The file is a cmip5 output file in a daily time step and has four dimensions (lat, lon, time and bnds) and seven variables (lat, lat_bnds, lon, lon_bnds, time, time_bnds, pr).
Could you please help me with this problem?

ericklsv
Автор

Thanks so much for the video, Bernardo. super helpful and comprehensible! I really appreciate it :)

annanickoloff
Автор

very helpful video. can you help us with ordinary CDF file data from THEMIS satellite . all the data from it are stored in CDF format.

adetayoeyelade
Автор

How to get some specific coordinates from the global data..BTW your video was was very easy, thank you for sharing!

Ayman-slfc
Автор

Hi Bernardo! I am just getting started using MatLab to handle NetCDF files and this is very useful. I'm trying with a slightly different data set (Sea Level Data) and keep getting a pcolor plot which shows up all black. Can you offer any advice as to why this may be the case?

This is the data set!

maxkotz
Автор

Why when I print a variable I get a bunch of NaNs?

drtamiz
Автор

Thank you very helpful, can i make a correlation on the geographic map between two variables?

Data-with-Mo
Автор

Hi can you kindly update a video where we can plot data between particular lat long... say over india region

madangopal
Автор

thanks man for this but im looking to extract and export data from netCDF data with matlab ...there is a solution for this ?

tradingdarija