psmile_extent_subgrid_1d_dble.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_Extent_Subgrid_1d_dble
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_extent_subgrid_1d_dble (         &
00012                     array, idlow, idhigh, nbr_corners,   &
00013                            ibeg,  iend,                  &
00014                     extent, ierror)
00015 !
00016 ! !USES:
00017 !
00018       use PRISM_constants
00019 !
00020       use PSMILe, dummy_interface => PSMILe_Extent_Subgrid_1d_dble
00021 
00022       implicit none
00023 !
00024 ! !INPUT PARAMETERS:
00025 !
00026       Integer, Intent (In)             :: idlow, idhigh, nbr_corners
00027 
00028 !     Dimensions of "array"
00029 
00030       Double Precision, Intent (In)    :: array (idlow:idhigh, nbr_corners)
00031 
00032 !     Fully dimensioned Array for which the extent of the subarray
00033 !     should be computed.
00034 
00035       Integer, Intent (In)             :: ibeg, iend
00036 
00037 !     Definintion of the subgrid
00038 
00039 !
00040 ! !OUTPUT PARAMETERS:
00041 !
00042       Double Precision, Intent (Out)   :: extent (2)
00043 
00044 !     Returns the extent of subarray "array (ibeg:iend, nbr_corners)"
00045 
00046       Integer, Intent (Out)            :: ierror
00047 
00048 !     Returns the error code of PSMILe_Extent_Subgrid_1d_dble;
00049 !             ierror = 0 : No error
00050 !             ierror > 0 : Severe error
00051 !
00052 ! !DESCRIPTION:
00053 !
00054 ! Subroutine "PSMILe_Extent_Subgrid_1d_dble" computes the extent
00055 ! of the subgrid contained in array (ibeg:iend, nbr_corners).
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_extent_subgrid_1d_dble.F90 2325 2010-04-21 15:00:07Z valcke $
00067 ! $Author: valcke $
00068    Character(len=len_cvs_string), save :: mycvs = 
00069        '$Id: psmile_extent_subgrid_1d_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00070 !
00071 !----------------------------------------------------------------------
00072 
00073 #ifdef VERBOSE
00074       print *, trim(ch_id), ': PSMILe_Extent_Subgrid_1d_dble'
00075 
00076       call psmile_flushstd
00077 #endif /* VERBOSE */
00078 !
00079 !  Initialization
00080 !
00081       ierror = 0
00082 !
00083 !  Get extent of subgrid
00084 !
00085       if (ibeg == idlow .and. iend == idhigh) then
00086          extent (1) = MINVAL (array)
00087          extent (2) = MAXVAL (array)
00088 
00089       else
00090 
00091          extent (1) = MINVAL (array (ibeg:iend, 1:nbr_corners))
00092          extent (2) = MAXVAL (array (ibeg:iend, 1:nbr_corners))
00093       endif
00094 !
00095 !===> All done
00096 !
00097 #ifdef VERBOSE
00098       print *, trim(ch_id), ': PSMILe_Extent_Subgrid_1d_dble eof', &
00099                             ': ierror =', ierror
00100 
00101       call psmile_flushstd
00102 #endif /* VERBOSE */
00103 !
00104       end subroutine PSMILe_Extent_Subgrid_1d_dble

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1