-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplot_sami.m
More file actions
80 lines (32 loc) · 807 Bytes
/
plot_sami.m
File metadata and controls
80 lines (32 loc) · 807 Bytes
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
%% Set filenames
fname = '/Users/chartat1/data/sami3/2019/sami3_regulargrid_elec_density_2019Mar13.nc';
ncdisp(fname)
%% load
dene = ncread(fname, 'dene0');
lats = ncread(fname, 'lat');
lons = ncread(fname, 'lon');
alts = ncread(fname, 'alt');
times = ncread(fname, 'time');
%% plot
t = 1;
dene_t = dene(:, :, :, t);
clf
x0=10;
y0=10;
width=1600;
height=1200;
set(gcf,'position',[x0,y0,width,height])
tiledlayout(2, 1, 'TileSpacing','compact');
nexttile
contourf(lats, alts, squeeze(dene_t(:, 1, :)))
ylim([0, 600])
ylabel('Alt (km)')
xlabel('Lat (deg)')
title(fname)
set(gca, 'FontSize', 24)
nexttile
alti = alts == max(alts(alts <350));
contourf(lons, lats, squeeze(dene_t(alti, :, :))')
xlabel('Lon (deg)')
ylabel('Lat (deg)')
set(gca, 'FontSize', 24)