diff --git a/pm/process_pm.f90 b/pm/process_pm.f90 index 39a6042..eba6da6 100644 --- a/pm/process_pm.f90 +++ b/pm/process_pm.f90 @@ -5,12 +5,12 @@ program pmbufr integer, parameter :: mxmn=35, mxlv=255, maxcnt=5000, pm_limit=-15 integer :: ireadmg,ireadsb,idate,nmsg,ntb,nsubset,nlvl integer :: i,j,k,NARG,iret_hdr,iret_ob,interval - integer :: dhr,iret_hdr1,iret_ob1,cnt + integer :: dhr,iret_hdr1,iret_ob1,cnt,ios integer :: unit_table,unit_out,unit_site,unit_var,nt,pm_len - + integer(8) :: z_sid character(80):: hdstr='SID XOB YOB DHR TYP T29 SQN PROCN RPT CAT TYPO TSIG' character(80):: obstr='TPHR QCIND COPOPM' - character(8) :: subset,c_sid + character(8) :: subset,c_sid,c_sid_org character(10):: analysis_time character(20):: str,infile,outfile character(20),allocatable,dimension(:)::sta_id, lat_str, lon_str, elv_str, pm_aqi_str, pm_measured_str, pm_str @@ -100,6 +100,14 @@ program pmbufr str=adjustl(sta_id(j)) c_sid=str(2:9) + c_sid_org=c_sid + read(c_sid,'(z8)',iostat=ios) z_sid + if (ios/=0) then + c_sid="99999999" + read(c_sid,'(z8)',iostat=ios) z_sid + if (ios/=0) write (*,'(a,2a15)') 'wrong station_id ', c_sid_org,c_sid + end if + hdr(1)=rstation_id; hdr(2)=lon; hdr(3)=lat; hdr(4)=0.0_8; hdr(5)=102; hdr(10)=6 ! Single level report @@ -109,15 +117,15 @@ program pmbufr if (pm > 0.0) then obs(2,nlvl)=0.0_8 obs(3,nlvl)=pm*1e-9_8 ! "UG/M3" to KG/M3 - write(*,'(a25,i7,a12,3f10.2,f15.12)') 'goodObs: pm>0',j,c_sid,lat,lon,obs(2,nlvl),obs(3,nlvl) + write(*,'(a25,i7,3x,2a14,3f10.2,f15.12)') 'goodObs: pm>0',j,c_sid_org,c_sid,lat,lon,obs(2,nlvl),obs(3,nlvl) else if (pm > pm_limit) then obs(2,nlvl)=0.0_8 obs(3,nlvl)=0.0_8 - write(*,'(a25,i7,a12,3f10.2,f15.12)') 'limitObs: -15