Calculate useful indexes for tropical cyclones:
- Potential intensity: equation(3) in Bister and Emanuel (2002) under pseudoadia-batic assumptions
- Entropy deficit: equation(2) in Tang and Emanuel(2012b).
- Ventilation index: equation(1) in Tang and Emanuel(2012b).
- Genesis potential index 2004: Emanuel and Nolan 2004
- Genesis potential index 2010: equation(1) in Emanuel 2010
1. pcmin.f90 is a collection of five subroutines written in FORTRAN 90 by Prof. Emanuel. It computes the maximum wind speed and minimum central pressure achievable in tropical cyclones. See Prof. Emanuel's original fortran version.
- The first four subroutines (
pcmin3, pcmin3_kflag, pcmin2 and pcmin
) could all be used to calculate the potential intensity of a tropical cyclone. The detailed description of PI could be found here. - The fifth subroutine calculates
CAPE
, which will be used in other four subroutines in this f90 file. - To call pcmin.f90 subroutines in python, we need to build a python module by
numpy.f2py
. See F2PY Users Guide for details.
2. calculator.py is the main python script that calls necessary modules from other *.py
files to calculate TC indexes using data from ERA5_Data folder and save the results to TC_example folder. Detailed description could be found in this code.
3. get_figure.py is the python script that plot the results and save the figures to TC_example folder.
Step 1. Compile FORTRAN 90 file:
Enter the following code into your terminal:
f2py -c pcmin.f90 -m tcpi
And you will get a tcpi*.so file
, (e.g. tcpi.cpython-37m-darwin.so
), which could be called in python.
Step 2. Run calculator.py:
First, modify the year and directory names in calculator.py, i.e. year
, datadir
and outdir
in main().
Enter the following code into your terminal:
python /...(rootpath).../calculator.py
You will find the results in the outdir
you just set (my sample results are in TC_example folder).
Step 3. Run get_figure.py:
First, modify the year and directory name in get_figure.py, i.e. year
and outdir
in main().
Enter the following code into your terminal:
python /...(rootpath).../get_figure.py
The figures could be found in the outdir
you just set (my sample results are in TC_example folder).