Skip to content

A commandline script to generate kmz visualization of WRF output files.

Notifications You must be signed in to change notification settings

jbeezley/wrf2kmz

Repository files navigation

wrf2kmz.py Jonathan Beezley jon.beezley@gmail.com

This is a commandline script and python module that will generate Google Earth visualizations from surface variables in WRF output files. The script syntax is simply:

python wrf2kmz.py wrfout [var1 [var2 [...]]]

A file called wrf.kmz will be created containing ground overlays for all of the surface variables (var1, etc) specified on the commandline.

Quiver plots of vector data is also supported using the syntax var1:var2. (Note both variables must be surface variables.) For example, to generate a quiver plot of fire winds along with the surface heat flux:

python wrf2kmz.py wrfout FGRNHFX UF:VF

See the docstrings in the file for information on how to customize the output or to add the ability to visualize netCDF files generated by other models.

Dependencies:

simplekml      : http://code.google.com/p/simplekml/
matplotlib     : http://matplotlib.sourceforge.net/
netcdf4-python : http://code.google.com/p/netcdf4-python/

WARNING: KMZ files expect that ground overlays are unprojected, but WRF models can output on a variety of projections. There is an experimental reprojection component that is turned of by default. You can try to enable this by setting no_reprojection=True in the source. There are two methods for reprojection. The first is a custom fortran module that requires a working installation of f2py. The second is used if the fortran module cannot be compiled. It uses a call to matplotlib's griddate function and is significantly slower on large domains.

Bitdeli Badge

About

A commandline script to generate kmz visualization of WRF output files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published