psmile_free_grid_handle.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_Free_grid_handle
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_free_grid_handle (grid_id, ierror)
00012 !
00013 ! !USES:
00014 !
00015       use PRISM_constants
00016 !
00017       use PSMILe, dummy_interface => PSMILe_Free_grid_handle
00018 
00019       implicit none
00020 !
00021 ! !INPUT PARAMETERS:
00022 !
00023       integer,Intent(In)  :: grid_id
00024 
00025 !     Handle to the grid information to be released.
00026 !
00027 ! !OUTPUT PARAMETERS:
00028 !
00029 !
00030       integer, Intent (Out)               :: ierror
00031 
00032 !     Returns the error code of psmile_free_grid_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_grid_handle" released a grid 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_grid_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_grid_handle.F90 2325 2010-04-21 15:00:07Z valcke $'
00059 !
00060 !----------------------------------------------------------------------
00061 !
00062 !   Initialization
00063 !
00064       ierror = 0
00065 !
00066       if (grid_id > Number_of_Grids_allocated .or. &
00067           grid_id < 1) then
00068 
00069          ierrp (1) = grid_id
00070          ierrp (2) = Number_of_Grids_allocated
00071 
00072          ierror = PRISM_Error_Internal
00073          call psmile_error (ierror, "invalid grid handle", &
00074                             ierrp, nerrp, __FILE__, __LINE__)
00075          return
00076       endif
00077 !
00078 !   Free Index
00079 !
00080       Grids(grid_id)%status = PSMILe_status_free
00081 !
00082       end subroutine PSMILe_Free_grid_handle

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1