or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

calculation-functions.mddata-io.mdindex.mdinterpolation.mdphysical-constants.mdplotting.mdxarray-integration.md

calculation-functions.mddocs/

0

# Meteorological Calculations

1

2

MetPy provides over 150 calculation functions covering all aspects of atmospheric science including thermodynamics, dynamic meteorology, and kinematics. All functions handle units properly through Pint integration and work seamlessly with numpy arrays, xarray DataArrays, and scalar values.

3

4

## Capabilities

5

6

### Thermodynamic Functions

7

8

Temperature, moisture, and energy calculations fundamental to atmospheric thermodynamics.

9

10

```python { .api }

11

def potential_temperature(pressure, temperature):

12

"""

13

Calculate potential temperature.

14

15

Parameters:

16

- pressure: atmospheric pressure

17

- temperature: air temperature

18

19

Returns:

20

Potential temperature

21

"""

22

23

def equivalent_potential_temperature(pressure, temperature, dewpoint):

24

"""

25

Calculate equivalent potential temperature.

26

27

Parameters:

28

- pressure: atmospheric pressure

29

- temperature: air temperature

30

- dewpoint: dewpoint temperature

31

32

Returns:

33

Equivalent potential temperature

34

"""

35

36

def virtual_temperature(temperature, mixing_ratio, molecular_weight_ratio=epsilon):

37

"""

38

Calculate virtual temperature.

39

40

Parameters:

41

- temperature: air temperature

42

- mixing_ratio: water vapor mixing ratio

43

- molecular_weight_ratio: ratio of molecular weights (optional)

44

45

Returns:

46

Virtual temperature

47

"""

48

49

def wet_bulb_temperature(pressure, temperature, dewpoint):

50

"""

51

Calculate wet bulb temperature.

52

53

Parameters:

54

- pressure: atmospheric pressure

55

- temperature: air temperature

56

- dewpoint: dewpoint temperature

57

58

Returns:

59

Wet bulb temperature

60

"""

61

62

def heat_index(temperature, relative_humidity, mask_undefined=True):

63

"""

64

Calculate heat index from temperature and relative humidity.

65

66

Parameters:

67

- temperature: air temperature

68

- relative_humidity: relative humidity (0-100%)

69

- mask_undefined: whether to mask undefined values

70

71

Returns:

72

Heat index

73

"""

74

75

def apparent_temperature(temperature, relative_humidity, wind_speed):

76

"""

77

Calculate apparent temperature (Australian formula).

78

79

Parameters:

80

- temperature: air temperature

81

- relative_humidity: relative humidity

82

- wind_speed: wind speed

83

84

Returns:

85

Apparent temperature

86

"""

87

```

88

89

### Moisture Calculations

90

91

Water vapor and humidity calculations for atmospheric moisture analysis.

92

93

