read_img Subroutine

private subroutine read_img()

Note

Function that reads a digital surf file and returns the surface in PARAM%surf

Arguments

None

Calls

proc~~read_img~~CallsGraph proc~read_img read_img read_surf read_surf proc~read_img->read_surf

Called by

proc~~read_img~~CalledByGraph proc~read_img read_img proc~read_job read_job proc~read_job->proc~read_img proc~prg_surf prg_surf proc~prg_surf->proc~read_job program~main main program~main->proc~prg_surf

Source Code

   subroutine read_img()
   !================================================================================================
   !<@note Function that reads a digital surf file and returns the surface in PARAM%surf
   !<
   !<@endnote
   !------------------------------------------------------------------------------------------------
   implicit none

      character(len=512) :: nom_surf

      nom_surf = repeat (" ", len(nom_surf) )

      read(JOB,*) nom_surf ; LINE_READ = LINE_READ + 1 ; write(SPY,*) "line: ", LINE_READ, trim(nom_surf)

      ! read the surface, no scaling, no centering
      call read_surf( nom_fic = trim(nom_surf), &  ! IN
                        tab_s = PARAM%surf,     &  ! OUT
                         scal = SCALE_IMG )        ! OUT

      PARAM%width       = SCALE_IMG%xres
      PARAM%height      = SCALE_IMG%yres
      PARAM%npts        = SCALE_IMG%xres * SCALE_IMG%yres
      PARAM%surf_dx     = SCALE_IMG%lx / SCALE_IMG%xres
      PARAM%surf_dy     = SCALE_IMG%ly / SCALE_IMG%yres
      PARAM%surf_width  = SCALE_IMG%lx
      PARAM%surf_height = SCALE_IMG%ly

      write(*,*) "width ",   PARAM%width,      " height ", PARAM%height, " npts ", PARAM%npts
      write(*,*) "surf dx ", PARAM%surf_dx,    " dy ",     PARAM%surf_dy
      write(*,*) "width ",   PARAM%surf_width, " height ", PARAM%surf_height

   return
   endsubroutine read_img