-
Notifications
You must be signed in to change notification settings - Fork 1
/
visualizacao2_winds.m
51 lines (42 loc) · 1.3 KB
/
visualizacao2_winds.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
clear all
close all
clc
% Essas variáveis são definidas pelo próprio usuário, onde estarão os
% diretórios com os dados do WRF e observacionais
path_in=['C:\Users\matheus\Desktop\TCCfinal\'];
path_in2=['C:\Users\matheus\Desktop\TCCfinal\'];
path_in3=['D:\Dados TCC\'];
ncfile = [path_in3,'d01_sst_rtg'];
ncdisp(ncfile);
shpfile = [path_in2, 'LINHA_DE_COSTA_IMAGEM_GEOCOVER_SIRGAS_2000','.shp']
s = shaperead(shpfile,'UseGeoCoords',true)
LAT = (s.Lat);
LON = (s.Lon);
lat=ncread(ncfile,'XLAT');
truelat = lat(:,:,1);
% ncdisp(ncfile);
lon=ncread(ncfile,'XLONG');
truelon = lon(:,:,1);
tempo = ncread(ncfile,'XTIME');
t2m = ncread(ncfile,'T2');
sfc_pressure = ncread(ncfile,'PSFC');
u10 = ncread(ncfile,'U10');
v10 = ncread(ncfile,'V10');
u10m = u10(:,:,1);
v10m = v10(:,:,1);
% u10m = interp2(u10m);
% v10m = interp2(v10m);
velvec10m = sqrt(u10m.^2 + v10m.^2);
landmask=ncread(ncfile,'LANDMASK');
ld1=landmask(:,:,1);
velvec10m(ld1==1)=nan;
pcolor(truelon, truelat, velvec10m);
c2 = colorbar
colormap hsv
c2.Label.String = 'Velocidade do Vento (m/s)';
axis equal
hold on
xlabel('Longitude','fontsize',14,'fontweight','bold');
ylabel('Latitude','fontsize',14,'fontweight','bold');
title('a)','fontsize',14,'fontweight','bold');
set(gca,'Fontsize',18,'fontweight','bold')