```python { .api }

94

def mixing_ratio(partial_press, total_press, molecular_weight_ratio=epsilon):

95

"""

96

Calculate water vapor mixing ratio.

97

98

Parameters:

99

- partial_press: water vapor partial pressure

100

- total_press: total atmospheric pressure

101

- molecular_weight_ratio: ratio of molecular weights

102

103

Returns:

104

Mixing ratio (dimensionless)

105

"""

106

107

def saturation_mixing_ratio(total_press, temperature):

108

"""

109

Calculate saturation mixing ratio.

110

111

Parameters:

112

- total_press: total atmospheric pressure

113

- temperature: air temperature

114

115

Returns:

116

Saturation mixing ratio

117

"""

118

119

def relative_humidity_from_mixing_ratio(mixing_ratio, temperature, pressure):

120

"""

121

Calculate relative humidity from mixing ratio.

122

123

Parameters:

124

- mixing_ratio: water vapor mixing ratio

125

- temperature: air temperature

126

- pressure: atmospheric pressure

127

128

Returns:

129

Relative humidity (0-1)

130

"""

131

132

def relative_humidity_from_dewpoint(temperature, dewpoint, *, phase='liquid'):

133

"""

134

Calculate relative humidity from dewpoint.

135

136

Parameters:

137

- temperature: air temperature

138

- dewpoint: dewpoint temperature

139

- phase: thermodynamic phase ('liquid' or 'ice')

140

141

Returns:

142

Relative humidity (0-1)

143

"""

144

145

def dewpoint_from_relative_humidity(temperature, relative_humidity):

146

"""

147

Calculate dewpoint from relative humidity.

148

149

Parameters:

150

- temperature: air temperature

151

- relative_humidity: relative humidity (0-1)

152

153

Returns:

154

Dewpoint temperature

155

"""

156

157

def vapor_pressure(pressure, mixing_ratio):

158

"""

159

Calculate water vapor pressure from mixing ratio.

160

161

Parameters:

162

- pressure: total atmospheric pressure

163

- mixing_ratio: water vapor mixing ratio

164

165

Returns:

166

Water vapor pressure

167

"""

168

169

def saturation_vapor_pressure(temperature):

170

"""

171

Calculate saturation vapor pressure.

172

173

Parameters:

174

- temperature: air temperature

175

176

Returns:

177

Saturation vapor pressure

178

"""

179

180

def specific_humidity_from_mixing_ratio(mixing_ratio):

181

"""

182

Calculate specific humidity from mixing ratio.

183

184

Parameters:

185

- mixing_ratio: water vapor mixing ratio

186

187

Returns:

188

Specific humidity (dimensionless)

189

"""

190

191

def mixing_ratio_from_specific_humidity(specific_humidity):

192

"""

193

Calculate mixing ratio from specific humidity.

194

195

Parameters:

196

- specific_humidity: water vapor specific humidity

197

198

Returns:

199

Mixing ratio (dimensionless)

200

"""

201

202

def specific_humidity_from_dewpoint(pressure, dewpoint, phase='liquid'):

203

"""

204

Calculate specific humidity from dewpoint and pressure.

205

206

Parameters:

207

- pressure: atmospheric pressure

208

- dewpoint: dewpoint temperature

209

- phase: thermodynamic phase ('liquid' or 'ice')

210

211

Returns:

212

Specific humidity

213

"""

214

215

def precipitable_water(pressure, dewpoint, bottom=None, top=None):

216

"""

217

Calculate precipitable water through atmospheric column.

218

219

Parameters:

220

- pressure: pressure profile

221

- dewpoint: dewpoint temperature profile

222

- bottom: bottom pressure level (optional)

223

- top: top pressure level (optional)

224

225

Returns:

226

Precipitable water amount

227

"""

228

```

229

230

### Pressure and Altitude

231

232

Atmospheric pressure and height relationship calculations.

233

234

```python { .api }

235

def height_to_pressure_std(height):

236

"""

237

Convert height to pressure using standard atmosphere.

238

239

Parameters:

240

- height: height above sea level

241

242

Returns:

243

Atmospheric pressure

244

"""

245

246

def pressure_to_height_std(pressure):

247

"""

248

Convert pressure to height using standard atmosphere.

249

250

Parameters:

251

- pressure: atmospheric pressure

252

253

Returns:

254

Height above sea level

255

"""

256

257

def altimeter_to_station_pressure(altimeter_value, height, temperature):

258

"""

259

Convert altimeter setting to station pressure.

260

261

Parameters:

262

- altimeter_value: altimeter setting

263

- height: station elevation

264

- temperature: station temperature

265

266

Returns:

267

Station pressure

268

"""

269

270

def station_to_altimeter_pressure(station_pressure, height, temperature):

271

"""

272

Convert station pressure to altimeter setting.

273

274

Parameters:

275

- station_pressure: station pressure

276

- height: station elevation

277

- temperature: station temperature

278

279

Returns:

280

Altimeter setting

281

"""

282

283

def geopotential_to_height(geopotential):

284

"""

285

Convert geopotential to geometric height.

286

287

Parameters:

288

- geopotential: geopotential

289

290

Returns:

291

Geometric height

292

"""

293

```

294

295

### Atmospheric Stability

296

297

Stability indices and parcel theory calculations.

298

299

