Skip to content

Commit

Permalink
adding variables, does not compile yet #3
Browse files Browse the repository at this point in the history
  • Loading branch information
janmandel committed Jan 31, 2022
1 parent cbd2e55 commit 26fe946
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion phys/module_fr_sfire_core.F
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ end subroutine check_lfn_tign_ij


! called from the inside of a loop, inline if possible
!DEC$ ATTRIBUTES FORCEINLINE
!DEC$ ATTRIBUTES FORCEINLINE :: nearest
SUBROUTINE nearest(d,t,ax,ay,sx,sy,st,ex,ey,et,cx2,cy2)
implicit none
!*** arguments
Expand Down
3 changes: 2 additions & 1 deletion phys/module_fr_sfire_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ subroutine sfire_driver_em ( grid , config_flags &
! copy configuration flags to sfire internal structures
call set_flags(config_flags)

write(msg,'(a,i3)')' domain', grid%id
write(msg,'(a,i3)')' domain', grid%grid_id

call message(msg,level=1)

! prevent memory errors because of variables missing in registry packages
Expand Down
13 changes: 10 additions & 3 deletions standalone/module_domain.F
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module module_domain
! define the main datastructure passed to the model
! follows WRFV3/frame/module_domain.F but only fields needed here are defined
! follows WRF frame/module_domain.F but only fields needed here are defined
integer, parameter:: max_tiles=10

type domain
Expand All @@ -10,15 +10,23 @@ module module_domain
! changes every time step
real, pointer, dimension(:,:)::uf => null() ! winds on the fire mesh
real, pointer, dimension(:,:)::vf => null() ! winds on the fire mesh
real, pointer, dimension(:,:)::cuf => null() ! U wind at canopy top
real, pointer, dimension(:,:)::cvf => null() ! V wind at canopy top

! constant arrays - set once at initialization
real, pointer, dimension(:,:)::wz0 => null() ! roughness length
real, pointer, dimension(:,:)::can_top => null() ! Height of tree canopy
real, pointer, dimension(:,:)::zsf => null() ! terrain height
real, pointer, dimension(:,:)::dzdxf => null() ! terrain gradient
real, pointer, dimension(:,:)::dzdyf => null() ! terrain gradient
real, pointer, dimension(:,:)::fxlong=>null() ! fire mesh nodes coordinates
real, pointer, dimension(:,:)::fxlat =>null() ! fire mesh nodes coordinates
real, pointer, dimension(:,:)::nfuel_cat => null() ! index to fuel data table
! nfuel_cat is expanded to the coefficient arrays below from the table in namelist.fire
real, pointer, dimension(:,:)::xlong => null()
real, pointer, dimension(:,:)::xlat => null()

! variable arrays
real, pointer, dimension(:,:)::bbb => null() ! fire spread formula coefficients
real, pointer, dimension(:,:)::betafl => null()
real, pointer, dimension(:,:)::phiwc => null()
Expand All @@ -33,8 +41,6 @@ module module_domain
real, pointer, dimension(:,:)::phb => null()
real, pointer, dimension(:,:)::z0 => null()
real, pointer, dimension(:,:)::ht => null()
real, pointer, dimension(:,:)::xlong => null()
real, pointer, dimension(:,:)::xlat => null()
real, pointer, dimension(:,:)::avg_fuel_frac => null()
real, pointer, dimension(:,:)::grnhfx => null()
real, pointer, dimension(:,:)::grnqfx => null()
Expand Down Expand Up @@ -64,6 +70,7 @@ module module_domain

! scalars
! mesh and housekeeping
integer :: grid_id = 1

real:: sr_x, sr_y ! atmosphere/fire refinement ratio
integer::itimestep ! time step number
Expand Down

0 comments on commit 26fe946

Please sign in to comment.