hrudb_init.f90 Source File


This file depends on

sourcefile~~hrudb_init.f90~~EfferentGraph sourcefile~hrudb_init.f90 hrudb_init.f90 sourcefile~hru_module.f90 hru_module.f90 sourcefile~hrudb_init.f90->sourcefile~hru_module.f90 sourcefile~hydrograph_module.f90 hydrograph_module.f90 sourcefile~hrudb_init.f90->sourcefile~hydrograph_module.f90 sourcefile~basin_module.f90 basin_module.f90 sourcefile~hydrograph_module.f90->sourcefile~basin_module.f90 sourcefile~time_module.f90 time_module.f90 sourcefile~hydrograph_module.f90->sourcefile~time_module.f90

Source Code

      subroutine hrudb_init
    
      use hydrograph_module, only : sp_ob, sp_ob1, ob
      use hru_module, only : hru, hru_db
      
      implicit none

      integer :: imp = 0              !           |
      integer :: ihru = 0             !none       |counter 
      integer :: iob = 0              !           |
      integer :: ihru_db = 0          !           | 

      !!assign database pointers for the hru
      imp = 0
      do ihru = 1, sp_ob%hru
        iob = sp_ob1%hru + ihru - 1
        ihru_db = ob(iob)%props    !points to hru.dat
        hru(ihru)%dbs = hru_db(ihru_db)%dbs
        hru(ihru)%dbsc = hru_db(ihru_db)%dbsc
        hru(ihru)%obj_no = sp_ob1%hru + ihru - 1
        hru(ihru)%area_ha = ob(iob)%area_ha
        hru(ihru)%km = ob(iob)%area_ha / 100.
        hru(ihru)%land_use_mgt_c = hru_db(ihru_db)%dbsc%land_use_mgt
      end do

      return
      end subroutine hrudb_init