treat_read_om.f90 Source File


This file depends on

sourcefile~~treat_read_om.f90~~EfferentGraph sourcefile~treat_read_om.f90 treat_read_om.f90 sourcefile~constituent_mass_module.f90 constituent_mass_module.f90 sourcefile~treat_read_om.f90->sourcefile~constituent_mass_module.f90 sourcefile~dr_module.f90 dr_module.f90 sourcefile~treat_read_om.f90->sourcefile~dr_module.f90 sourcefile~hydrograph_module.f90 hydrograph_module.f90 sourcefile~treat_read_om.f90->sourcefile~hydrograph_module.f90 sourcefile~input_file_module.f90 input_file_module.f90 sourcefile~treat_read_om.f90->sourcefile~input_file_module.f90 sourcefile~maximum_data_module.f90 maximum_data_module.f90 sourcefile~treat_read_om.f90->sourcefile~maximum_data_module.f90 sourcefile~organic_mineral_mass_module.f90 organic_mineral_mass_module.f90 sourcefile~treat_read_om.f90->sourcefile~organic_mineral_mass_module.f90 sourcefile~water_allocation_module.f90 water_allocation_module.f90 sourcefile~treat_read_om.f90->sourcefile~water_allocation_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 sourcefile~water_allocation_module.f90->sourcefile~hydrograph_module.f90

Source Code

      subroutine treat_read_om

      use water_allocation_module
      use dr_module
      use constituent_mass_module
      use hydrograph_module
      use input_file_module
      use organic_mineral_mass_module
      use maximum_data_module

      implicit none
      
      character (len=80) :: titldum = ""
      character (len=80) :: header = ""
      integer :: eof = 0
      integer :: imax = 0
      logical :: i_exist              !none       |check to determine if file exists
      integer :: ii = 0

      eof = 0
      imax = 0
      
      !read delivery ratio organic-mineral data
      inquire (file="treatment.trt", exist=i_exist)
      if (i_exist .or. "treatment.trt" /= "null") then
        do
          open (107,file="treatment.trt")
          read (107,*,iostat=eof) titldum
          if (eof < 0) exit
          read (107,*,iostat=eof) imax
          if (eof < 0) exit
          read (107,*,iostat=eof) header
          if (eof < 0) exit
          read (107,*,iostat=eof) header
          if (eof < 0) exit

          db_mx%trt_om = imax
          
          allocate (trt(0:imax))
          allocate (trt_om_name(0:imax))
      
          !read all delivery ratio data
          do ii = 1, db_mx%trt_om
            read (107,*,iostat=eof) trt_om_name(ii), trt(ii)   
            if (eof < 0) exit
          end do
          close (107)
          exit
        end do
      end if

      return

      end subroutine treat_read_om