Skip to content

Commit

Permalink
Use ESMValCore v2.10.0 release candidates (#3404)
Browse files Browse the repository at this point in the history
Co-authored-by: Valeriu Predoi <[email protected]>
  • Loading branch information
Klaus Zimmermann and valeriupredoi authored Nov 2, 2023
1 parent 2fe223c commit 72174d3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
push:
branches:
- main
- fix_recipe_filler_bkwds_incompatibility
schedule:
- cron: '0 0 * * *'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
- fix_recipe_filler_bkwds_incompatibility
schedule:
- cron: '0 0 * * *'

Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
# The release candidate channel should only be activated
# during the rc phase right before the next release of the
# ESMValCore.
# - conda-forge/label/esmvalcore_rc
- conda-forge/label/esmvalcore_rc
- conda-forge
- nodefaults

Expand All @@ -24,7 +24,7 @@ dependencies:
- ecmwf-api-client
- eofs
- esmpy
- esmvalcore 2.9.*
- esmvalcore =2.10.0rc1
- fiona
- fire
- gdal
Expand Down
4 changes: 2 additions & 2 deletions environment_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
# The release candidate channel should only be activated
# during the rc phase right before the next release of the
# ESMValCore.
# - conda-forge/label/esmvalcore_rc
- conda-forge/label/esmvalcore_rc
- conda-forge
- nodefaults

Expand All @@ -24,7 +24,7 @@ dependencies:
- ecmwf-api-client
- eofs
- esmpy
- esmvalcore 2.9.*
- esmvalcore =2.10.0rc1
- fiona
- fire
- gdal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import os

import iris
from esmvalcore.cmor.check import _get_time_bounds
from esmvalcore.cmor.fixes import get_time_bounds
from esmvalcore.preprocessor import concatenate

from ...utilities import (
Expand Down Expand Up @@ -83,7 +83,7 @@ def cmorization(in_dir, out_dir, cfg, cfg_user, start_date, end_date):
yearly_cube = concatenate(monthly_cubes)
# Fix monthly time bounds
time = yearly_cube.coord('time')
time.bounds = _get_time_bounds(time, 'mon')
time.bounds = get_time_bounds(time, 'mon')
save_variable(yearly_cube,
var,
out_dir,
Expand Down
7 changes: 5 additions & 2 deletions esmvaltool/utils/draft_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""
import datetime
from pathlib import Path
from zoneinfo import ZoneInfo

import dateutil
import esmvalcore
Expand Down Expand Up @@ -41,8 +42,10 @@
}

PREVIOUS_RELEASE = {
'esmvalcore': datetime.datetime(2023, 5, 19, 16),
'esmvaltool': datetime.datetime(2022, 10, 28, 18),
'esmvalcore':
datetime.datetime(2023, 7, 4, 11, tzinfo=ZoneInfo("CET")),
'esmvaltool':
datetime.datetime(2022, 10, 28, 18, tzinfo=ZoneInfo("CET")),
}

LABELS = {
Expand Down
11 changes: 1 addition & 10 deletions esmvaltool/utils/recipe_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@
CFG = {}


# standard libs from esmvalcore ported here to avoid private func import
def load_config_developer(cfg_file=None):
"""Load the config developer file and initialize CMOR tables."""
cfg_developer = read_config_developer_file(cfg_file)
for key, value in cfg_developer.items():
CFG[key] = value
read_cmor_tables(CFG)


def _purge_file_handlers(cfg: dict) -> None:
"""Remove handlers with filename set.
Expand Down Expand Up @@ -258,7 +249,7 @@ def read_config_user_file(config_file, folder_name, options=None):
cfg['run_dir'] = os.path.join(cfg['output_dir'], 'run')

# Read developer configuration file
load_config_developer(cfg['config_developer_file'])
read_cmor_tables(cfg['config_developer_file'])

return cfg

Expand Down
6 changes: 0 additions & 6 deletions tests/integration/test_recipe_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
import pytest
import yaml

import esmvaltool.utils.recipe_filler as recipe_filler
from esmvalcore.cmor.table import read_cmor_tables
from esmvaltool.utils.recipe_filler import run

# Initialize with standard config developer file
std_config = recipe_filler.read_config_developer_file()
# Initialize CMOR tables
read_cmor_tables(std_config)

# Load test configuration
with open(os.path.join(os.path.dirname(__file__),
Expand Down

0 comments on commit 72174d3

Please sign in to comment.