psmile_free_comp_handle.F90

Go to the documentation of this file.
00001 !
00002 !-----------------------------------------------------------------------
00003 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00004 ! All rights reserved. Use is subject to OASIS4 license terms.
00005 !-----------------------------------------------------------------------
00006 !BOP
00007 !
00008 ! !ROUTINE: PSMILe_Free_comp_handle
00009 !
00010 ! !INTERFACE:
00011 
00012       subroutine psmile_free_comp_handle (comp_id, ierror)
00013 !
00014 ! !USES:
00015 !
00016       use PRISM_constants
00017 !
00018       use PSMILe, dummy_interface => PSMILe_Free_comp_handle
00019 
00020       implicit none
00021 !
00022 ! !INPUT PARAMETERS:
00023 !
00024       integer,Intent(In)  :: comp_id
00025 
00026 !     Handle to the component information to be released.
00027 !
00028 ! !OUTPUT PARAMETERS:
00029 !
00030       integer, Intent (Out)               :: ierror
00031 
00032 !     Returns the error code of psmile_free_comp_handle;
00033 !             ierror = 0 : No error
00034 !             ierror > 0 : Severe error
00035 !
00036 ! !LOCAL VARIABLES
00037 !
00038       integer, parameter  :: nerrp = 2
00039       integer             :: ierrp (nerrp)
00040 !
00041 ! !DESCRIPTION:
00042 !
00043 ! Subroutine "PSMILe_Free_comp_handle" released a component handle.
00044 !
00045 ! !REVISION HISTORY:
00046 !
00047 !   Date      Programmer    Description
00048 ! ----------  -----------   -----------
00049 ! 01.12.03    H. Ritzdorf   created
00050 !
00051 !EOP
00052 !----------------------------------------------------------------------
00053 !
00054 ! $Id: psmile_free_comp_handle.F90 2325 2010-04-21 15:00:07Z valcke $
00055 ! $Author: valcke $
00056 !
00057    Character(len=len_cvs_string), save :: mycvs = 
00058        '$Id: psmile_free_comp_handle.F90 2325 2010-04-21 15:00:07Z valcke $'
00059 !
00060 !----------------------------------------------------------------------
00061 
00062 #ifdef VERBOSE
00063       print *, trim(ch_id), ': PSMILe_Free_comp_handle: start handle =', comp_id
00064 
00065       call psmile_flushstd
00066 #endif /* VERBOSE */
00067 
00068 !
00069 !   Initialization
00070 !
00071       ierror = 0
00072 !
00073       if (comp_id > Number_of_Comps_allocated .or. &
00074           comp_id < 1) then
00075 
00076          ierrp (1) = comp_id
00077          ierrp (2) = Number_of_Comps_allocated
00078 
00079          ierror = PRISM_Error_Internal
00080          call psmile_error (ierror, "invalid component handle", &
00081                             ierrp, nerrp, __FILE__, __LINE__)
00082          return
00083       endif
00084 !
00085 !   Free Index
00086 !
00087       Comps(comp_id)%status = PSMILe_status_free
00088 
00089 #ifdef VERBOSE
00090       print *, trim(ch_id), ': PSMILe_Free_comp_handle: eof ierror =', ierror
00091 
00092       call psmile_flushstd
00093 #endif /* VERBOSE */
00094 !
00095       end subroutine PSMILe_Free_comp_handle

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1