Skip to content

Calculating in-air gain when there is DOXY variable in traj file without PPOX_DOXY #29

Description

@cgrdn

The traj files (currently BRtraj, but the B- and R- files are being updated/merged in version 3.2, will create a separate issue for handling that) contain the in-air data recorded by an oxygen optode. In some cases they have the variable PPOX_DOXY, or partial pressure of oxygen. This is great and easy to work with because it is the same unit as the calculation using NCEP reference data, so the gain calculation is straightforward.

In other cases though, there is no PPOX_DOXY variable, just a DOXY variable. I assume this is still an in-air measurement since it is in the BRtraj file, but the unit of DOXY is umol kg-1 (std. name moles_of_oxygen_per_unit_mass_in_sea_water). So, my current solution is to convert this to partial pressure, by first converting to mmol L-1, then to partial pressure using the translated SCOR WG 142 code. BUT, converting "in-air" "per seawater" oxygen doesn't really make sense? For going from umol kg-1, you have to multiply by density, and so you have to provide a temperature, T, salinity, S, and pressure, P. I can provide temperature with the variable TEMP_DOXY, and for now I am setting S=0 and P=0, but I'm not sure that really makes sense.

To properly understand this unit, I think I would need to know how the DAC went from phase (C2PHASE_DOXY) to DOXY for the in-air data in order to match their assumptions when calculating density. Plan moving forward will be to look at BRtraj files that have both, and see if I can match the conversion of DOXY to PPOX_DOXY.

@richardsc do you make anything of this? Or could you take a quick read just to see if my train of thought seems right? Thanks.

Messy block of code for the situation I am describing:

if 'PPOX_DOXY' in BRtraj_nc.variables.keys():
    floatData['PPOX_DOXY']  = BRtraj_nc.variables['PPOX_DOXY'][:].data.flatten()
elif 'DOXY' in BRtraj_nc.variables.keys():
    # unit conversion from umol kg-1 to pO2, some shaky S and P assumptions?
    floatData['PPOX_DOXY'] = unit.doxy_to_pO2(unit.umol_per_sw_to_mmol_per_L(
        BRtraj_nc.variables['DOXY'][:].data.flatten(),
        0, # salinity is 0 in air???
        BRtraj_nc.variables['TEMP_DOXY'][:].data.flatten(),
        0 # pressure is 0 in air???
    ), 0, BRtraj_nc.variables['TEMP_DOXY'][:].data.flatten())

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions