1 |
gforget |
1.1 |
for icur=6:6 |
2 |
|
|
switch icur |
3 |
|
|
case 1 |
4 |
|
|
repr='/raid2/king/data_1x1_92-03/forcing_ECMWF/'; |
5 |
|
|
list_files=dir([repr '*19*']); |
6 |
|
|
case 2 |
7 |
|
|
repr='/raid2/king/data_1x1_92-03/forcing_ECMWF/'; |
8 |
|
|
list_files=dir([repr '*20*']); |
9 |
|
|
case 3 |
10 |
|
|
repr='/raid2/king/data_1x1_92-03/bulk_ECMWF/'; |
11 |
|
|
list_files=dir([repr '*19*']); |
12 |
|
|
case 4 |
13 |
|
|
repr='/raid2/king/data_1x1_92-03/bulk_ECMWF/'; |
14 |
|
|
list_files=dir([repr '*20*']); |
15 |
|
|
case 5 |
16 |
|
|
repr='/net/ross/raid2/king/ERA40_ECMWF_gau6_78-06/'; |
17 |
|
|
list_files=dir([repr '*20*']); |
18 |
|
|
case 6 |
19 |
|
|
repr='/net/ross/raid2/king/ERA40_ECMWF_gau6_78-06/'; |
20 |
|
|
list_files=dir([repr '*19*']); |
21 |
|
|
end |
22 |
|
|
|
23 |
|
|
stat_files=zeros(length(list_files),3); |
24 |
|
|
|
25 |
|
|
for fcur=1:length(list_files) |
26 |
|
|
file_cur=deblank(list_files(fcur).name); |
27 |
|
|
fid=fopen([repr file_cur],'r','b'); |
28 |
|
|
tmp4=list_files(fcur).bytes/4; |
29 |
|
|
tmp1=fread(fid,tmp4,'float32'); |
30 |
|
|
stat_files(fcur,1)=sum(~isfinite(tmp1)); |
31 |
|
|
stat_files(fcur,2)=sum(tmp1~=0); |
32 |
|
|
stat_files(fcur,3)=sum(tmp1==0); |
33 |
|
|
if stat_files(fcur,1)~=0 |
34 |
|
|
fprintf(['\n ' file_cur ' ' num2str(stat_files(fcur,:)) '\n']); |
35 |
|
|
else |
36 |
|
|
fprintf('x'); |
37 |
|
|
end |
38 |
|
|
fclose(fid); |
39 |
|
|
clear tmp1; |
40 |
|
|
end |
41 |
|
|
|
42 |
|
|
eval(['list_files' num2str(icur) '=list_files;']); |
43 |
|
|
eval(['stat_files' num2str(icur) '=stat_files;']); |
44 |
|
|
|
45 |
|
|
end%for icur=1:4 |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|