trans_surf_tab Subroutine

private subroutine trans_surf_tab(surf, tab)


Arguments

Type IntentOptional AttributesName
type(OBJ_SURF), intent(inout) :: surf

object OBJ_SURF that contains the heights

real(kind=R8), intent(out), dimension(:, :), allocatable:: tab

height array


Calls

proc~~trans_surf_tab~~CallsGraph proc~trans_surf_tab trans_surf_tab proc~unit2iuc unit2IUc proc~trans_surf_tab->proc~unit2iuc proc~unit2iuf unit2IUf proc~unit2iuc->proc~unit2iuf

Called by

proc~~trans_surf_tab~~CalledByGraph proc~trans_surf_tab trans_surf_tab proc~read_surf read_surf proc~read_surf->proc~trans_surf_tab

Contents

Source Code


Source Code

   subroutine trans_surf_tab(surf, tab)
   implicit none
   type(OBJ_SURF), intent(inout) :: surf                            !! *object ```OBJ_SURF``` that contains the heights*
   real(kind=R8), dimension(:, :), allocatable, intent(out) :: tab  !! *height array*
      integer(kind=I4) :: long, larg, i, j, k
      real(kind=R8)    :: unit_z

      long = surf%xres
      larg = surf%yres
      allocate( tab(1:long, 1:larg) )

      unit_z = unit2IUc(surf%dz_unit)

      do j = 1, larg
      do i = 1, long
         k = (j-1)*long +i
         tab(i, j) = (surf%val(k)*surf%dz+ surf%Zoffset)*unit_z
      enddo
      enddo
      deallocate(surf%val)
   return
   endsubroutine trans_surf_tab