Working with Vector Data


Vector weather elements, such as Wind, are treated as two numerical arrays, one representing magnitude and one representing direction. For example:

    def calcWind(self, wind_FHAG10):
        # The Wind Vector consists of two numerical array grids, one for magnitude and one for direction
        mag = wind_FHAG10[0]  # get the wind magnitude grid
        dir = wind_FHAG10[1]  # get wind direction grid

 A Vector Cube consists of two sub-cubes, one for magnitude and one for direction. For example:

   def calcFreeWind(self,  gh_c,  wind_c,  topo):
        # The Vector Cube, wind_c, consists of two sub-cubes, one for magnitude and one for direction
        magnitudeCube = wind_c[0]
        directionCube = wind_c[1]