```python { .api }

300

def lifted_index(pressure, temperature, parcel_profile):

301

"""

302

Calculate lifted index.

303

304

Parameters:

305

- pressure: atmospheric pressure profile

306

- temperature: environmental temperature profile

307

- parcel_profile: parcel temperature profile

308

309

Returns:

310

Lifted index

311

"""

312

313

def cape_cin(pressure, temperature, dewpoint, parcel_profile, which_lfc='bottom', which_el='top'):

314

"""

315

Calculate CAPE and CIN (Convective Available Potential Energy and Convective Inhibition).

316

317

Parameters:

318

- pressure: pressure profile

319

- temperature: temperature profile

320

- dewpoint: dewpoint profile

321

- parcel_profile: parcel temperature profile

322

- which_lfc: which LFC to use when multiple exist

323

- which_el: which EL to use when multiple exist

324

325

Returns:

326

Tuple of (CAPE, CIN) values

327

"""

328

329

def convective_inhibition(pressure, temperature, dewpoint, parcel_profile):

330

"""

331

Calculate CIN (Convective Inhibition).

332

333

Parameters:

334

- pressure: pressure profile

335

- temperature: temperature profile

336

- dewpoint: dewpoint profile

337

- parcel_profile: parcel temperature profile

338

339

Returns:

340

CIN value

341

"""

342

343

def surface_based_cape_cin(pressure, temperature, dewpoint):

344

"""

345

Calculate surface-based CAPE and CIN.

346

347

Parameters:

348

- pressure: atmospheric pressure profile (high to low pressure)

349

- temperature: environmental temperature profile

350

- dewpoint: dewpoint temperature profile

351

352

Returns:

353

Tuple of (CAPE, CIN) values for surface-based parcel

354

"""

355

356

def most_unstable_cape_cin(pressure, temperature, dewpoint, **kwargs):

357

"""

358

Calculate most unstable CAPE and CIN.

359

360

Parameters:

361

- pressure: atmospheric pressure profile

362

- temperature: environmental temperature profile

363

- dewpoint: dewpoint temperature profile

364

- **kwargs: keyword arguments for parcel selection

365

366

Returns:

367

Tuple of (CAPE, CIN) values for most unstable parcel

368

"""

369

370

def mixed_layer_cape_cin(pressure, temperature, dewpoint, **kwargs):

371

"""

372

Calculate mixed-layer CAPE and CIN.

373

374

Parameters:

375

- pressure: atmospheric pressure profile

376

- temperature: environmental temperature profile

377

- dewpoint: dewpoint temperature profile

378

- **kwargs: keyword arguments for mixed layer (e.g., depth)

379

380

Returns:

381

Tuple of (CAPE, CIN) values for mixed-layer parcel

382

"""

383

384

def downdraft_cape(pressure, temperature, dewpoint):

385

"""

386

Calculate Downdraft CAPE (DCAPE).

387

388

Parameters:

389

- pressure: atmospheric pressure profile

390

- temperature: environmental temperature profile

391

- dewpoint: dewpoint temperature profile

392

393

Returns:

394

Downdraft CAPE value (negative buoyancy energy)

395

"""

396

397

def level_of_free_convection(pressure, temperature, dewpoint, parcel_temperature_profile=None):

398

"""

399

Calculate Level of Free Convection (LFC).

400

401

Parameters:

402

- pressure: pressure profile

403

- temperature: environmental temperature

404

- dewpoint: dewpoint temperature

405

- parcel_temperature_profile: parcel temperature profile

406

407

Returns:

408

LFC pressure and temperature

409

"""

410

411

def lcl(pressure, temperature, dewpoint, max_iters=50, eps=1e-5):

412

"""

413

Calculate Lifting Condensation Level (LCL).

414

415

Parameters:

416

- pressure: starting pressure

417

- temperature: starting temperature

418

- dewpoint: starting dewpoint

419

- max_iters: maximum iterations

420

- eps: convergence criterion

421

422

Returns:

423

LCL pressure and temperature

424

"""

425

426

def parcel_profile(pressure, temperature, dewpoint):

427

"""

428

Calculate parcel temperature profile.

429

430

Parameters:

431

- pressure: pressure levels

432

- temperature: starting temperature

433

- dewpoint: starting dewpoint

434

435

Returns:

436

Parcel temperature at each pressure level

437

"""

438

439

def mixed_parcel(pressure, temperature, dewpoint, parcel_start_pressure=None, height=None, bottom=None, depth=None):

440

"""

441

Calculate mixed parcel properties.

442

443

Parameters:

444

- pressure: pressure profile

445

- temperature: temperature profile

446

- dewpoint: dewpoint profile

447

- parcel_start_pressure: starting pressure for parcel

448

- height: height profile

449

- bottom: bottom of mixed layer

450

- depth: depth of mixed layer

451

452

Returns:

453

Mixed parcel pressure, temperature, dewpoint

454

"""

455

456

def el(pressure, temperature, dewpoint, parcel_temperature_profile=None, which='top'):

457

"""

458

Calculate the equilibrium level (EL).

459

460

Parameters:

461

- pressure: atmospheric pressure profile (high to low pressure)

462

- temperature: environmental temperature at pressure levels

463

- dewpoint: dewpoint temperature at pressure levels

464

- parcel_temperature_profile: parcel temperature profile (optional)

465

- which: which EL to return when multiple exist ('top', 'bottom')

466

467

Returns:

468

EL pressure and temperature

469

"""

470

471

def ccl(pressure, temperature, dewpoint, height=None, mixed_layer_depth=None, which='top'):

472

"""

473

Calculate the Convective Condensation Level (CCL).

474

475

Parameters:

476

- pressure: atmospheric pressure profile (high to low pressure)

477

- temperature: environmental temperature at pressure levels

478

- dewpoint: dewpoint temperature at pressure levels

479

- height: height profile (optional)

480

- mixed_layer_depth: depth of mixed layer for averaging (optional)

481

- which: which CCL to return when multiple exist ('top', 'bottom')

482

483

Returns:

484

CCL pressure and temperature

485

"""

486

487

def most_unstable_parcel(pressure, temperature, dewpoint, height=None, bottom=None, depth=None):

488

"""

489

Calculate the most unstable parcel in a layer.

490

491

Parameters:

492

- pressure: atmospheric pressure profile

493

- temperature: environmental temperature profile

494

- dewpoint: dewpoint temperature profile

495

- height: height profile (optional)

496

- bottom: bottom of layer to search (optional)

497

- depth: depth of layer to search (optional)

498

499

Returns:

500

Most unstable parcel pressure, temperature, dewpoint

501

"""

502

```

