program create_readmeteo implicit none include "netcdf.inc" !------------------------------------------------------------------------! ! create_readmeteo generates the file 'readmeteo.def' ! ! ... must be run prior to readmeteo ! ! ... the user will be asked a few questions ! ! ! ! A. Spiga - 01/08/2007 ! !------------------------------------------------------------------------! INTEGER, PARAMETER :: MONTHS_PER_YEAR = 12 INTEGER, PARAMETER :: mday(MONTHS_PER_YEAR) & = (/61,66,66,65,60,54,50,46,47,47,51,56/) INTEGER :: start_day,init,i,month,day INTEGER :: ierr,nid,nvarid INTEGER :: n,start,my,interval_subs,subs INTEGER :: start_hour,interval,hour,inc_hour INTEGER :: no_please INTEGER :: timedim,timelen REAL, DIMENSION(100) :: param REAL, DIMENSION(:), ALLOCATABLE :: time ! ! Init ! interval = 0 ! ! Open input NETCDF file ! write(*,*) "Scanning netcdf file ..." ierr=NF_OPEN ("input_diagfi.nc",NF_NOWRITE,nid) IF (ierr.NE.NF_NOERR) THEN write(*,*)'**** Please create a symbolic link called input_diagfi.nc' CALL ABORT ENDIF ierr=NF_INQ_DIMID(nid,"Time",timedim) IF (ierr .NE. NF_NOERR) THEN ierr=NF_INQ_DIMID(nid,"time",timedim) ENDIF ierr=NF_INQ_DIMLEN(nid,timedim,timelen) ! ! Get starting time ! ALLOCATE(time(timelen)) ierr = NF_INQ_VARID (nid, "Time",nvarid) IF (ierr .NE. NF_NOERR) THEN ierr = NF_INQ_VARID (nid, "time",nvarid) IF (ierr .NE. NF_NOERR) THEN PRINT *, "Error: Readmeteo