[Met_help] Additional Info
John Halley Gotway
johnhg at ucar.edu
Tue May 18 13:31:55 MDT 2010
Bob,
FYI, I actually just went ahead and updated the version of the "mode_summary.R" analysis script to include the computation of the X/Y centroid offsets:
http://www.dtcenter.org/met/users/downloads/analysis_scripts.php
John
John Halley Gotway wrote:
> Bob,
>
> Good news. I've got something for you to try. I've attached an R-script to this email. I took it from the sample MODE R-script on the MET site:
> http://www.dtcenter.org/met/users/downloads/analysis_scripts.php
>
> But I modified it to include the computation you're after - centroid x,y offsets.
>
> Here's how you can run it:
> Rscript mode_summary.R [mode_file_list]
>
> Where mode_file_list is one or more MODE output files to process. Listed below is what the output looks like when I ran it on the one MODE output file you sent me. Hopefully, the output is pretty
> self-explanatory. The lines for "Cluster Pair Centroid X-Offsets" and "Cluster Pair Centroid Y-Offsets" give you summary info (min, 25th perc, median, mean, 75th perc, and max) about the offsets. At
> the end I'm dumping out the centroid (x, y) offset for each pair of cluster objects (fcst centroid - obs centroid). You can easily comment out this line if it's too much info.
>
> Now, I'm not sure how well this R-script will scale. It may run slowly on a whole lot of data. Give it a shot and let me know how it goes.
>
> Thanks,
> John
>
>
> [johnhg at billiken]% Rscript mode_summary.R mode_TCDC_EATM_vs_CSDLF_EATM_000000L_20100312_000000V_000000A_obj.txt
> Read 42 lines from MODE file: mode_TCDC_EATM_vs_CSDLF_EATM_000000L_20100312_000000V_000000A_obj.txt
> Total Number of Files Processed = 1
> Total Number of Single Objects = 18
> Number of Single Fcst Objects = 7
> Number of Matched Single Fcst Objects = 6
> Number of Unmatched Single Fcst Objects = 1
> Number of Single Obs Objects = 11
> Number of Matched Single Obs Objects = 6
> Number of Unmatched Single Obs Objects = 5
> Total Number of Cluster Objects = 12
> Total Number of Fcst Cluster Objects = 6
> Total Number of Obs Cluster Objects = 6
> Total Area of Objects = 13064
> Area of Single Fcst Objects = 6704
> Area of Matched Single Fcst Objects = 6344
> Area of Unmatched Single Fcst Objects = 360
> Area of Single Obs Objects = 6360
> Area of Matched Single Obs Objects = 5878
> Area of Unmatched Single Obs Objects = 482
> Median of Max Interest by Fcst Object = 0.9045
> Median of Max Interest by Obs Object = 0.9045
> Median of Max Interest by Fcst+Obs Objects = 0.9045
> Cluster Pair Centroid X-Offsets:
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> -8.7410 -4.4120 0.1646 -1.9120 0.9729 1.6330
> Cluster Pair Centroid Y-Offsets:
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> -7.8910 -4.0280 -1.5140 -2.6010 -0.1621 -0.1100
> Cluster Pair Centroid X,Y Offsets [6]:
> (0.4142, -0.1100)
> (1.6331, -0.3100)
> (-0.0851, -2.7186)
> (1.1591, -7.8915)
> (-8.7413, -0.1128)
> (-5.8544, -4.4643)
>
>
> John Halley Gotway wrote:
>> Bob,
>>
>> It'll take some hunting around to find it. I'm busy the rest of the morning but will take a look this afternoon.
>>
>> John
>>
>> Craig, Robert J Civ USAF AFWA 16 WS/WXN wrote:
>>> We do have R but don't use it much. If you send me the script, I can convert it to IDL which I use all the time.
>>>
>>> Thanks
>>>
>>> Bob
>>>
>>> -----Original Message-----
>>> From: John Halley Gotway [mailto:johnhg at ucar.edu]
>>> Sent: Tuesday, May 18, 2010 9:43 AM
>>> To: Craig, Robert J Civ USAF AFWA 16 WS/WXN
>>> Cc: met_help
>>> Subject: Re: [Met_help] Additional Info
>>>
>>> Bob,
>>>
>>> The information is in the MODE output file, but the MODE-Analysis tool does not currently have the functionality to extract it. MODE-Analysis will currently only give you the distance between the
>>> centroids, not the X and Y-offsets of those centroids. We designed MODE-Analysis to be a pretty simple, file filtering tool. It reads and processes one MODE output line at a time. The type of
>>> analysis we're talking about would require a different type of design. It would need to read back and forth between the single cluster lines and the pair cluster lines.
>>>
>>> I have used an Rscript in the past to extract this type of information. Do you guys by any chance have R (http://www.r-project.org) available on your system?
>>>
>>> John
>>>
>>> Craig, Robert J Civ USAF AFWA 16 WS/WXN wrote:
>>>> Thanks John. What I was hoping to do was generate a scatter plot of position differences with cloud objects. If mode match a fcst and cloud object, what was the difference in their centroid position. Are you saying that won't be possible to determine?
>>>>
>>>> Bob
>>>>
>>>> -----Original Message-----
>>>> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
>>>> Sent: Monday, May 17, 2010 4:53 PM
>>>> To: Craig, Robert J Civ USAF AFWA 16 WS/WXN
>>>> Cc: met_help at ucar.edu
>>>> Subject: Re: [Met_help] Additional Info
>>>>
>>>> Bob,
>>>>
>>>> I ran the following job on the file you sent and got the following output:
>>>>
>>>> mode_analysis -lookin
>>>> mode_TCDC_EATM_vs_CSDLF_EATM_000000L_20100312_000000V_000000A_obj.txt
>>>> -cluster -pair -summary -column CENTROID_DIST
>>>>
>>>> Total mode lines read = 42
>>>> Total mode lines kept = 6
>>>>
>>>> Field N Min Max Mean StdDev P10 P25 P50
>>>> P75 P90 Sum
>>>> ------------- - ---- ---- ---- ------ ---- ---- ----
>>>> ---- ---- -----
>>>> centroid_dist 6 0.43 8.74 4.82 3.30 1.05 1.93 5.04
>>>> 7.82 8.36 28.89
>>>>
>>>> It found 6 matched pairs of clusters and dumped out info about their
>>>> centroid distances. Your confusion is coming from using "CENTROID_X" and
>>>> "CENTROID_Y". The X,Y location of a centroid is an attribute of a
>>>> "SINGLE" object. Those CENTROID_X/_Y columns contain NA's in the "PAIR"
>>>> lines, and in this job we're looking at those pair lines. That's why
>>>> you're seeing 0's in the output.
>>>>
>>>> Try running the following two jobs:
>>>>
>>>> mode_analysis -lookin
>>>> mode_TCDC_EATM_vs_CSDLF_EATM_000000L_20100312_000000V_000000A_obj.txt
>>>> -cluster -single -fcst -summary -column CENTROID_X -column CENTROID_Y
>>>>
>>>> mode_analysis -lookin
>>>> mode_TCDC_EATM_vs_CSDLF_EATM_000000L_20100312_000000V_000000A_obj.txt
>>>> -cluster -single -obs -summary -column CENTROID_X -column CENTROID_Y
>>>>
>>>> That'll give you information about the single/fcst/cluster and
>>>> single/obs/cluster X/Y centroids. But there is not currently any way in
>>>> the MODE analysis tool to extract X and Y offsets directly.
>>>>
>>>> Certain MODE attributes are applicable to SINGLE objects and other are
>>>> applicable to PAIRS of objects. For example, CENTROID_X/_Y only apply to
>>>> SINGLE objects and CENTROID_DIST only applies to PAIRS of objects.
>>>>
>>>> Hope this helps clarify.
>>>>
>>>> John
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> John, I did try removing the -fcst flag after I sent you the command list,
>>>>> but that still returned a zero size file.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Bob
>>>>> _______________________________________________
>>>>> Met_help mailing list
>>>>> Met_help at mailman.ucar.edu
>>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>>>>>
>> _______________________________________________
>> Met_help mailing list
>> Met_help at mailman.ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/met_help
More information about the Met_help
mailing list