503

504

### Additional Stability Indices

505

506

Classical stability indices for severe weather forecasting and convective analysis.

507

508

```python { .api }

509

def k_index(pressure, temperature, dewpoint, vertical_dim=0):

510

"""

511

Calculate K Index stability index.

512

513

Parameters:

514

- pressure: atmospheric pressure profile

515

- temperature: environmental temperature profile

516

- dewpoint: dewpoint temperature profile

517

- vertical_dim: vertical dimension index

518

519

Returns:

520

K Index value

521

"""

522

523

def showalter_index(pressure, temperature, dewpoint):

524

"""

525

Calculate Showalter Index.

526

527

Parameters:

528

- pressure: atmospheric pressure profile

529

- temperature: environmental temperature profile

530

- dewpoint: dewpoint temperature profile

531

532

Returns:

533

Showalter Index value

534

"""

535

536

def total_totals_index(pressure, temperature, dewpoint, vertical_dim=0):

537

"""

538

Calculate Total Totals Index.

539

540

Parameters:

541

- pressure: atmospheric pressure profile

542

- temperature: environmental temperature profile

543

- dewpoint: dewpoint temperature profile

544

- vertical_dim: vertical dimension index

545

546

Returns:

547

Total Totals Index value

548

"""

549

550

def vertical_totals(pressure, temperature, vertical_dim=0):

551

"""

552

Calculate Vertical Totals Index.

553

554

Parameters:

555

- pressure: atmospheric pressure profile

556

- temperature: environmental temperature profile

557

- vertical_dim: vertical dimension index

558

559

Returns:

560

Vertical Totals value

561

"""

562

563

def cross_totals(pressure, temperature, dewpoint, vertical_dim=0):

564

"""

565

Calculate Cross Totals Index.

566

567

Parameters:

568

- pressure: atmospheric pressure profile

569

- temperature: environmental temperature profile

570

- dewpoint: dewpoint temperature profile

571

- vertical_dim: vertical dimension index

572

573

Returns:

574

Cross Totals value

575

"""

576

577

def sweat_index(pressure, temperature, dewpoint, speed, direction, vertical_dim=0):

578

"""

579

Calculate SWEAT (Severe Weather Threat) Index.

580

581

Parameters:

582

- pressure: atmospheric pressure profile

583

- temperature: environmental temperature profile

584

- dewpoint: dewpoint temperature profile

585

- speed: wind speed profile

586

- direction: wind direction profile

587

- vertical_dim: vertical dimension index

588

589

Returns:

590

SWEAT Index value

591

"""

592

```

