Merge commit 'b453692af7dadf1db40358c02cfa86d182db5d2'
[wrf-fire-matlab.git] / femwind / restriction_fortran.m
blob8046eb71bfab9c2669c0e57b9e2b5f551bb8acf8
1 function uc=restriction_fortran(u,hzc,icl3,X,params); 
2 % call fortran version
4 % get coarse size
5 n=size(X{1});
6 [icl1,icl2]=hzc2icl(hzc,n);
7 nc = [length(icl1),length(icl2),length(icl3)];
9 %Writing all arrays to text files for use by fortran tester
10 uc = rand(nc);  ! for sizes only
11 write_array(swap23(uc),'uc');
12 write_array(swap23(u),'u');
13 write_array(swap23(X{1}),'X');
14 write_array(swap23(X{2}),'Y');
15 write_array(swap23(X{3}),'Z');
16 write_array(hzc(:),'hcz');
17 write_array(icl3(:),'cl_z');
19 system('./fortran/restriction_test.exe');
20 uc = swap23(read_array('uc'));
22 end