ouput with XLONG XLAT
[wrf-fire-matlab.git] / femwind / femwind_fortran.m
blob7d465ac5aef62c8c6556e418e5d0b7b92257aa48
1 function [W,rate]=femwind_fortran(A,X,u0,params)
3 W=[];
5 exe  = './fortran/femwind_test.exe';
6 write_array_nd(swap23(X{1}),'X_input');
7 write_array_nd(swap23(X{2}),'Y_input');
8 write_array_nd(swap23(X{3}),'Z_input');
9 write_array_nd(swap23(u0{1}),'u0_input');
10 write_array_nd(swap23(u0{2}),'v0_input');
11 write_array_nd(swap23(u0{3}),'w0_input');
13 write_array(A,'A_input')
15 % defaults
16 nel = size(X{1})-1;
17 u =zeros(nel);
18 v =zeros(nel);
19 w =zeros(nel);
20 rate=0;   % placeholder
22 disp(['running ',exe])
23 system(exe);
24 u=swap23(read_array('u'));
25 v=swap23(read_array('v'));
26 w=swap23(read_array('w'));
27 rate=read_array_nd('rate');
28 W = {u,v,w};
30 end