Coder Social home page Coder Social logo

tcicalc's Introduction

tcicalc

Calculate useful indexes for tropical cyclones:

File descriptions:

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.

Quick Start:

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).

tcicalc's People

Contributors

liv0505 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.