Commit 5d234115 authored by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Browse files

Fix Gitlab CI configuration

parent 58437187
......@@ -24,7 +24,7 @@ test:
- git submodule update --init --recursive
- conda env update -f environment.yml -n earthdiagnostics3 python=3.7
- source activate earthdiagnostics3
- rm -r ../diagonals
- rm -r ../diagonals || exit_code=$?
- git clone https://earth.bsc.es/gitlab/es/diagonals.git ../diagonals
- pip install ../diagonals
- pip install .[develop]
......
......@@ -887,7 +887,7 @@ class Cmor3Convention(DataConvention):
versions = os.listdir(os.path.dirname(folder_path))
versions.sort(reverse=True)
self.config.cmor.version = versions[0]
fodler_path = folder_path.replace('/latest/', f'/{versions[0]}/')
folder_path = folder_path.replace('/latest/', f'/{versions[0]}/')
return folder_path
......
......@@ -6,6 +6,7 @@ import iris.analysis
import iris.exceptions
import numpy as np
from bscearth.utils.log import Log
from earthdiagnostics.diagnostic import (
Diagnostic,
......@@ -158,6 +159,7 @@ class TimeMean(Diagnostic):
def compute(self):
"""Run the diagnostic"""
temp = TempFile.get()
Log.info('Load data')
cube = iris.load_cube(self.variable_file.local_file)
time_centered = [
coord
......@@ -169,7 +171,7 @@ class TimeMean(Diagnostic):
iris.coord_categorisation.add_day_of_month(cube, "time")
iris.coord_categorisation.add_month_number(cube, "time")
iris.coord_categorisation.add_year(cube, "time")
Log.info('Compute mean')
cube = self.compute_mean(cube)
cube.remove_coord("day_of_month")
cube.remove_coord("month_number")
......@@ -179,7 +181,7 @@ class TimeMean(Diagnostic):
cube.remove_coord(region_coord)
except iris.exceptions.CoordinateNotFoundError:
region_coord = None
cube.data
iris.save(cube, temp)
if region_coord:
handler = Utils.open_cdf(temp)
......
mixdiags @ 19997970
Subproject commit 199979700e38d3918a82bd2052855d46375e48ab
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment