Skip to content

Commit

Permalink
reading fuel categories from input_fc
Browse files Browse the repository at this point in the history
  • Loading branch information
janmandel committed Jul 22, 2010
1 parent 9b8ae03 commit 8d204c4
Show file tree
Hide file tree
Showing 6 changed files with 64,665 additions and 14 deletions.
4 changes: 2 additions & 2 deletions other/Matlab/util1_jan/write_array_2d.m
Expand Up @@ -13,7 +13,7 @@ function write_array_2d(filename,a)
% image_array_2d visualize the array by image_array_2d(a)
[m,n]=size(a);
h=fopen(filename,'w');
fprintf(h,'%6i\n',m,n);
fprintf(h,'%14.7e\n',a');
fprintf(h,'%i\n',m,n);
fprintf(h,'%g\n',a');
fclose(h);
end
6 changes: 5 additions & 1 deletion wrfv2_fire/dyn_em/module_initialize_fire.F
Expand Up @@ -417,6 +417,10 @@ SUBROUTINE init_domain_rk ( grid &
ENDDO
ENDDO

if(config_flags%fire_fuel_read.eq.2) &
call read_array_2d('input_fc',grid%nfuel_cat,ifds,ifde,jfds,jfde,ifms,ifme,jfms,jfme)


have_fire_grad=.false.
have_atm_grad=.false.
have_fire_ht=.false.
Expand Down Expand Up @@ -586,7 +590,7 @@ SUBROUTINE init_domain_rk ( grid &
ENDDO
ENDDO
write(6, *)' Max terrain height on the fire mesh ',mtn_max
write(6, *)' Max terrain gradient on the fire mesh ',mtn_max
write(6, *)' Max terrain gradient on the fire mesh ',grad_max

! the rest of initialization dependent on the atmosphere grid terrain height set

Expand Down
6 changes: 4 additions & 2 deletions wrfv2_fire/phys/module_fr_sfire_phys.F
Expand Up @@ -480,9 +480,11 @@ subroutine set_nfuel_cat( &
!$OMP END CRITICAL(SFIRE_PHYS_CRIT)
call message(msg)
if (ifuelread .eq. -1) then
call message('set_nfuel_cat: assuming nfuel_cat initialized elsewhere')
if (ifuelread .eq. -1 .or. ifuelread .eq. 2) then
!$OMP CRITICAL(SFIRE_PHYS_CRIT)
call message('set_nfuel_cat: assuming nfuel_cat initialized already')
call message(msg)
!$OMP END CRITICAL(SFIRE_PHYS_CRIT)
else if (ifuelread .eq. 0) then
!
do j=jfts,jfte
Expand Down

0 comments on commit 8d204c4

Please sign in to comment.