ccccccccc Programa per a llegir dades d'un arxiu de text
	integer per,tt,i,vari
	integer num_niv,niv,imi,ima,jmi,jma
	character*10 linia
	character*1 caracter
	character*1 an,me,di,ho,mi,va
	character*200 ubic
	dimension an(2),me(2),di(2),ho(2),mi(2),va(10)
	dimension niv(11)
	
	open(unit=8,file='gnuparam.txt',status='old')
	vari=0
	
	read(8,3)linia
  3	format(a10)
	read(8,4)linia
  4	format(a10)
	read(8,1)an(1),an(2),caracter,me(1),me(2),caracter
     &,di(1),di(2),caracter,ho(1),ho(2),caracter,mi(1),mi(2)
  1	format(14(1a))
	read(8,5)linia
  5	format(a10)
	read(8,6)linia
  6	format(a10)
  	read(8,*)per
	read(8,7)linia
  7	format(a10)
	read(8,8)linia
  8	format(a10)
	read(8,*)tt
	read(8,9)linia
  9	format(a10)
	read(8,10)linia
 10	format(a10)
	read(8,2)(va(i),i=1,10)
  2	format(10(a1))
	read(8,11)linia
 11	format(a10)
	read(8,12)linia
 12	format(a10)
	read(8,*)num_niv
	read(8,13)linia
 13	format(a10)
	read(8,14)linia
 14	format(a10)
	read(8,15)linia
 15	format(a10)

	do i=1,num_niv
	read(8,*)niv(i)
  	enddo

	read(8,16)linia
 16	format(a10)
	read(8,17)linia
 17	format(a10)
	read(8,18)linia
 18	format(a10)
	read(8,19)linia
 19	format(a10)
 	read(8,20)linia
 20	format(a10)
 	read(8,*)imi,jmi
	read(8,*)ima,jma
	read(8,21)linia
 21	format(a10)
	read(8,22)linia
 22	format(a10)
	read(8,23)ubic
 23	format(a200)	
	
  
  	do i=1,10
	if (ichar(va(i)).ne.32) vari=vari+1
	enddo
	
	write(6,*)'Tenim:'
	write(6,*)'Data inici estudi ',an,'-',me,'-',di,'_',ho,':',mi
	write(6,*)'Periode estudi :',per,' segons'
	write(6,*)'Pas temporal: ',tt,' segons'
	write(6,*)'Variable :',va
	write(6,*)'Volem estudi concret de ',numniv,' nivells'
	write(6,*)'Als nivells ',(niv(i),i=1,num_niv)
	write(6,*)'Per al subdomini de ( ',imi,' ',jmi,') x ('
     &,ima,' ' ,jma,' )'
     	write(6,*)'Ubicacio arxius..',ubic
	end
	
