Calculate the Meteorological Data

The calculation operators of ¡®+¡¯, ¡®-¡®, ¡®*¡¯ and ¡®/¡¯ are supported for grid or station data analysis. Also some math functions in ¡®DataMath¡¯ class could be used to do data calculation. The current functions are listed bellow. The ¡®MeteoInfoC.Data¡¯ name space should be added which includes ¡®DataMath¡¯ class.

l         Abs

l         Acos

l         Asin

l         Atan

l         Cos

l         Sin

l         Tan

l         Exp

l         Pow

l         Sqrt

l         Log

l         Log10

l         Magnitude

l         Cdiff

l         Hcurl

l         Hdivg

 

Example:

. . .

#Import the classes from ¡®MeteoInfoC.Data¡¯ name space

from MeteoInfoC.Data import *

. . .

#Get U/V components grid data

UGridData = myApp.GetGridData("U")

VGridData = myApp.GetGridData("V")

#Calculate wind speed from U/V components

Speed = DataMath.Magnitude(U, V)

#Or

Speed = DataMath.Sqrt(U * U + V * V)

#Plot wind speed as shaded layer

myApp.SetDrawType("shaded")

myApp.Display(Speed)


Copyright 2009-2011 Yaqiang Wang. All rights reserved.