593

594

### Dynamic Meteorology

595

596

Wind analysis, vorticity, and atmospheric dynamics calculations.

597

598

```python { .api }

599

def wind_direction(u, v, convention='from'):

600

"""

601

Calculate wind direction from u and v components.

602

603

Parameters:

604

- u: u-component of wind

605

- v: v-component of wind

606

- convention: 'from' or 'to' direction convention

607

608

Returns:

609

Wind direction in degrees

610

"""

611

612

def wind_speed(u, v):

613

"""

614

Calculate wind speed from u and v components.

615

616

Parameters:

617

- u: u-component of wind

618

- v: v-component of wind

619

620

Returns:

621

Wind speed

622

"""

623

624

def wind_components(speed, direction):

625

"""

626

Calculate u and v wind components from speed and direction.

627

628

Parameters:

629

- speed: wind speed

630

- direction: wind direction

631

632

Returns:

633

u and v components

634

"""

635

636

def geostrophic_wind(geopotential, f=None, dx=None, dy=None):

637

"""

638

Calculate geostrophic wind from geopotential field.

639

640

Parameters:

641

- geopotential: geopotential field

642

- f: coriolis parameter

643

- dx: grid spacing in x direction

644

- dy: grid spacing in y direction

645

646

Returns:

647

u and v components of geostrophic wind

648

"""

649

650

def ageostrophic_wind(geopotential, u, v, dx=None, dy=None, f=None):

651

"""

652

Calculate ageostrophic wind.

653

654

Parameters:

655

- geopotential: geopotential field

656

- u: u-component of observed wind

657

- v: v-component of observed wind

658

- dx: grid spacing in x direction

659

- dy: grid spacing in y direction

660

- f: coriolis parameter

661

662

Returns:

663

u and v components of ageostrophic wind

664

"""

665

666

def vorticity(u, v, dx=None, dy=None, dim_order='yx'):

667

"""

668

Calculate relative vorticity.

669

670

Parameters:

671

- u: u-component of wind

672

- v: v-component of wind

673

- dx: grid spacing in x direction

674

- dy: grid spacing in y direction

675

- dim_order: dimension order

676

677

Returns:

678

Relative vorticity

679

"""

680

681

def absolute_vorticity(u, v, dx=None, dy=None, y_dim=-2, latitude=None, dim_order='yx'):

682

"""

683

Calculate absolute vorticity.

684

685

Parameters:

686

- u: u-component of wind

687

- v: v-component of wind

688

- dx: grid spacing in x direction

689

- dy: grid spacing in y direction

690

- y_dim: y dimension index

691

- latitude: latitude values

692

- dim_order: dimension order

693

694

Returns:

695

Absolute vorticity

696

"""

697

698

def advection(scalar, u, v, dx=None, dy=None, dim_order='yx'):

699

"""

700

Calculate advection of a scalar field.

701

702

Parameters:

703

- scalar: scalar field to advect

704

- u: u-component of wind

705

- v: v-component of wind

706

- dx: grid spacing in x direction

707

- dy: grid spacing in y direction

708

- dim_order: dimension order

709

710

Returns:

711

Advection of scalar field

712

"""

713

714

def q_vector(geopotential, temperature, pressure, u, v):

715

"""

716

Calculate Q-vectors.

717

718

Parameters:

719

- geopotential: geopotential field

720

- temperature: temperature field

721

- pressure: pressure level

722

- u: u-component of wind

723

- v: v-component of wind

724

725

Returns:

726

Q-vector components

727

"""

728

729

def frontogenesis(potential_temperature, u, v, dx=None, dy=None, dim_order='yx'):

730

"""

731

Calculate frontogenesis.

732

733

Parameters:

734

- potential_temperature: potential temperature field

735

- u: u-component of wind

736

- v: v-component of wind

737

- dx: grid spacing in x direction

738

- dy: grid spacing in y direction

739

- dim_order: dimension order

740

741

Returns:

742

Frontogenesis

743

"""

744

745

def divergence(u, v, dx=None, dy=None, x_dim=-1, y_dim=-2, parallel_scale=None, meridional_scale=None):

746

"""

747

Calculate horizontal divergence of wind field.

748

749

Parameters:

750

- u: u-component of wind

751

- v: v-component of wind

752

- dx: grid spacing in x direction

753

- dy: grid spacing in y direction

754

- x_dim: x dimension index

755

- y_dim: y dimension index

756

- parallel_scale: parallel scale factor

757

- meridional_scale: meridional scale factor

758

759

Returns:

760

Horizontal divergence

761

"""

762

763

def shearing_deformation(u, v, dx=None, dy=None, x_dim=-1, y_dim=-2, parallel_scale=None, meridional_scale=None):

764

"""

765

Calculate shearing deformation of wind field.

766

767

Parameters:

768

- u: u-component of wind

769

- v: v-component of wind

770

- dx: grid spacing in x direction

771

- dy: grid spacing in y direction

772

- x_dim: x dimension index

773

- y_dim: y dimension index

774

- parallel_scale: parallel scale factor

775

- meridional_scale: meridional scale factor

776

777

Returns:

778

Shearing deformation

779

"""

780

781

def stretching_deformation(u, v, dx=None, dy=None, x_dim=-1, y_dim=-2, parallel_scale=None, meridional_scale=None):

782

"""

783

Calculate stretching deformation of wind field.

784

785

Parameters:

786

- u: u-component of wind

787

- v: v-component of wind

788

- dx: grid spacing in x direction

789

- dy: grid spacing in y direction

790

- x_dim: x dimension index

791

- y_dim: y dimension index

792

- parallel_scale: parallel scale factor

793

- meridional_scale: meridional scale factor

794

795

Returns:

796

Stretching deformation

797

"""

798

799

def total_deformation(u, v, dx=None, dy=None, x_dim=-1, y_dim=-2, parallel_scale=None, meridional_scale=None):

800

"""

801

Calculate total deformation of wind field.

802

803

Parameters:

804

- u: u-component of wind

805

- v: v-component of wind

806

- dx: grid spacing in x direction

807

- dy: grid spacing in y direction

808

- x_dim: x dimension index

809

- y_dim: y dimension index

810

- parallel_scale: parallel scale factor

811

- meridional_scale: meridional scale factor

812

813

Returns:

814

Total deformation magnitude

815

"""

816

```

