psmile_free_comp_handle.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 subroutine psmile_free_comp_handle (comp_id, ierror)
00013
00014
00015
00016 use PRISM_constants
00017
00018 use PSMILe, dummy_interface => PSMILe_Free_comp_handle
00019
00020 implicit none
00021
00022
00023
00024 integer,Intent(In) :: comp_id
00025
00026
00027
00028
00029
00030 integer, Intent (Out) :: ierror
00031
00032
00033
00034
00035
00036
00037
00038 integer, parameter :: nerrp = 2
00039 integer :: ierrp (nerrp)
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
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
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
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