[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20000823: edit duplicate observations
- Subject: 20000823: edit duplicate observations
- Date: Wed, 23 Aug 2000 16:02:07 -0600
>From: address@hidden
>Organization: UCAR/Unidata
>Keywords: 200008232131.e7NLVlN11350
>Is there any way to edit duplicate observations out of a GEMPAK ship style
>file? The only thing I can think of is to write a text file with sflist
>and edit it by hand. Since this process would be rather time consuming,
>I was wondering if there is an easier way.
>
>Donna Tucker http://chinook.phsx.ukans.edu/tucker.html
>address@hidden Department of Physics and Astronomy
>(785) 864-4738 (new area code!) University of Kansas
>(785) 864-5262 (fax) Lawrence, KS 66045-2151
>
>
Donna,
Determining a duplicate with ship style reports is somewhat unique to
the data sets. For the DCACARS and DCSYNOP decoder, I determined if the
same station ID existed at the same slat and slon for the same time, then
it was likely a duplicate. However for DCNLDN, no attempt is made to search
for duplicates since it is possible to have multiple strikes at a location/time.
The best solution I would have is to sequentially take each observation
from the old file to a new file, and check similarly to the
DCACARS/DCSYNOP method:
isdup = 0
C see if time already exists in output file
CALL SF_STIM(iflno, dattim, ier)
if(ier.eq.0) then
CALL SF_SSTN(iflno,stn,stid,stnm,slat,slon,selv,ier)
C /* station id/time already exists */
if(ier.eq.0) then
latdif = abs(slat - report_Lat)
londif = abs(slon - report_Lon)
if((latdif .lt. .0010).and.(londif .lt. .0010)) then
C /* isdup can be set to not store data already received
*/
isdup = 1
endif
endif
endif
if(isdup .eq. 0) then
CALL
SF_WSDD(iflno,dattim,stid,stnm,slat,slon,selv,state,coun,itim,
+ dataray,ier)
endif
Steve Chiswell