pletzer / mint

MINT - Mimetic Interpolation on the sphere
BSD Zero Clause License
8 stars 4 forks source link

Iris-flux computation #112

Open pletzer opened 1 year ago

pletzer commented 1 year ago

Given a target line specified as a set of (lon, lat) points, compute the lateral flux across the line.

In file: iris_flux.py

Write a class that implements

flux_calc = IrisMintFlux(src_mesh, src_flags, tgt_line)
value = flux_calc.evaluate(field_cube)

Here: src_mesh: Iris mesh object src_flags: flags to pass to the constructor, eg (1,1,1) for cubed-sphere tgt_line: array of points [(x0,y0), (x1, y1), ...] where x0, y0 ... are longitude-latitude pairs field_cube: field cube

pletzer commented 1 year ago

Question:

What should we do for 3d field? MINT currently only integrates on the horizontal plane, essentially performing a line integral instead of a surface integral. In principle one would need to multiply the contributions from line segments inside each cell by dz, the height in metre of the cell, which can vary from cell to cell.

pletzer commented 1 year ago

Also need a method

def flux_calc.evaluate_from_vector(u_cube, v_cube)