-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_ncs.m
75 lines (69 loc) · 3.6 KB
/
do_ncs.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
function s_nc = do_ncs(varid)
%function ncs = do_ncs(varid)
%
%> x.file = 'fred.nc';
%> x.varid = 'foo';
%> x.change_miss = 1;
%> values = getnc(x);
%
%values = getnc(file, varid, bl_corner, tr_corner, stride, order, change_miss, new_miss);
%values = getnc(file, varid, -1, -1, -1, -2, change_miss, new_miss);
%Estremadura_Hydrodynamic
%ncs_file = {...
%'\\192.168.23.151\homes\Projects\netcdf\datasets\20061129_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061206_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061213_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061220_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070117_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070124_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070207_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070214_Estremadura_Hydrodynamic_newbat.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070221_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070228_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070307_Estremadura_Hydrodynamic.nc'...
% };
%Suplente
%'\\192.168.23.151\homes\Projects\netcdf\datasets\20060609_Portugal_Hydrodynamic.nc',...
% strin = 'Portugal_Hydrodynamic';
% %strin = 'Portugal_WaterProperties';
% ncs_file = {...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061122_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061129_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061206_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061213_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061220_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070117_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070124_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070207_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070214_' strin '_new_batim.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070221_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070228_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070307_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070314_' strin '.nc']};
%Little Test / proof of concept
%ncs_file = {...
%['\\192.168.23.151\homes\Projects\netcdf\datasets\20060609_' strin '.nc'],...
%['\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_' strin '.nc']}
ncs_file = '\\192.168.23.151\homes\Projects\netcdf\datasets\mean_Portugal_WaterProperties.nc';
if nargin > 0
ncs_varid = varid;
else
ncs_varid = 'Vel_X';
end
ncs_bl_corner = -1;
ncs_tr_corner = -1;
ncs_stride = -1;
ncs_order = -2;
ncs_change_miss = 2;
ncs_new_miss = 0;
s_nc = struct( ...
'file', ncs_file, ...
'varid', ncs_varid, ...
'bl_corner', ncs_bl_corner, ...
'tr_corner', ncs_tr_corner, ...
'stride', ncs_stride, ...
'order', ncs_order, ...
'change_miss', ncs_change_miss, ...
'new_miss', ncs_new_miss);