polaris.ocean.conservation.compute_total_salt
- polaris.ocean.conservation.compute_total_salt(ds_mesh, ds)[source]
Compute the total mass of salt in an ocean model output file using a constant density
Salinity is assumed to be in g/kg (i.e. grams of salt per kilogram of seawater), so the volume integral of
layerThickness * salinityis converted to a salt mass withrho_sw / 1000.- Parameters:
ds_mesh (xarray.Dataset) – The mesh dataset, containing
areaCellds (xarray.Dataset) – The dataset containing
salinityand a layer thickness
- Returns:
total_salt (float) – The total mass of salt in kg over the whole domain