/hurricane_tools

Some calculation routines used in my tropical cyclone research.

Primary LanguagePython

hurricane_tools


Some calculation routines used in my tropical cyclone research.
For example:

  • calculate axisymmetric wind field
  • transform data from cartesian to polar coordinate
  • interpolate data from model eta vertical level to pressure level
  • find radaius of maximum wind
  • calculate intertial stability
  • fourier decomposition
  • ...etc

Environment and dependencies

I only test it in Linux environment.
This package depends on the following packages:

  • numpy
  • scipy
  • matplotlib
  • pandas
  • netCDF4
  • requests

Installation

It can be download by

$ git clone https://github.com/CYehLu/hurricane_tools.git

then install it by pip

$ pip install -e ./hurricane_tools

Compile Fortran files

Some functions will use Fortran subroutines defined in hurricane_tools/fortran/. The functions that will use Fortran subroutines are listed below:

  • hurricane_tools.coord_transform.XY2RT(..., intp='fortran')
  • hurricane_tools.coord_transform.RT2XY(..., intp='fortran')
  • hurricane_tools.coord_transform.Interpz3d
  • hurricane_tools.getvar.GetVar
  • Any function with argument intp='fortran' or the global variable hurricane_tools.config.INTERP_OPTION = 'fortran'

It is necessary to compile Fortran files before using these functions.
It can be compiled by the following steps:

$ cd hurricane_tools/hurricane_tools/fortran
$ make

It will generate 7 *.so files if the compilation is successful. Note that I only test it with gfortran compiler.

Documents

See the list of module and the corresponding functions and classes here.

The document of each module: