MVLib - Short Writeup - Version 4.0 Example Number 27 - Access and plot dewetra database |
This simple example shows how to retrieve data from MuSEO dewetra database.
The call to routine museoanagrafica allows to retrieve information
about the selected record (variable irec of fortran code), the
call to routine museotimeseries allows to retrieve the whole
time series for the selected record and selected year (variable year of
fortran code). i1 and i2 contain the values of the first
and last vector component for the selected month to be plotted
(variable month of fortran code). The loop between i1 and
i2 allows to select all the components containing valid data,
the special value -9999 means that data is not available for such time step.
Please note: to access the data you have only to invoke museoanagrafica and museotimeseries routines, the rest of the fortran code reported below is written to produce the plots. The list of the records of MuSEO dewetra database is available here. The fortran code is available here and the complete script running the code is available here. |
|||||||
| ||||||||
real x(366*24*4),y(366*24*4),x1(366*24*4),y1(366*24*4) character com*50,sens*50,str*60,title*128,latlon*60 integer month,year month=11 ; year=2010 i1=index15m(00,00,1,month,year) i2=index15m(45,23,monthlen(month,year),month,year) call monthofyear(month,year,str) do irec=571,575,2 call museoanagrafica('dewrain',irec,com,sens,xlat,xlon) call museotimeseries('dewrain',irec,year,x1,y1,n1) n=0 ; dx=1./(4*24) do i=i1,i2 if (nint(y1(i)).ne.-9999.and.nint(y1(i)).ne.-10) then n=n+1 x(n)=(i-i1)*dx ; y(n)=y1(i) endif enddo call plottailmese(x,y,366*24*4,1,n,sens(1:lenstr(sens))) call latlon2str(xlat,xlon,latlon) write (title,'(a,i4,a,i4)')'MuSEO dewetra data base, Rec. N.',irec, 2 ' - '//latlon(1:lenstr(latlon))//', year ',year call displayexample('example27',com(1:lenstr(com))//' - '//str,title) enddo end |