/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/MITprof_struct.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/MITprof_struct.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Apr 13 20:54:19 2011 UTC (14 years, 3 months ago) by roquet
Branch: MAIN
Changes since 1.1: +7 -3 lines
small bug fixes. MITprof_struct now initializes the depth vector given in argument.

1 function [MITprof]=MITprof_struct(nProf,depth);
2 % [MITprof]=MITprof_struct;
3 % create an empty struct variable using the format MITprof
4 % nProf: number of profiles
5 % depth: list of depth levels
6
7 nLev=length(depth);
8
9 MITprof=[];
10 MITprof.prof_depth=depth;
11 MITprof.prof_date=zeros(nProf,1);
12 MITprof.prof_YYYYMMDD=zeros(nProf,1);
13 MITprof.prof_HHMMSS=zeros(nProf,1);
14 MITprof.prof_lon=zeros(nProf,1);
15 MITprof.prof_lat=zeros(nProf,1);
16 MITprof.prof_basin=zeros(nProf,1);
17 MITprof.prof_point=zeros(nProf,1);
18 MITprof.prof_descr=cell(nProf,1);
19 MITprof.prof_T=zeros(nProf,nLev);
20 MITprof.prof_Tweight=zeros(nProf,nLev);
21 MITprof.prof_Testim=zeros(nProf,nLev);
22 MITprof.prof_Tflag=zeros(nProf,nLev);
23 MITprof.prof_Terr=zeros(nProf,nLev);
24 MITprof.prof_S=zeros(nProf,nLev);
25 MITprof.prof_Sweight=zeros(nProf,nLev);
26 MITprof.prof_Sestim=zeros(nProf,nLev);
27 MITprof.prof_Sflag=zeros(nProf,nLev);
28 MITprof.prof_Serr=zeros(nProf,nLev);
29 MITprof.np=nProf;
30 MITprof.nr=nLev;
31 MITprof.nd=0;
32 MITprof.list_descr={};
33
34
35

  ViewVC Help
Powered by ViewVC 1.1.22