필터 지우기
필터 지우기

Create map from Netcdf file

조회 수: 21 (최근 30일)
David du Preez
David du Preez 2017년 2월 8일
댓글: David du Preez 2017년 2월 8일
Hi
I have a netcdf file from at the following link: https://drive.google.com/open?id=0B0wQbicZOF7xcWx0RmtoXzZHWHM
I am able to open it in Matlab but is it possible to create a map from it and if so how do I do it? It would be a map of any day, using the TCO values and looking at the southern hemisphere.

채택된 답변

KSSV
KSSV 2017년 2월 8일
clc; clear all ;
ncfile = 'your ncfile' ;
long = ncread(ncfile,'longitude') ;nx = length(long) ;
lat = ncread(ncfile,'latitude') ; ny = length(lat) ;
time = ncread(ncfile,'time') ; nt = length(time) ;
TCO = ncread(ncfile,'TCO') ;
[X,Y] = meshgrid(long,lat) ;
for i = 1:nt
pcolor(X,Y,TCO(:,:,i)') ;
shading interp ;
title(sprintf('time = %f',time(i)))
pause(0.1)
end
  댓글 수: 1
David du Preez
David du Preez 2017년 2월 8일
Thanks.
If I want to display the TCO variable on a map for say 1 January 2007 and only showing latitudes: 0-90°S and longitude: 0-360°.
How would I change the code?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by