Skip to content

Commit

Permalink
Add netCDF attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
markusritschel committed Jul 9, 2024
1 parent 5be2281 commit 1cfea19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/oceanpack/app/models/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ def compute_equilibrator_pressure(self):
pressure_equ = df['CellPress'] - df['DPressInt'].rolling('2min').mean() # in mBar
self.ds['PressEqu'] = pressure2atm(pressure_equ) # in atm
self.ds['PressEqu'].attrs['unit'] = 'atm'
self.ds['PressEqu'].attrs['full_name'] = 'Pressure at equilibrator/membrane'
self.ds['PressEqu'].attrs['long_name'] = 'Pressure at equilibrator/membrane'

def compute_pCO2_wet_equ(self):
"""Compute pCO2 at the equilibrator in wet air."""
from oceanpack.utils.helpers import ppm2uatm
self.ds['pCO2_wet_equ'] = ppm2uatm(self.ds['CO2'], self.ds['PressEqu'])
self.ds['pCO2_wet_equ'].attrs['unit'] = 'atm'
self.ds['pCO2_wet_equ'].attrs['long_name'] = 'pCO2 at equilibrator/membrane in wet air'

def remove_non_operating_phases(self):
"""Set CO2 values in non-operating phases to NaN"""
Expand Down

0 comments on commit 1cfea19

Please sign in to comment.