MVLib - Short Writeup - Version 4.0
Example Number 28 - Access and plot dewetra database
This simple example shows how to retrieve data from MuSEO dewetra database. What you have to do is ONLY to call the routine hourlyrain that allows to retrieve all the rain gauge measuremets for the selected hour, day, month and year (variables ora, giorno, mese and anno of fortran code). The vector pi will contain, as output, the rain gauges measurements available for the selected time step; the vectors lat and lon will contains, as output, the corresponding latitudes and longitudes, the integer output variable n provides the number of available rain gauges measurements.
The fortran code is available here and the complete script running the code is available here.
Previous Example List of Examples Next Example
MVLib Home Page
	parameter (nmes=4000,nplot=3) ; real p(nmes),lat(nmes),lon(nmes)
	integer ora,giorno,mese,anno ; character data*60,str*60,title*60
	real slo(nplot),elo(nplot),sla(nplot),ela(nplot)
	data slo(1),elo(1),sla(1),ela(1) /07.8,13.3,43.5,46.0/
	data slo(2),elo(2),sla(2),ela(2) /11.5,14.5,41.2,43.6/
	data slo(3),elo(3),sla(3),ela(3) /13.5,17.5,38.2,42.6/
	ora=8 ; giorno=16 ; mese=12 ; anno=2011 
	call hourlyrain(ora,giorno,mese,anno,p,lat,lon,n)
	call datafromhour (ora,giorno,mese,anno,data)
	title='Precipitation (mm) - '//data(1:lenstr(data))
	do iplot=1,nplot
	   slon=slo(iplot) ; elon=elo(iplot) ; slat=sla(iplot) ; elat=ela(iplot)
	   call atlante (slon,elon,slat,elat,1,1,1,0,0)
c	   call gstxci(36)
	   do i=1,n 
	      write (str,'(f6.1)') p(i) ; call noinspace(str)
	      call wtstr(lon(i),lat(i),str(1:lenstr(str)),10,0,0)
	   enddo
	   call displayexample('example28',title,
	2	'CETEMPS - Integrated rain gauges database')
	enddo
	end