Unittest_MEDprofile_1.f
Aller à la documentation de ce fichier.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 program MEDprofile1
00023
00024 implicit none
00025 include 'med.hf'
00026
00027
00028 integer cret
00029 integer fid
00030 character*64 fname, pname1, pname2
00031 parameter (fname="Unittest_MEDprofile_1.med")
00032 parameter (pname1="Profile name1")
00033 parameter (pname2="Profile name 2")
00034 integer psize1,psize2
00035 parameter (psize1=4, psize2=2)
00036 integer profile1(4), profile2(2)
00037 data profile1 /1,2, 3,4/
00038 data profile2 /5,6/
00039
00040
00041
00042 call mfiope(fid,fname,MED_ACC_CREAT,cret)
00043 print *,cret
00044 print *,fid
00045 if (cret .ne. 0 ) then
00046 print *,'ERROR : file creation'
00047 call efexit(-1)
00048 endif
00049
00050
00051
00052 call mpfprw(fid,pname1,psize1,profile1,cret)
00053 print *,cret
00054 if (cret .ne. 0 ) then
00055 print *,'ERROR : profile creation'
00056 call efexit(-1)
00057 endif
00058
00059
00060
00061 call mpfprw(fid,pname2,psize2,profile2,cret)
00062 print *,cret
00063 if (cret .ne. 0 ) then
00064 print *,'ERROR : profile creation'
00065 call efexit(-1)
00066 endif
00067
00068
00069
00070 call mficlo(fid,cret)
00071 print *,cret
00072 if (cret .ne. 0 ) then
00073 print *,'ERROR : close file'
00074 call efexit(-1)
00075 endif
00076
00077
00078
00079 end
00080