This page demonstrates Python tips and tricks that I use in my everyday programming as an atmospheric science graduate student.
-Brian Blaylock

Friday, April 8, 2016

Python: WRF convert data on a staggered grid to mass point.

WRF output data has variables on a staggered grid (edges of grid boxes) and variables at a mass point (center of grid box). Sometimes it's necessary to convert the variables on a staggered grid to the mass points so you can plot U and V winds on the same latitude. Here are simple functions to convert the U and V variables on a staggered grid to the mass point grid.

https://github.com/blaylockbk/Ute_WRF/blob/master/functions/stagger_to_mass.py

Below is an explanation of how the function works...








No comments:

Post a Comment

Note: Only a member of this blog may post a comment.