psmile_smioc_finalize.F90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! All rights reserved. Use is subject to OASIS4 license terms.
00004 !-----------------------------------------------------------------------
00005 ! BOP
00006 !
00007 ! !ROUTINE: PSMILe_smioc_finalize
00008 !
00009 ! !INTERFACE
00010 subroutine psmile_smioc_finalize(id_error)
00011 
00012 !
00013 ! !USES:
00014 !
00015   USE PSMILe_smioc
00016 !
00017   IMPLICIT NONE
00018 
00019 !
00020 ! !PARAMETERS:
00021 !
00022 
00023 !
00024 ! ! RETURN VALUE
00025 !
00026   INTEGER, INTENT (Out)               :: id_error   ! error value
00027 
00028 ! !DESCRIPTION
00029 ! Subroutine "PRISMDrv_finalize_smioc_struct" finalizeialize and set the driver
00030 ! smioc structures using the smioc api.
00031 !
00032 ! !REVISED HISTORY
00033 !   Date      Programmer   Description
00034 ! ----------  ----------   -----------
00035 ! 13/10/2003  S. Valcke     Creation
00036 ! 30/12/2003  D. Declat     Included in the driver
00037 ! 22/03/2010  JM Epitalon   Simultaneous access to multiple SMIOC files
00038 !
00039 ! EOP
00040 !----------------------------------------------------------------------
00041 ! $Id: psmile_smioc_finalize.F90 2399 2010-06-21 08:09:39Z coquart $
00042 ! $Author: coquart $
00043 !----------------------------------------------------------------------
00044 !
00045 ! 0. Local declarations
00046 !
00047   CHARACTER(LEN=80), SAVE  :: mycvs = 
00048      '$Id'
00049 
00050 !     ... for error handling
00051   INTEGER, PARAMETER  :: nerrp = 1
00052   INTEGER             :: ierrp (nerrp)
00053   INTEGER             :: id_err
00054 !
00055 !----------------------------------------------------------------------
00056 !----------------------------------------------------------------------
00057 !
00058   id_error = 0
00059   id_err = 0
00060 !
00061 ! 1. Deallocation of global arrays
00062 !
00063   DEALLOCATE(iga_comp_id_doc_XML, stat=id_err)
00064   DEALLOCATE(iga_comp_nb_grids, stat=id_err)
00065   DEALLOCATE(iga_comp_nb_transi, stat=id_err)
00066   DEALLOCATE(iga_comp_nb_persis, stat=id_err)
00067   DEALLOCATE(iga_comp_nb_unitsets, stat=id_err)
00068   DEALLOCATE(iga_smioc_unitsets, stat=id_err)
00069   DEALLOCATE(sga_smioc_grids, stat=id_err)
00070   DEALLOCATE(sga_smioc_transi, stat=id_err)
00071   DEALLOCATE(sga_smioc_persis, stat=id_err)
00072   DEALLOCATE(iga_comp_nb_stand_name, stat=id_err)
00073   DEALLOCATE(iga_comp_nb_transi_in, stat=id_err)
00074   DEALLOCATE(iga_comp_nb_transi_out, stat=id_err)
00075 
00076   IF (id_err > 0) THEN
00077       ierrp (1) = id_err
00078       id_err = 14
00079       
00080       call psmile_error ( id_err, 'PSMILe_smioc_finalize', &
00081          ierrp, 1, __FILE__, __LINE__ )
00082       RETURN
00083   ENDIF
00084 
00085   id_error = id_err
00086 
00087 END SUBROUTINE PSMILe_smioc_finalize
00088 
00089 
00090 
00091 

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1