diff --git a/VERSION b/VERSION index 36e483b9bacf72c32a85cf4b5776664796565a67..2ea482c2b4b9d71cc91fa06f5a1c8c9fb373c1fb 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -3.0.0b49 +3.0.0b50 diff --git a/doc/source/conf.py b/doc/source/conf.py index 5d7802d79b29258f96438d320b734e6fa5822b2f..4734cc4a185bd23c32a1243fcce014034af323f7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -64,7 +64,7 @@ copyright = u'2016, BSC-CNS Earth Sciences Department' # The short X.Y version. version = '3.0b' # The full version, including alpha/beta/rc tags. -release = '3.0.0b49' +release = '3.0.0b50' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/earthdiagnostics/EarthDiagnostics.pdf b/earthdiagnostics/EarthDiagnostics.pdf index dc5c298bf25b273e73c94819f3bf6cc9564415c2..adda909f7f366adc6de17baf81e04b60908b6053 100644 Binary files a/earthdiagnostics/EarthDiagnostics.pdf and b/earthdiagnostics/EarthDiagnostics.pdf differ diff --git a/earthdiagnostics/cmormanager.py b/earthdiagnostics/cmormanager.py index 5d6892af494f22755e9d765143617e4c164c96f6..13913fc8ffc9714a64f2445050f72d7e72198dc0 100644 --- a/earthdiagnostics/cmormanager.py +++ b/earthdiagnostics/cmormanager.py @@ -158,8 +158,8 @@ class CMORManager(DataManager): else: grid = '' - file_name = '{0}_{1}_{2}_{3}_S{4}-{5}{6}{7}'.format(var, cmor_table.name, self.experiment.experiment_name, - self.experiment.model, startdate, + file_name = '{0}_{1}_{2}_{3}_S{4}-{5}{6}{7}'.format(var, cmor_table.name, self.experiment.model, + self.experiment.experiment_name, startdate, self._get_member_str(member), grid, time_bound) else: raise Exception('Data convention {0} not supported'.format(self.config.data_convention)) @@ -534,5 +534,12 @@ class CMORManager(DataManager): self.experiment.model, self.experiment.experiment_name, 'S' + startdate) def _get_member_str(self, member): - return 'r{0}i1p1'.format(member + 1 - self.experiment.member_count_start) + if self.config.data_convention == 'specs': + template = 'r{0}i1p1' + elif self.config.data_convention in ('primavera', 'cmip6'): + template = 'r{0}i1p1f1' + else: + raise Exception('Data convention {0} not supported'.format(self.config.data_convention)) + + return template.format(member + 1 - self.experiment.member_count_start) diff --git a/earthdiagnostics/earthdiags.py b/earthdiagnostics/earthdiags.py index 2fb423fba227f0a8e6cfffb4a020c2845c3ec085..5474f9b2215f119e25faf9c26b48627a8397004b 100755 --- a/earthdiagnostics/earthdiags.py +++ b/earthdiagnostics/earthdiags.py @@ -448,7 +448,10 @@ class EarthDiags(object): return if os.path.lexists(destiny): - os.remove(destiny) + try: + os.remove(destiny) + except OSError: + pass os.symlink(source, destiny) Log.info('File {0} ready', destiny) diff --git a/earthdiagnostics/general/simplify_dimensions.py b/earthdiagnostics/general/simplify_dimensions.py index 5323f0039d6a29d0543e1603f20a1a81e363c8cb..aeb76e4330403f916f2d29eff1e54bca1b35940b 100644 --- a/earthdiagnostics/general/simplify_dimensions.py +++ b/earthdiagnostics/general/simplify_dimensions.py @@ -108,8 +108,9 @@ class SimplifyDimensions(Diagnostic): self._create_var('lon', lon_values, handler, new_file) self._create_var('lat', lat_values, handler, new_file) handler.close() + new_file.close() - self.send_file(variable_file, self.domain, self.variable, self.startdate, self.member, self.chunk, + self.send_file(temp, self.domain, self.variable, self.startdate, self.member, self.chunk, grid=self.grid) def _create_var(self, var_name, var_values, source, destiny):