psmile_extract_indices_2d_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_Extract_indices_2d_real
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_extract_indices_2d_real (array, shape, &
00012                dstijk, ncpl, dest_vector, ierror)
00013 !
00014 ! !USES:
00015 !
00016       use PRISM_constants
00017 !
00018       use PSMILe, dummy_interface => PSMILe_Extract_indices_2d_real
00019 
00020       implicit none
00021 !
00022 ! !INPUT PARAMETERS:
00023 !
00024       Integer, Intent (In)            :: shape (2, ndim_2d)
00025 !
00026 !     Shape of the array "array"
00027 !
00028       Real, Intent (In)               :: array (shape(1,1):shape(2,1), 
00029                                                 shape(1,2):shape(2,2))
00030 !
00031       Integer, Intent (In)            :: ncpl
00032 !
00033 !     Dimension of output vector "dest_vector" and input vector "dstijk"
00034 !
00035       Integer, Intent (In)            :: dstijk (ndim_3d, ncpl)
00036 !
00037 ! !OUTPUT PARAMETERS:
00038 !
00039       Real, Intent (Out)              :: dest_vector (ncpl)
00040 !
00041 !     Output vector containing extracted values of indices "dstijk"
00042 !
00043       Integer, Intent (Out)           :: ierror
00044 
00045 !     Returns the error code of PSMILE_Extract_indices_2d_real;
00046 !             ierror = 0 : No error
00047 !             ierror > 0 : Severe error
00048 !
00049 ! !LOCAL VARIABLES
00050 !
00051 !     ... for extracting the compact list
00052 !
00053       Integer                         :: n
00054 !
00055 ! !DESCRIPTION:
00056 !
00057 ! Subroutine "PSMILe_Extract_indices_2d_real" extracts the values of array
00058 ! "array" for indices specified in "dstijk" and stores the values in
00059 ! destination vector "dest_vector"
00060 !
00061 ! !REVISION HISTORY:
00062 !
00063 !   Date      Programmer   Description
00064 ! ----------  ----------   -----------
00065 ! 03.07.21    H. Ritzdorf  created
00066 !
00067 !EOP
00068 !----------------------------------------------------------------------
00069 !
00070 !  $Id: psmile_extract_indices_2d_real.F90 2325 2010-04-21 15:00:07Z valcke $
00071 !  $Author: valcke $
00072 !
00073    Character(len=len_cvs_string), save :: mycvs = 
00074        '$Id: psmile_extract_indices_2d_real.F90 2325 2010-04-21 15:00:07Z valcke $'
00075 !
00076 !----------------------------------------------------------------------
00077 !----------------------------------------------------------------------
00078 !
00079 !  Initialization
00080 !
00081 #ifdef VERBOSE
00082       print 9990, trim(ch_id)
00083 
00084       call psmile_flushstd
00085 #endif /* VERBOSE */
00086 !
00087 #ifdef PRISM_ASSERTION
00088 #endif
00089 !
00090       ierror = 0
00091 !
00092 !cdir vector
00093          do n = 1, ncpl
00094          dest_vector (n) = array (dstijk(1, n), dstijk(2, n))
00095          end do
00096 !
00097 !===> All done
00098 !
00099 #ifdef VERBOSE
00100       print 9980, trim(ch_id)
00101 
00102       call psmile_flushstd
00103 #endif /* VERBOSE */
00104 !
00105 !  Formats:
00106 !
00107 9990 format (1x, a, ': psmile_extract_indices_2d_real')
00108 9980 format (1x, a, ': psmile_extract_indices_2d_real: eof')
00109 
00110       end subroutine PSMILe_Extract_indices_2d_real

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1