Potential Intensity for Typhoon#

Before proceeding with all the steps, first import some necessary libraries and packages

import xarray as xr
import cartopy.crs as ccrs
import easyclimate as ecl

Now open the sample dataset

Tip

You can download following datasets here:

ds = xr.open_dataset('tcpi_sample_data.nc')
ds
<xarray.Dataset> Size: 337kB
Dimensions:  (level: 31, lat: 25, lon: 24)
Coordinates:
  * level    (level) float64 248B 1e+03 975.0 950.0 925.0 ... 30.0 20.0 10.0
  * lat      (lat) float64 200B -30.0 -27.5 -25.0 -22.5 ... 22.5 25.0 27.5 30.0
  * lon      (lon) float64 192B 120.0 122.5 125.0 127.5 ... 172.5 175.0 177.5
    month    float64 8B ...
Data variables:
    lsm      (lat, lon) float64 5kB ...
    sst      (lat, lon) float64 5kB ...
    msl      (lat, lon) float64 5kB ...
    t        (level, lat, lon) float64 149kB ...
    q        (level, lat, lon) float64 149kB ...
    Vmax     (lat, lon) float64 5kB ...
    To       (lat, lon) float64 5kB ...
    Pmin     (lat, lon) float64 5kB ...
    LNB      (lat, lon) float64 5kB ...
    PI_flag  (lat, lon) float64 5kB ...


And then we use easyclimate.field.typhoon.calc_potential_intensity_Bister_Emanuel_2002 to calculate relative variables about potential intensity for typhoon

pi_result = ecl.field.typhoon.calc_potential_intensity_Bister_Emanuel_2002(
    sst_data = ds.sst,
    sst_data_units = 'degC',
    surface_pressure_data = ds.msl,
    surface_pressure_data_units = 'hPa',
    temperature_data = ds.t,
    temperature_data_units = 'degC',
    specific_humidity_data = ds.q,
    specific_humidity_data_units = 'g/kg',
    vertical_dim = 'level',
    vertical_dim_units = 'hPa'
)
pi_result
<xarray.Dataset> Size: 53kB
Dimensions:  (lat: 25, lon: 24)
Coordinates:
  * lat      (lat) float64 200B -30.0 -27.5 -25.0 -22.5 ... 22.5 25.0 27.5 30.0
  * lon      (lon) float64 192B 120.0 122.5 125.0 127.5 ... 172.5 175.0 177.5
    month    float64 8B 7.0
Data variables:
    vmax     (lat, lon) float64 5kB nan nan nan nan ... 65.87 68.51 65.77 63.86
    pmin     (lat, lon) float64 5kB nan nan nan nan ... 957.8 953.6 958.9 962.5
    ifl      (lat, lon) int64 5kB 0 0 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 1 1
    t0       (lat, lon) float64 5kB nan nan nan nan ... 205.4 205.5 205.8 205.9
    otl      (lat, lon) float64 5kB nan nan nan nan ... 131.6 130.0 133.5 136.0
    eff      (lat, lon) float64 5kB nan nan nan nan ... 0.4601 0.4566 0.4543
    diseq    (lat, lon) float64 5kB nan nan nan ... 1.053e+04 9.973e+03
    lnpi     (lat, lon) float64 5kB nan nan nan nan ... 8.375 8.454 8.372 8.313
    lneff    (lat, lon) float64 5kB nan nan nan nan ... -0.7763 -0.7841 -0.789
    lndiseq  (lat, lon) float64 5kB nan nan nan nan ... 9.257 9.336 9.262 9.208
    lnCKCD   (lat, lon) float64 5kB -0.1054 -0.1054 -0.1054 ... -0.1054 -0.1054


Potential Intensity (PI, \(V_{max}\))#

fig, ax = ecl.plot.quick_draw_spatial_basemap(central_longitude = 200)
pi_result.vmax.plot.contourf(
    ax = ax,
    cbar_kwargs = {'location': 'bottom'},
    transform = ccrs.PlateCarree(),
    levels = 21
)
ax.set_title('PI ($V_{max}$)', size = 18)
PI ($V_{max}$)
Text(0.5, 1.0, 'PI ($V_{max}$)')

Outflow Temperature (\(T_0\))#

fig, ax = ecl.plot.quick_draw_spatial_basemap(central_longitude = 200)
pi_result.t0.plot.contourf(
    ax = ax,
    cbar_kwargs = {'location': 'bottom'},
    transform = ccrs.PlateCarree(),
    levels = 21
)
ax.set_title('Outflow Temperature ($T_0$)', size = 18)
Outflow Temperature ($T_0$)
Text(0.5, 1.0, 'Outflow Temperature ($T_0$)')

Outflow Temperature Level (OTL)#

fig, ax = ecl.plot.quick_draw_spatial_basemap(central_longitude = 200)
pi_result.otl.plot.contourf(
    ax = ax,
    cbar_kwargs = {'location': 'bottom'},
    transform = ccrs.PlateCarree(),
    vmax = 1050,
    levels =21
)
ax.set_title('Outflow Temperature Level (OTL)', size = 18)
Outflow Temperature Level (OTL)
Text(0.5, 1.0, 'Outflow Temperature Level (OTL)')

TC Efficiency (\(\frac{T_{s} - T_{0}}{T_{0}}\))#

fig, ax = ecl.plot.quick_draw_spatial_basemap(central_longitude = 200)
pi_result.eff.plot.contourf(
    ax = ax,
    cbar_kwargs = {'location': 'bottom'},
    transform = ccrs.PlateCarree(),
    levels = 21
)
ax.set_title('TC Efficiency $\\left(\\frac{T_{s} - T_{0}}{T_{0}}\\right)$', size = 18)
TC Efficiency $\left(\frac{T_{s} - T_{0}}{T_{0}}\right)$
Text(0.5, 1.0258451865594727, 'TC Efficiency $\\left(\\frac{T_{s} - T_{0}}{T_{0}}\\right)$')

Disequlibrium (\(h_0^* - h^*\))#

fig, ax = ecl.plot.quick_draw_spatial_basemap(central_longitude = 200)
pi_result.diseq.plot.contourf(
    ax = ax,
    cbar_kwargs = {'location': 'bottom'},
    transform = ccrs.PlateCarree(),
    vmin = 0,
    vmax = 20000,
    levels = 21
)
ax.set_title('Disequlibrium ($h_0^* - h^*$)', size = 18)
Disequlibrium ($h_0^* - h^*$)
Text(0.5, 1.0041228612657185, 'Disequlibrium ($h_0^* - h^*$)')

Total running time of the script: (0 minutes 10.649 seconds)