# # QSUB -eo -q reg -lT 55 -s /bin/csh cd $TMPDIR # cat << "ENDCAT" >! tsrc.f program getslp c*** c*** driver for access routine to 5-degree lat/lon sea level pressure grids c*** common/a/ntape,nstate,ifm(1),iyr,imo,ida,ihr,ilv,itype,isrc,igrid, *pole,num,slp(72,15) c c*** c*** common block a is used to link with calling program c*** ntape - lun supplied in calling routine c*** nstate - status of read operation c*** ifm - format number c*** iyr - year of grid, e.g. 1901 c*** imo - month of grid c*** ida - day of grid c*** ihr - hour c*** ilv - level c*** itype - type c*** isrc - source c*** igrid - grid c*** pole - north pole value c*** num - for monthly grids, number of days in mean c*** slp - array of sea level pressures (0=missing) c*** c c*** set ntape .eq. logical unit number on volume or assign card ntape=1 c 10 continue c*** read record and unpack id parameters call rdslp if(nstate.eq.1.or.nstate.eq.3) go to 1000 if(nstate.eq.0) go to 15 c c*** handle parity (nstate.ne.0) c 15 continue nrec=nrec+1 c*** select grids here c c*** for monthly means c if(iyr.ne.llrec*21+1899) go to 10 c llrec=llrec+1 c if(llrec.gt.4) stop c 20 continue c*** unpack sea level pressure grid call upslp c c*** process grid c print 100,ifm,iyr,imo,ida,ihr,ilv,itype,isrc,igrid, pole,num 100 format(1h0,4x,6hformat,6x,4hyear,5x,5hmonth,7x,3hday,6x,4hhour,5x, *5hlevel,6x,4htype,4x,6hsource,6x,4hgrid,6x,4hpole,5x, **numer of grids in mean*,/, *1x,9i10,f10.1,i10) print 101,(i,i=15,85,5) 101 format(1h0,5x,15(i7,*n*)) do 500 i=1,72 lon=(i-1)*5 print 150,lon,(slp(i,j),j=1,15) 150 format(2x,i3,*e*,15f8.1) 500 continue go to 10 1000 continue c*** nstate=1 for eof , nstate=3 for eot c end "ENDCAT" # msread -fch slp /DSS/SLP cat slp >> tsrc.f # cft77 -e h tsrc.f segldr tsrc.o -L /lib,/usr/lib,/usr/local/lib -l ncarm,ncaro,mss # msread indata /DSS/xxxxxx assign -a indata fort.1 # ja a.out ja -cst