Copies point data from one dataset to another.
PTCOPY sdataset ddataset [keywords]
PTCOPY copies records from the source point data file to the destination point data file. Use the SELECT keyword to define a subset of records to copy. If you don't specify SELECT, all records in the source file are copied.
If you use the range format for the SELECT keyword and bval is less than eval, all values between and including bval and eval are selected. For example, if you specify SELECT='LON -177 177', the longitude values -177, -176, . . , 176, 177 are selected. If bval is greater than eval, all values greater than bval or less than eval, including bval and eval, are selected. For example, if you specify SELECT='LON 177 -177', the longitude values 177, 178, 179, 180, -179, -178 and -177 are selected. This feature also allows you to select only wind directions from northwest to northeast with SELECT='DIR 315 45'.
If you specify the DROW keyword, the values of the row header parameters (for example, DAY, TIME and TYPE in ISFC schema MD files) are checked. If the values of the copied data's row header parameters are the same as the values in the destination row, the data is added to the row. Otherwise, the destination row's data is overwritten with the new data. If DROW is not specified, the data is copied to the rows following the last row containing data in the destination file.
If you specify DEL=YES or a position number of a nonexistent point data file in the ddataset parameter, the records are copied into a newly created MD file; change the title with the TITLE keyword.
When using the SELECT keyword, you can specify the following units:
When using point/MD files with CYD (ccyyddd) date units (e.g., FO14, IRAB, ISEN, ISFC, ISHP, PIRP and SYN schema MD files created with McIDAS-XCD 7.5 and later), commands PTCON, PTCOPY, PTDISP and PTLIST default to the current year if you don't specify a four-digit year and the nearest century if you specify only the last two digits of the year. For example, if the file uses CYD units for the DAY parameter and its value is 2004260, then you can specify the DAY in the SELECT keyword as 2004260 or 04260. If the current year is 2004, you can also specify it as 260. Use the PTLIST command with FORM=PARAM to list the file's parameters and units.
The PTCON, PTCOPY, PTDISP and PTLIST commands continue to work with point/MD files using the old SYD (ssyyddd) date units (e.g., FO14, IRAB, ISEN, ISFC, ISHP, PIRP and SYN schema MD files created with versions of McIDAS-XCD prior to 7.5), with the following exception: If you want to specify DAY in the SELECT keyword and the ss portion of the MD file's DAY value is nonzero, then you must specify the units with DAY in the SELECT keyword. For example, if the MD file uses SYD units for DAY and its value is 7197240, then it must appear as SELECT='DAY[SYD] 7197240'. If the MD file uses SYD units for DAY but has a zero (blank) ss value, you don't have to specify the units in the SELECT keyword. For example, if the MD file uses SYD units for DAY and its value is 97240 then it can appear as either SELECT='DAY 97240' or SELECT='DAY[SYD] 97240'.
PTCOPY RAOB/MANDATORY LOCAL/PT.1 DEL=YES
This entry copies the entire contents of the most recent point file in dataset RAOB/MANDATORY to position 1 of dataset LOCAL/PT. The DEL=YES keyword deletes the existing destination point file and creates a new one with the same title as the source file. Because point files may be very large, copying an entire point file may take a long time. Use the SELECT keyword to copy only the data you need, as shown in the following examples.
PTCOPY SURFACE/ISFC.5 LOCAL/PT.2 SELECT='CO US,CN ; TIME 0 2 ; TYPE 0' DEL=YES TITLE='15 May 96 US and Canada Sfc Data'
This entry copies the 00 through 02 UTC surface hourly (type 0) data for all stations in the United States and Canada in position 5 of dataset SURFACE/ISFC to position 2 of dataset LOCAL/PT. The DEL=YES and TITLE keywords delete the existing destination point file and create a new one with the title 15 May 96 US and Canada Sfc Data. Because each hour's data in ISFC schema point files is assigned to a separate row, the 00 UTC data is copied to row 1, the 01 UTC data is copied to row 2, and the 02 UTC data is copied to row 3 in the new destination file.
PTCOPY SURFACE/ISFC.5 LOCAL/PT.2 SELECT='CO US,CN ; TIME 6,12 ; TYPE 0' DROW=2
If this entry follows the previous example, it replaces the destination point file's 01 UTC data in row 2 with 06 UTC data, and replaces the 02 UTC data in row 3 with 12 UTC data.
PTCOPY SURFACE/ISFC.5 LOCAL/PT.2 SELECT='CO US,CN ; TIME 18 ; TYPE 0' TITLE='15 May 96 0,6,12,18 UTC Sfc Data'
If this entry follows the previous two examples, it copies the 18 UTC data to row 4 of the destination point file (position 2 of dataset LOCAL/PT) and changes its title to 15 May 96 0,6,12,18 UTC Sfc Data. The data is placed in row 4 because without DROW being specified, the data is copied to the row after the last row containing data. The destination point file now has the 00, 06, 12 and 18 UTC data in rows 1, 2, 3 and 4.