c subroutine getinp include "tiegcm_p7.h" namelist/input/ wrmss, rdmss, + imx,jmx,kmx,zst,zsb,nflds_proc, + isdyn,istimes,isflx,version,issech logical exists c call clearstr(wrmss) call clearstr(rdmss) read(5,input) if (lenstr(wrmss).le.0) then c write(6,"('>>> must have mss volume to write (wrmss)')") c stop 'wrmss' write(6,"('NO mss volume to write -- new disk file will', + 'be written, but not disposed to mss')") endif if (lenstr(rdmss).le.0) then write(6,"('>>> must have mss volume to read (rdmss)')") stop 'rdmss' endif if (kmx.ne.kmxp1-1) then write(6,"('>>> This code for tiegcm only: kmx must be ', + ' = ',i2)") kmxp1-1 stop 'kmx' endif c lrdmss = lenstr(rdmss) lwrmss = lenstr(wrmss) write(6,"(/72('-'))") write(6,"('Inputs for tiegcm_p7:')") write(6,"('Source volume to read: ',a)") rdmss(1:lrdmss) if (lwrmss.gt.0) then write(6,"('Source volume to write: ',a)") wrmss(1:lwrmss) else write(6,"('NO new volume will be written to mss')") endif write(6,"(72('-')/)") c c Get file to read from mss and open. Also open new wrfile: c write(6,"('Getting mss file ',a)") rdmss(1:lrdmss) call getmss(rdmss,lurd) inquire(file='wrfile',exist=exists) if (exists) then write(6,"('Removing existing wrfile')") istat = unlink('wrfile') endif open(luwr,file='wrfile',status='NEW',form='UNFORMATTED', + err=901) write(6,"('Opened rdfile with unit ',i2)") lurd write(6,"('Opened wrfile with unit ',i2)") luwr return 900 continue write(6,"('>>> Error opening rdfile')") stop 'rdfile' 901 continue write(6,"('>>> Error opening wrfile')") stop 'wrfile' end