Resource files

The resources module facilitates inclusion of data files that serve as examples or simplify the code required to implement some QC functions. Resource files are accessed using resource_path(). Resource files that can be accessed include:

'BINARY_VMS.DAT', 'BINARY_VMS.json'`

A VMS export containing two ascents of a float in binary VMS format. This file is used to test medsrtqc.vms.read_vms_profiles(). The .json version is a human-readable dump of the .DAT file.

'OUTPUT_RT.DAT', 'OUTPUT_RT.json'

A QC-applied version of 'BINARY_VMS.DAT'. The .json version is a human-readable dump of the .DAT file.

'BR6904117_085.nc', 'R6904117_085.nc'

A core and BGC Argo NetCDF file for use testing BGC variables.

medsrtqc.resources.resource_path(path)

Calculate the absolute path to a resource file or raise FileNotFoundError if the file does not exist.

Parameters:

path – The relative path to the data file within the resources module.

>>> from medsrtqc.resources import resource_path
>>> resource_path('BINARY_VMS.DAT')