Extract data usinh specified longitude and latitude

조회 수: 1 (최근 30일)
CARLOTTA DENTICO
CARLOTTA DENTICO 2023년 8월 4일
답변: CARLOTTA DENTICO 2023년 8월 4일
Hi,
From a netcdf file I have extracted my variables of interest which have these dimensions:
aa_lon 609x881
aa_lat 609x881
bsfd 609x881x372
time 1x372
My first goal is to extract bsfd values inside this area
gsg = (aa_lon>=-12 & aa_lon<=9 & aa_lat>=73 & aa_lat<=78);
and calculate the mean over the entire time period in order to have a matrix of two dimensions which I can plot as a spatial map:
Secondly I wuold like to have yearly mean of the same variable to produce the same type of maps but for every year.
THANK YOU VERY MUCH!

채택된 답변

CARLOTTA DENTICO
CARLOTTA DENTICO 2023년 8월 4일
SOLVED!!
prova = mean(bsfd,3); % this calculate the mean value over the entire time period
prova_yr = (bsfd(:,:,1:12:372)); % this is to calculate yearly mean and have a spatial representation

추가 답변 (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