psmile_print_irreg2_coord_real.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00003 ! All rights reserved. Use is subject to OASIS4 license terms.
00004 !-----------------------------------------------------------------------
00005 !BOP
00006 !
00007 ! !ROUTINE: PSMILe_Print_irreg2_coord_real
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_print_irreg2_coord_real (x, y, z, shape,     &
00012                                                  ind, nloc, message)
00013 !
00014 ! !USES:
00015 !
00016       use PRISM_constants
00017 !
00018       use PSMILe, dummy_interface => PSMILe_Print_irreg2_coord_real
00019 !
00020       implicit none
00021 !
00022 ! !INPUT PARAMETERS:
00023 !
00024       Integer, Intent (In)          :: shape (2, ndim_3d)
00025 !
00026 !     Shape of coordinates
00027 !
00028       Real, Intent (In)             :: x (shape(1,1):shape(2,1), 
00029                                           shape(1,2):shape(2,2))
00030       Real, Intent (In)             :: y (shape(1,1):shape(2,1), 
00031                                           shape(1,2):shape(2,2))
00032       Real, Intent (In)             :: z (shape(1,3):shape(2,3))
00033 !     Coords to be printed out
00034 !
00035       Integer, Intent(In)           :: nloc
00036 !
00037 !     Number of indices to be printed out
00038 
00039       Integer, Intent(In)           :: ind (ndim_3d, nloc)
00040 !
00041 !     Indices of coords to be printed out
00042 !
00043       Character(len=*), Intent(In)  :: message
00044 
00045 !     Additional string to be printed out
00046 !
00047 ! !LOCAL VARIABLES
00048 !
00049       Integer                       :: i
00050 !
00051 ! !DESCRIPTION:
00052 !
00053 ! Subroutine "PSMILe_Print_irreg2_coord_real" prints the coordinate values
00054 ! of indices "ind" for a grid of type "PRISM_IRRLONLAT_Regvert".
00055 !
00056 !
00057 ! !REVISION HISTORY:
00058 !
00059 !   Date      Programmer    Description
00060 ! ----------  -----------   -----------
00061 ! 01.12.03    H. Ritzdorf   created
00062 !
00063 !EOP
00064 !----------------------------------------------------------------------
00065 !
00066 ! $Id: psmile_print_irreg2_coord_real.F90 2325 2010-04-21 15:00:07Z valcke $
00067 ! $Author: valcke $
00068 !
00069    Character(len=len_cvs_string), save :: mycvs = 
00070        '$Id: psmile_print_irreg2_coord_real.F90 2325 2010-04-21 15:00:07Z valcke $'
00071 !
00072 !----------------------------------------------------------------------
00073 !
00074       write (*, 9000) trim(ch_id), message
00075 !     print *, 'shape', shape
00076 !     print *, 'nloc', nloc
00077 !     print *, 'ind', ind
00078       call psmile_flushstd ()
00079 !
00080 !  Check
00081 !
00082          do i = 1, nloc
00083          if (shape(1,1) <= ind(1,i) .and. ind(1,i) <= shape(2,1) .and. &
00084              shape(1,2) <= ind(2,i) .and. ind(2,i) <= shape(2,2) .and. &
00085              shape(1,3) <= ind(3,i) .and. ind(3,i) <= shape(2,3)) then
00086             print 9010, ind (:, i), x (ind(1,i), ind(2,i)), &
00087                                     y (ind(1,i), ind(2,i)), &
00088                                     z (ind(3,i))
00089          else
00090             print 9020, ind (:, i), shape
00091          end if
00092          end do ! i
00093 !
00094 !  FLush output
00095 !
00096       call psmile_flushstd ()
00097 !
00098 !-----------------------------------------------------------------------
00099 !  Formats
00100 !-----------------------------------------------------------------------
00101 !
00102 9000  format (/1x, a, ': ', a)
00103 9010  format (1x, 'ind =', 3i6, '; coord =', 1p, 3d16.9)
00104 9020  format (1x, 'ind =', 3i6, ' out of shape', 6i6)
00105 !
00106       end subroutine PSMILe_Print_irreg2_coord_real

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1