# coding=utf-8
"""Rewrite netCDF file"""
from earthdiagnostics.general.fix_file import FixFile
[docs]class Rewrite(FixFile):
"""
Rewrites files without doing any calculations.
Can be useful to convert units or to correct wrong metadata
:original author: Javier Vegas-Regidor<javier.vegas@bsc.es>
:created: July 2016
:param data_manager: data management object
:type data_manager: DataManager
:param startdate: startdate
:type startdate: str
:param member: member number
:type member: int
:param chunk: chunk's number
:type chunk: int
:param variable: variable's name
:type variable: str
:param domain: variable's domain
:type domain: ModelingRealm
"""
alias = 'rewrite'
"Diagnostic alias for the configuration file"
_STR_PREFIX = 'Rewrite output'
[docs] def compute(self):
"""Run the diagnostic"""
self.corrected.set_local_file(self.variable_file.local_file, self)