[cig-commits] r8487 - seismo/2D/SPECFEM2D/trunk

walter at geodynamics.org walter at geodynamics.org
Fri Dec 7 15:50:09 PST 2007


Author: walter
Date: 2007-12-07 15:50:08 -0800 (Fri, 07 Dec 2007)
New Revision: 8487

Modified:
   seismo/2D/SPECFEM2D/trunk/cree_image_PNM.f90
   seismo/2D/SPECFEM2D/trunk/gmat01.f90
   seismo/2D/SPECFEM2D/trunk/plotpost.f90
   seismo/2D/SPECFEM2D/trunk/specfem2D.f90
   seismo/2D/SPECFEM2D/trunk/write_seismograms.f90
Log:
added routine to convert PNM image files to more convenient GIF format.
changed all i5.5 to i6.6 and i5 to i6 to allow for more than 99999 time steps.


Modified: seismo/2D/SPECFEM2D/trunk/cree_image_PNM.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/cree_image_PNM.f90	2006-06-13 22:05:34 UTC (rev 8486)
+++ seismo/2D/SPECFEM2D/trunk/cree_image_PNM.f90	2007-12-07 23:50:08 UTC (rev 8487)
@@ -34,13 +34,13 @@
 
   double precision amplitude_max
 
-  character(len=100) nom_fichier
+  character(len=100) nom_fichier,system_command
 
   double precision valeur_normalisee
   integer :: R, G, B
 
 ! ouverture du fichier image
-  write(nom_fichier,"('OUTPUT_FILES/image',i5.5,'.pnm')") it
+  write(nom_fichier,"('OUTPUT_FILES/image',i6.6,'.pnm')") it
 
 ! ouvrir le fichier
   open(unit=27, file=nom_fichier, status='unknown')
@@ -101,5 +101,12 @@
 ! fermer le fichier
   close(27)
 
+! open image file and create system command to convert image to more convenient format
+  write(system_command,"('cd OUTPUT_FILES ; convert image',i6.6, &
+          & '.pnm image',i6.6,'.gif ; rm image',i6.6,'.pnm')") it,it,it
+
+! call the system to convert image to GIF
+  call system(system_command)
+
   end subroutine cree_image_PNM
 

