1. Create a station in a format : 9000 FORMAT(I4,3X,I2,1X,A8,1x,F8.2,1x,F8.2,1x,F8.1) 1950 1 QQQ 14.73 -17.50 5.00 1950 1 RRR 14.77 -17.48 11.0 1950 2 QQQ 15.13 -16.88 20.0 1950 2 RRR 14.17 -16.85 31.0 2. Use the program to create data set : rewrite.f 3. Use the fortran program to write the data in binary grads : stat2grads.f c++++++++++++++++++++++++++++++++ program stn character*8 stid OPEN (8,file='clim1.txt',form='formatted') OPEN(10,file='clim1.stn',FORM='UNFORMATTED', & access='sequential') IFLAG = 0 C Read and Write 10 READ (8,9000,END=90)IYEAR,IMONTH,STID,RLAT,RLON,RVAL write(*,9000)IYEAR,IMONTH,STID,RLAT,RLON,RVAL 9000 FORMAT(I4,3X,I2,1X,A3,1x,F8.2,1x,F8.2,1x,F8.1) IF (IFLAG.EQ.0) THEN IFLAG = 1 IYROLD =IYEAR IMNOLD = IMONTH ENDIF C If new time group, write time group terminator. C Assuming no empty time groups. IF(IYROLD.NE.IYEAR.OR.IMNOLD.NE.IMONTH) THEN NLEV = 0 WRITE (10)STID,RLAT,RLON,TIM,NLEV,NFLAG WRITE (*,*)STID,RLAT,RLON,TIM,NLEV,NFLAG ENDIF IYROLD = IYEAR IMNOLD =IMONTH C C Write this report C TIM = 0.0 NLEV = 1 NFLAG = 1 WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG WRITE (*,*) STID,RLAT,RLON,TIM,NLEV,NFLAG WRITE (10) RVAL GO TO 10 C C On end of file write last time group terminator. C 90 CONTINUE NLEV = 0 WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG WRITE (*,*) STID,RLAT,RLON,TIM,NLEV,NFLAG STOP END C++++++++++++++++++++++++++++++++++ 4. Create a ctl file : *++++++++++++++++++++++++++++ dset stat75_83.stn options sequential dtype station stnmap stat75_83.map undef -999.0 title rain tdef 3 linear AUG975 1mo vars 1 p 0 99 rainfall endvars *++++++++++++++++++ even though the station map has not been created one must put it. 5. CREATES TH ESTATION DATA : Type on grads prompt where are the ctl and bin files : stnmap -i station_data.ctl 6. CREATES A SCRIPT FILE : 'reinit' 'set display color white' 'c' 'open /beluga/data/ousmane/data/pcp/test.ctl' 'open stat75_83.ctl' 'open 'set mpdset hires' 'set lon -18 0' 'set lat 10 24' 'set t 1' 'd oacres(pcp,p.2,12,8,5,4,3,2,1)' *+++++++++++++++++++++++ Where test.ctl is a high gridded data ie NEWS rainfall with grid as fine as possible. This grid haven't to as levels either in Y (ydef) or in X (xdef). ===== " Que la paix soit sur vous " "Peace Be upon You" Ousmane NDIAYE NDIAYE, Ousmane National Meteorological Service Actually visiting IRI, Po-Box : 8625 aéroport L.S.S address : 61 Route 9W, Dakar SENEGAL Palisades, NY 10964 USA tel (Desk) :8695050 (X4030) Home Phone 1-845-353-2714 ousmanen@yahoo.com __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/