Extract data usinh specified longitude and latitude

2 views (last 30 days)
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!

Accepted Answer

CARLOTTA DENTICO
CARLOTTA DENTICO on 4 Aug 2023
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

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!