file_info

Take tsv files a return a class with all the data needed for creating the netCDF files.

class ncas_amof_netcdf_template.file_info.FileInfo(instrument_name: str, data_product: str, deployment_mode: str = 'land', tag: str = 'latest', use_local_files: Optional[str] = None)[source]

Class that will gather and hold all the data to create netCDF file with

Parameters:
  • instrument_name (str) – name of the instrument

  • data_product (str) – name of data product to use

  • deployment_mode (str) – value of the ‘deployment_mode’ global attribute, and different variables may be required depending on value. One of “land”, “sea”, “air”, or “trajectory”. Default is “land”.

  • tag (str) – tagged release version of AMF_CVs, or “latest” to get most recent version. Default is “latest”.

  • use_local_files (str or None) – path to local directory where tsv files are stored. If “None”, read from online. If not “None”, “tag” must be specified. Default None.

get_common_info() None[source]

Get all the common variables, dimensions and attributes, and add to class properties

get_deployment_info() None[source]

Get all the variables, dimensions and attributes related to the deployment mode, and add to class properties

get_instrument_info() None[source]

Get all the attribute data related to a defined instrument in the ncas-data-instrument-vocabs repo, and add to class property.

get_product_info() None[source]

Get all the variables, dimensions and attributes related to the data product, and add to class properties

ncas_amof_netcdf_template.file_info.convert_instrument_dict_to_file_info(instrument_dict: dict[str, dict[str, Union[str, list[str], dict[str, dict[str, Union[str, float]]]]]], instrument_name: str, data_product: str, deployment_mode: str, tag: str) FileInfo[source]

Convert instrument_dict from tsv2dict.instrument_dict to a FileInfo class variable

Parameters:
  • instrument_dict (dict) – Dictionary made by tsv2dict.instrument_dict

  • instrument_name (str) – Name of the instrument

  • data_product (str) – Data product of data for netCDF file

  • deployment_mode (str) – Deployment mode of instrument. One of “land”, “sea”, “air”, “trajectory”

  • tag (str) – Tag release of AMF_CVs being used

Returns:

FileInfo object with all instrument data from the dictionary