1 function tign=create_tign
2 % nodify to your liking
3 [ii,jj]=meshgrid(1:420);
4 tign=sqrt(2*(ii-200).^2+(jj-171).^2)+1;
6 write_array_2d('input_tign_g',tign)
8 function write_array_2d(filename,a)
9 % write_array_2d(filename,a)
10 % Purpose: write 2d matrix as input to WRF-Fire
13 % filename string, the name of the file
14 % a 2d matrix, the array to be written
16 % Example: write_array_2d('input_ht',ht)
19 % read_array_2d read the file back by a=read_array_2d(filename)
20 % image_array_2d visualize the array by image_array_2d(a)
22 h=fopen(filename,'w');
23 fprintf(h,'%i\n',m,n);
24 fprintf(h,'%.7g\n',a');