2.3.6/test18.f

Aller à la documentation de ce fichier.
00001 C*  This file is part of MED.
00002 C*
00003 C*  COPYRIGHT (C) 1999 - 2015  EDF R&D, CEA/DEN
00004 C*  MED is free software: you can redistribute it and/or modify
00005 C*  it under the terms of the GNU Lesser General Public License as published by
00006 C*  the Free Software Foundation, either version 3 of the License, or
00007 C*  (at your option) any later version.
00008 C*
00009 C*  MED is distributed in the hope that it will be useful,
00010 C*  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 C*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 C*  GNU Lesser General Public License for more details.
00013 C*
00014 C*  You should have received a copy of the GNU Lesser General Public License
00015 C*  along with MED.  If not, see <http://www.gnu.org/licenses/>.
00016 C*
00017 
00018 
00019 C ******************************************************************************
00020 C * - Nom du fichier : test18.f
00021 C *
00022 C * - Description : routines de test de la conformite d'une fichier MED.
00023 C *
00024 C ******************************************************************************
00025       program test18
00026 C     
00027       implicit none
00028       include 'med.hf'
00029 C
00030 C
00031       integer      fid
00032       integer      cret
00033       integer      maj,min,rel
00034       
00035 C **  Creation du fichier test18.med
00036       call efouvr(fid,'test18.med',MED_LECTURE_ECRITURE, cret)
00037       print *,cret
00038       if (cret .ne. 0 ) then
00039          print *,'Erreur creation du fichier'
00040          call efexit(-1)
00041       endif      
00042       print *,'- Creation du fichier'
00043 
00044 C **  Fermeture du fichier
00045       call efferm (fid,cret)
00046       print *,cret
00047       if (cret .ne. 0 ) then
00048          print *,'Erreur fermeture du fichier'
00049          call efexit(-1)
00050       endif      
00051       print *,'- Fermeture du fichier'
00052 
00053 C ** Quelle version de la bibliotheque est utilisee ? **
00054       call efvedo(maj,min,rel,cret)
00055       print *,cret
00056       if (cret .ne. 0 ) then
00057          print *,'Erreur lecture version med'
00058          call efexit(-1)
00059       endif      
00060       print *,'- Version MED utilisee : ',maj,'.',min,'.',rel
00061  
00062 C ** Conformite du format HDF  **
00063       call effoco('test18.med',cret)
00064       print *,cret
00065       if (cret .eq. 0) then
00066          print *,'- Format HDF conforme'
00067       else
00068          print *,'- Format HDF non conforme'
00069          call efexit(-1)
00070       endif   
00071 
00072 C ** Conformite de la bibliotheque MED
00073       call efveco('test18.med',cret)
00074       print *,cret
00075       if (cret .eq. 0) then
00076          print *,'- Version MED du fichier conforme'
00077       else
00078          print *,'- Version MED du fichier non conforme'
00079          call efexit(-1)
00080       endif           
00081 
00082 C **  Ouverture du fichier test18.med en lecture seule
00083       call efouvr(fid,'test18.med',MED_LECTURE, cret)
00084       if (cret .ne. 0 ) then
00085          print *,'Erreur ouverture du fichier'
00086          call efexit(-1)
00087       endif      
00088       print *,'- Ouverture du fichier'
00089 
00090 C **  Lecture de la version de MED utilisee pour creer le fichier ? **
00091       call efveli(fid,maj,min,rel,cret)
00092       if (cret .ne. 0 ) then
00093          print *,'Erreur lecture version med du fichier'
00094          call efexit(-1)
00095       endif      
00096       print *,cret
00097       print *,'- Fichier cree avec MED V',maj,'.',min,'.',rel
00098          
00099 C **  Fermeture du fichier
00100       call efferm (fid,cret)
00101       print *,cret
00102       if (cret .ne. 0 ) then
00103          print *,'Erreur fermeture du fichier'
00104          call efexit(-1)
00105       endif      
00106       print *,'- Fermeture du fichier'
00107 C 
00108       end 
00109 
00110 

Généré le Thu Oct 8 14:26:17 2015 pour MED fichier par  doxygen 1.6.1