compass.landice.tests.ismip7_forcing.fracture.remap_utils.open_rename_and_trim

compass.landice.tests.ismip7_forcing.fracture.remap_utils.open_rename_and_trim(remapped_file, rename_vars, start_year, end_year)[source]

Open a remapped file, rename dimensions/variables to MALI conventions, and restrict to the requested year range.

Parameters:
  • remapped_file (str) – Data remapped onto the MALI mesh

  • rename_vars (dict) – Mapping of source variable names to MALI variable names

  • start_year (int) – First year (inclusive) to retain

  • end_year (int) – Last year (inclusive) to retain

Returns:

  • ds (xarray.Dataset) – The renamed and trimmed dataset

  • years (numpy.ndarray) – The integer years retained