817

818

### Severe Weather Indices

819

820

Specialized calculations for severe weather forecasting.

821

822

```python { .api }

823

def bulk_shear(pressure, u, v, height=None, bottom=None, depth=None):

824

"""

825

Calculate bulk wind shear.

826

827

Parameters:

828

- pressure: pressure profile

829

- u: u-component of wind profile

830

- v: v-component of wind profile

831

- height: height profile

832

- bottom: bottom of layer

833

- depth: depth of layer

834

835

Returns:

836

Bulk shear magnitude and components

837

"""

838

839

def storm_relative_helicity(u, v, height, depth, bottom=None, storm_u=None, storm_v=None):

840

"""

841

Calculate storm-relative helicity.

842

843

Parameters:

844

- u: u-component of wind

845

- v: v-component of wind

846

- height: height levels

847

- depth: integration depth

848

- bottom: bottom of integration layer

849

- storm_u: storm motion u-component

850

- storm_v: storm motion v-component

851

852

Returns:

853

Storm-relative helicity

854

"""

855

856

def supercell_composite_parameter(mucape, effective_shear, effective_srh):

857

"""

858

Calculate Supercell Composite Parameter.

859

860

Parameters:

861

- mucape: most unstable CAPE

862

- effective_shear: effective bulk shear

863

- effective_srh: effective storm-relative helicity

864

865

Returns:

866

Supercell composite parameter

867

"""

868

869

def significant_tornado_parameter(sbcape, surface_based_lcl_height, bulk_shear_0to6, surface_based_srh_0to1km):

870

"""

871

Calculate Significant Tornado Parameter.

872

873

Parameters:

874

- sbcape: surface-based CAPE

875

- surface_based_lcl_height: surface-based LCL height

876

- bulk_shear_0to6: 0-6 km bulk shear

877

- surface_based_srh_0to1km: 0-1 km storm-relative helicity

878

879

Returns:

880

Significant tornado parameter

881

"""

882

```

883

884

## Exception Classes

885

886

```python { .api }

887

class InvalidSoundingError(ValueError):

888

"""Raised when sounding data is invalid or insufficient."""

889

890

class DataDimensionalityError(ValueError):

891

"""Raised when data has incorrect dimensionality for calculation."""

892

```