/[MITgcm]/MITgcm_contrib/jmc_script/check_rdmnc.m
ViewVC logotype

Contents of /MITgcm_contrib/jmc_script/check_rdmnc.m

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


Revision 1.1 - (show annotations) (download)
Mon Feb 19 23:42:54 2007 UTC (13 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: testing_tag01, HEAD
a short matlab script to test rdmnc.m

1
2 % $Header: $
3 % $Name: $
4
5 %- matlab script to test mnc output file:
6 % use rdmnc to read netcdf output files and print dimensions of fields.
7
8 %rDir='fizhi-cs-aqualev20/build/';
9 %rDir='global_ocean.90x40x15/build/';
10 %rDir='hs94.cs-32x32x5/build/';
11 %rDir='ideal_2D_oce/build/';
12 %rDir='isomip/build/';
13 %rDir='isomip/tr_run.htd/';
14 %rDir='lab_sea/build/';
15 %rDir='MLAdjust/build/';
16 %rDir='MLAdjust/tr_run.0.leithD/';
17 %rDir='MLAdjust/tr_run.0.leith/';
18 %rDir='MLAdjust/tr_run.0.smag/';
19 %rDir='MLAdjust/tr_run.1.leith/';
20 %rDir='rotating_tank/build/';
21 %rDir='tutorial_barotropic_gyre/build/';
22 rDir='internal_wave/build/';
23
24
25 cd(rDir);
26 here=pwd;
27 fprintf(['======== check output from: ',here,' ========\n']);
28 listF=dir('mnc_test_0001/*.t001.nc');
29
30 for n=1:size(listF,1),
31 namf=listF(n).name;
32 nam2=['mnc_test_0001/',namf(1:end-7),'*.nc'];
33 fprintf(['file:>',nam2,'<\n']);
34 S=rdmnc(nam2);
35 listV=fieldnames(S);
36 for i=1:size(listV,1), cvar=char(listV(i)); fprintf([' ',cvar]); end; fprintf('\n');
37 j=0; for i=1:size(listV,1), cvar=char(listV(i)); siz=size(S.(cvar));
38 if prod(siz) ~= siz(1), j=j+1; fprintf([' > ',cvar,' :']);
39 fprintf(' %i',size(S.(cvar))); fprintf(' < |');
40 if rem(j,4) == 0, fprintf('\n'); end
41 end
42 end;
43 if rem(j,4) ~= 0, fprintf('\n'); end
44 end
45 cd ../..

  ViewVC Help
Powered by ViewVC 1.1.22