polaris.tasks.ocean.analysis.sim_files.check_month_covered

polaris.tasks.ocean.analysis.sim_files.check_month_covered(filename, year, month)[source]

Check that a monthly mean covers the month the analysis takes it to

The month a file covers is worked out from its name, using Omega’s convention of naming a monthly mean for the start of the following month (see expand_template()). Nothing else would notice if that convention changed, and every climatology and series would then be off by a month, so each file’s time bounds are checked against it.

Parameters:
  • filename (str) – The path to the monthly mean

  • year (int) – The simulation year the file is taken to cover

  • month (int) – The month the file is taken to cover

Raises:

ValueError – If the file has no time bounds or they are not that month