f/2.3.1v3.0/test2.f

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 C ******************************************************************************
00019 C * - Nom du fichier : test2.f
00020 C *
00021 C * - Description : exemples de creations de maillage MED
00022 C *
00023 C ******************************************************************************
00024       program test2
00025 C     
00026       implicit none
00027       include 'med.hf'
00028 C
00029 C
00030       integer cret,ret
00031       integer fid
00032       character*200 des
00033       integer hdfok, medok
00034       character*16 nomcoo(2)
00035       character*16 unicoo(2)
00036       data  nomcoo /"x","y"/, unicoo /"cm","cm"/
00037 
00038 C  ** verifie que le fichier test1.med est au bon format **
00039       call mficom('test1.med',hdfok,medok,cret)
00040       print *,hdfok, medok, cret
00041       if (cret .ne. 0 ) then
00042          print *,'Erreur à la vérification du format'
00043          call efexit(-1)
00044       endif      
00045 
00046 C  ** Ouverture en mode de lecture du fichier test1.med
00047       call mfiope(fid,'test1.med',MED_ACC_RDONLY, cret)
00048       print *,cret
00049       if (cret .ne. 0 ) then
00050          print *,'Erreur ouverture du fichier en lecture'
00051          call efexit(-1)
00052       endif      
00053 
00054 C  ** Lecture de l'en-tete du fichier
00055       call mficor(fid,des,cret)
00056       print *,cret
00057       if (cret .ne. 0 ) then
00058          print *,'Erreur lecture en-tete du fichier'
00059          call efexit(-1)
00060       endif      
00061       print *,"DESCRIPTEUR DE FICHIER : ",des
00062 
00063  
00064 C  ** Fermeture du fichier test1.med 
00065       call mficlo(fid,cret)
00066       print *,cret
00067       if (cret .ne. 0 ) then
00068          print *,'Erreur fermeture du fichier'
00069          call efexit(-1)
00070       endif    
00071 C      
00072       end 
00073 
00074 
00075 
00076 
00077 

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