Modified: seismo/2D/SPECFEM2D/trunk/gmat01.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/gmat01.f90	2006-06-13 22:05:34 UTC (rev 8486)
+++ seismo/2D/SPECFEM2D/trunk/gmat01.f90	2007-12-07 23:50:08 UTC (rev 8487)
@@ -116,11 +116,11 @@
 !
   100   format(//,' M a t e r i a l   s e t s :  ', &
          ' 2 D  e l a s t i c i t y', &
-         /1x,54('='),//5x,'Number of material sets . . . . . . (numat) =',i5)
+         /1x,54('='),//5x,'Number of material sets . . . . . . (numat) =',i6)
   200   format(//5x,'------------------------',/5x, &
          '-- Isotropic material --',/5x, &
          '------------------------',/5x, &
-         'Material set number. . . . . . . . (jmat) =',i5,/5x, &
+         'Material set number. . . . . . . . (jmat) =',i6,/5x, &
          'P-wave velocity. . . . . . . . . . . (cp) =',1pe15.8,/5x, &
          'S-wave velocity. . . . . . . . . . . (cs) =',1pe15.8,/5x, &
          'Mass density. . . . . . . . . . (density) =',1pe15.8,/5x, &
@@ -132,7 +132,7 @@
   300   format(//5x,'-------------------------------------',/5x, &
          '-- Transverse anisotropic material --',/5x, &
          '-------------------------------------',/5x, &
-         'Material set number. . . . . . . . (jmat) =',i5,/5x, &
+         'Material set number. . . . . . . . (jmat) =',i6,/5x, &
          'c11 coefficient (Pascal). . . . . . (c11) =',1pe15.8,/5x, &
          'c13 coefficient (Pascal). . . . . . (c13) =',1pe15.8,/5x, &
          'c33 coefficient (Pascal). . . . . . (c33) =',1pe15.8,/5x, &

Modified: seismo/2D/SPECFEM2D/trunk/plotpost.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/plotpost.f90	2006-06-13 22:05:34 UTC (rev 8486)
+++ seismo/2D/SPECFEM2D/trunk/plotpost.f90	2007-12-07 23:50:08 UTC (rev 8487)
@@ -192,7 +192,7 @@
 !
 !---- ouverture du fichier PostScript
 !
-  write(name,"('OUTPUT_FILES/vect',i5.5,'.ps')") it
+  write(name,"('OUTPUT_FILES/vect',i6.6,'.ps')") it
   open(unit=24,file=name,status='unknown')
 
 !
@@ -906,7 +906,7 @@
  510  format(f5.1,1x,f5.1,' M')
  600  format(f6.3,' neg CM 0 MR (Time =',f6.3,' s) show')
  601  format(f6.3,' neg CM 0 MR (Time =',1pe10.3,' s) show')
- 610  format(f6.3,' neg CM 0 MR (Time step = ',i5,') show')
+ 610  format(f6.3,' neg CM 0 MR (Time step = ',i6,') show')
  620  format(f6.3,' neg CM 0 MR (Cut =',f5.2,' \%) show')
  640  format(f6.3,' neg CM 0 MR (Max norm =',1pe10.3,') show')
 

Modified: seismo/2D/SPECFEM2D/trunk/specfem2D.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/specfem2D.f90	2006-06-13 22:05:34 UTC (rev 8486)
+++ seismo/2D/SPECFEM2D/trunk/specfem2D.f90	2007-12-07 23:50:08 UTC (rev 8487)
@@ -1572,9 +1572,9 @@
 
     write(IOUT,*)
     if(time >= 1.d-3) then
-      write(IOUT,"('Pas de temps numero ',i5,'   t = ',f7.4,' s')") it,time
+      write(IOUT,"('Pas de temps numero ',i6,'   t = ',f7.4,' s')") it,time
     else
-      write(IOUT,"('Pas de temps numero ',i5,'   t = ',1pe10.4,' s')") it,time
+      write(IOUT,"('Pas de temps numero ',i6,'   t = ',1pe10.4,' s')") it,time
     endif
 
     displnorm_all = maxval(sqrt(displ(1,:)**2 + displ(2,:)**2))
@@ -1826,11 +1826,11 @@
   'Number of space dimensions. . . . . . . . . . (NDIM) =',i8)
 
  600 format(//1x,'C o n t r o l',/1x,13('='),//5x, &
-  'Display frequency . . . . . . . . . . . (IT_AFFICHE) = ',i5/ 5x, &
-  'Color display . . . . . . . . . . . . . . . (colors) = ',i5/ 5x, &
+  'Display frequency . . . . . . . . . . . (IT_AFFICHE) = ',i6/ 5x, &
+  'Color display . . . . . . . . . . . . . . . (colors) = ',i6/ 5x, &
   '        ==  0     black and white display              ',  / 5x, &
   '        ==  1     color display                        ',  /5x, &
-  'Numbered mesh . . . . . . . . . . . . . . .(numbers) = ',i5/ 5x, &
+  'Numbered mesh . . . . . . . . . . . . . . .(numbers) = ',i6/ 5x, &
   '        ==  0     do not number the mesh               ',  /5x, &
   '        ==  1     number the mesh                      ')
 

Modified: seismo/2D/SPECFEM2D/trunk/write_seismograms.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/write_seismograms.f90	2006-06-13 22:05:34 UTC (rev 8486)
+++ seismo/2D/SPECFEM2D/trunk/write_seismograms.f90	2007-12-07 23:50:08 UTC (rev 8487)
@@ -242,7 +242,7 @@
   close(11)
 
 ! formats
-  110 format('xwigb at xcur=',f8.2,'@n1=',i5,'@d1=',f15.8,'@f1=',f15.8,'@label1="Time@(s)"@label2="x@(m)"@n2=',i5,'@x2=')
+  110 format('xwigb at xcur=',f8.2,'@n1=',i6,'@d1=',f15.8,'@f1=',f15.8,'@label1="Time@(s)"@label2="x@(m)"@n2=',i6,'@x2=')
 
   120 format('sed -e ''1,$s/ //g'' -e ''1,$s/@/ /g'' -e ''1,1p'' -e ''$,$s/Ux/Uz/g'' <tempfile > receiver_line_Xsu_XWindow')
 



More information about the cig-commits mailing list