act.io.create_ds_from_arm_dod

act.io.create_ds_from_arm_dod(proc, set_dims, version='', fill_value=-9999.0, scalar_fill_dim=None, local_file=False)[source]

Queries the ARM DOD api and builds a dataset based on the ARM DOD and the dimension sizes that are passed in.

Parameters:
  • proc (string) – Process to create the dataset off of. This is normally in the format of inst.level. i.e. vdis.b1 or kazrge.a1. If local file is true, this points to the path of the .dod file.

  • set_dims (dict) – Dictionary of dims from the DOD and the corresponding sizes. Time is required. Code will try and pull from DOD, unless set through this variable Note: names need to match exactly what is in the dod i.e. {‘drop_diameter’: 50, ‘time’: 1440}

  • version (string) – Version number of the ingest to use. If not set, defaults to latest version

  • fill_value (float) – Fill value for non-dimension variables. Dimensions cannot have duplicate values and are incrementally set (0, 1, 2)

  • scalar_fill_dim (str) – Depending on how the dataset is set up, sometimes the scalar values are dimensioned to the main dimension. i.e. a lat/lon is set to have a dimension of time. This is a way to set it up similarly.

  • local_file (bool) – If true, the DOD will be loaded from a file whose name is proc. If false, the DOD will be pulled from PCM.

Returns:

ds (xarray.Dataset) – ACT Xarray dataset populated with all variables and attributes.

Examples

dims = {'time': 1440, 'drop_diameter': 50}
ds = act.io.arm.create_ds_from_arm_dod(
    'vdis.b1', dims, version='1.2', scalar_fill_dim='time')