Skip to content
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ed6f0cf
Fix AttributeError: 'DimCoord' object has no attribute '_as_defn'
stefsmeets Oct 8, 2020
b8d9311
Replace .extract_strict -> .extract_cube
stefsmeets Oct 8, 2020
b85d485
Pin iris version to 3, because the changes are not backwards compatible
stefsmeets Oct 8, 2020
e5e591d
Fix tests failing with 'ValueError: Invalid units: sigma must be dime…
stefsmeets Oct 9, 2020
6b45cb0
Fix Flake8 fail
stefsmeets Oct 9, 2020
8d224f4
Rename .coord_comparison -> ._dimensional_metadata_comparison
stefsmeets Oct 9, 2020
afda072
Update test to not use private iris function
stefsmeets Oct 9, 2020
36fc714
Solve CoordinateNotFoundError in test
stefsmeets Oct 9, 2020
3f532d0
Fix another two `CoordinateNotFoundError` in test
stefsmeets Oct 9, 2020
041c118
Merge branch 'master' into iris3
stefsmeets Oct 9, 2020
78e6ead
Merge branch 'master' into iris3
stefsmeets Oct 9, 2020
8e1188b
added requirement to install iris3rc
valeriupredoi Oct 13, 2020
fcd787d
requirement for iris3rc
valeriupredoi Oct 13, 2020
6b10483
allow for testing with iris3
valeriupredoi Oct 13, 2020
3e31fae
allow for test installation with iris3
valeriupredoi Oct 13, 2020
037575a
mini test to see conda package builds with iris3
valeriupredoi Oct 13, 2020
e36951a
exclude scitools-iris from setup for now
valeriupredoi Oct 13, 2020
f66223a
revert changes to workflow files and align them with master - checks …
valeriupredoi Oct 15, 2020
9c83342
Update docker environment to use iris 3.0.0rc0 for CircleCI test
stefsmeets Oct 19, 2020
7e58a11
Fix conda build/install on CircleCI
stefsmeets Oct 19, 2020
ea1c197
Remove rc tag, because conda/pip should resolve 3.0.0 to 3.0.0rc0
stefsmeets Oct 19, 2020
3ff517c
Add iris rc location to CircleCI install job
stefsmeets Oct 19, 2020
9bb9f5f
Add the missing requests dependency
stefsmeets Oct 19, 2020
4972121
Remove redundant iris install (already specified by environment.yml)
stefsmeets Oct 19, 2020
b8e1f84
Remove useless noqa tag
stefsmeets Oct 19, 2020
a1aa44b
Use >= to specify iris version requirement in line with master
stefsmeets Oct 20, 2020
90cf36d
Revert "Use >= to specify iris version requirement in line with master"
stefsmeets Oct 21, 2020
1da1e06
Merge branch 'master' into iris3
valeriupredoi Jan 26, 2021
447d9aa
re-intruduce iris freedom to find its way to 3.0
valeriupredoi Jan 26, 2021
53e19b8
re-intruduce iris freedom to find its way to 3.0
valeriupredoi Jan 26, 2021
d21db3c
Actually force Iris 3
Jan 26, 2021
e697a14
Remove iris test label
Jan 26, 2021
0336362
unpin cftime
valeriupredoi Jan 26, 2021
58e1229
unpin cftime
valeriupredoi Jan 26, 2021
1100e49
pin only cftime
valeriupredoi Jan 26, 2021
d6545f1
pin only cftime
valeriupredoi Jan 26, 2021
a1a540f
relax to defaults
valeriupredoi Jan 26, 2021
b378903
restore failsafe pin on iris
valeriupredoi Jan 26, 2021
6de1a38
restore failsafe pin on iris
valeriupredoi Jan 26, 2021
827600b
replace with extract cube
valeriupredoi Jan 26, 2021
11fa875
replace with extract cube
valeriupredoi Jan 26, 2021
1dabc56
string with space and not 0 for cftime 121
valeriupredoi Jan 26, 2021
ba09c7f
string with space and not 0 for cftime 121
valeriupredoi Jan 26, 2021
05f7381
fixed call to non existent cubes
valeriupredoi Jan 26, 2021
317ef8b
fixed call to non existent cubes
valeriupredoi Jan 26, 2021
27058dc
removed development install of iris
valeriupredoi Jan 27, 2021
0a1a7a6
pin iris to at least 3.0.0
valeriupredoi Jan 27, 2021
637a97b
pin iris to at least 3.0.0
valeriupredoi Jan 27, 2021
f314933
pin iris to at least 3.0.0
valeriupredoi Jan 27, 2021
a91894b
Use Iris 3.0.1
Jan 28, 2021
a11a316
Merge branch 'master' into iris3
valeriupredoi Jan 28, 2021
046749d
regenerated sample data files with iris3
valeriupredoi Jan 28, 2021
8b7a37a
Added automatic fix for invalid sigma units in AtmosphereSigmaFactory
schlunma Jan 28, 2021
fe59ea1
Try to avoid outdated pytest cache and restore multimodel results
bouweandela Jan 28, 2021
53df144
Fixed custom AtmosphereSigmaFactory
schlunma Jan 29, 2021
d3e75d0
Merge remote-tracking branch 'origin/master' into iris3
schlunma Jan 29, 2021
c990878
unpin cftime
valeriupredoi Jan 29, 2021
41286ce
unpin cftime
valeriupredoi Jan 29, 2021
be6c4c3
Merge branch 'iris3' of github.com:ESMValGroup/ESMValCore into iris3
schlunma Jan 29, 2021
951bcba
Added fixes necessary for iris3
schlunma Jan 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ channels:
- conda-forge

dependencies:
- cftime>=1.3.0 # years<999 get a 0 instead of empty space
- cftime=1.2.1 # iris3 needs <=1.2.1; >=1.3.0 - years<999 get a 0 instead of empty space
Comment thread
bouweandela marked this conversation as resolved.
Outdated
- compilers
- esmpy
- iris>=2.2.1
- iris>=3.0.1
- graphviz
- python>=3.6 # if 3.7 lxml will not import correctly if <4.5.0
- python-stratify
Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/cmor/_fixes/cmip5/gfdl_esm2g.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def _get_and_remove(cubes, long_name):
try:
cube = cubes.extract_strict(long_name)
cube = cubes.extract_cube(long_name)
cubes.remove(cube)
except iris.exceptions.ConstraintMismatchError:
pass
Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/cmor/_fixes/cmip6/ipsl_cm6a_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def fix_metadata(self, cubes):

"""
try:
cell_area = cubes.extract_strict('cell_area')
cell_area = cubes.extract_cube('cell_area')
except ConstraintMismatchError:
return cubes

Expand Down
17 changes: 10 additions & 7 deletions esmvalcore/cmor/_fixes/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,27 @@ def _check_dependencies(pressure_at_top, sigma, surface_air_pressure):
# Check bounds
if sigma.nbounds not in (0, 2):
raise ValueError(
"Invalid 'sigma' coordinate: must have either 0 or 2 bounds, "
"got {sigma.nbounds:d}")
f"Invalid 'sigma' coordinate: must have either 0 or 2 bounds, "
f"got {sigma.nbounds:d}")
for coord in (pressure_at_top, surface_air_pressure):
if coord.nbounds:
msg = (f"Coordinate '{coord.name()}' has bounds. These will "
"be disregarded")
warnings.warn(msg, UserWarning, stacklevel=2)

# Check units
if sigma.units.is_unknown():
sigma.units = Unit('1')
if not sigma.units.is_dimensionless():
raise ValueError(
"Invalid units: 'sigma' must be dimensionless, got "
"'{sigma.units}'")
f"Invalid units: 'sigma' must be dimensionless, got "
f"'{sigma.units}'")
if pressure_at_top.units != surface_air_pressure.units:
raise ValueError(
"Incompatible units: 'pressure_at_top' and "
"'surface_air_pressure' must have the same units, got "
"'{pressure_at_top.units}' and '{surface_air_pressure.units}'")
f"Incompatible units: 'pressure_at_top' and "
f"'surface_air_pressure' must have the same units, got "
f"'{pressure_at_top.units}' and "
f"'{surface_air_pressure.units}'")
if not pressure_at_top.units.is_convertible('Pa'):
raise ValueError(
"Invalid units: 'pressure_at_top' and 'surface_air_pressure' "
Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/preprocessor/_derive/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def cloud_area_fraction(cubes, tau_constraint, plev_constraint):
"""Calculate cloud area fraction for different parameters."""
clisccp_cube = cubes.extract_strict(var_name_constraint('clisccp'))
clisccp_cube = cubes.extract_cube(var_name_constraint('clisccp'))
new_cube = clisccp_cube
new_cube = new_cube.extract(tau_constraint & plev_constraint)
coord_names = [
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/alb.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute surface albedo."""
rsdscs_cube = cubes.extract_strict(var_name_constraint('rsdscs'))
rsuscs_cube = cubes.extract_strict(var_name_constraint('rsuscs'))
rsdscs_cube = cubes.extract_cube(var_name_constraint('rsdscs'))
rsuscs_cube = cubes.extract_cube(var_name_constraint('rsuscs'))

rsnscs_cube = rsuscs_cube / rsdscs_cube

Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/preprocessor/_derive/amoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def calculate(cubes):
Output AMOC cube.
"""
# 0. Load the msftmyz cube.
cube = cubes.extract_strict(
cube = cubes.extract_cube(
iris.Constraint(
name='ocean_meridional_overturning_mass_streamfunction'))

Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute absorbed shortwave radiation."""
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsut_cube = cubes.extract_strict(
rsut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux'))

asr_cube = rsdt_cube - rsut_cube
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/chlora.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute surface chlorophyll concentration."""
chldiatos_cube = cubes.extract_strict(
chldiatos_cube = cubes.extract_cube(
Constraint(name='mass_concentration_of_diatoms_expressed_as' +
'_chlorophyll_in_sea_water'))
chlmiscos_cube = cubes.extract_strict(
chlmiscos_cube = cubes.extract_cube(
Constraint(name='mass_concentration_of_miscellaneous' +
'_phytoplankton_expressed_as_chlorophyll' +
'_in_sea_water'))
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/co2s.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute mole fraction of CO2 at surface."""
co2_cube = cubes.extract_strict(
co2_cube = cubes.extract_cube(
iris.Constraint(name='mole_fraction_of_carbon_dioxide_in_air'))
ps_cube = cubes.extract_strict(
ps_cube = cubes.extract_cube(
iris.Constraint(name='surface_air_pressure'))

# Fill masked data if necessary (interpolation fails with masked data)
Expand Down
6 changes: 3 additions & 3 deletions esmvalcore/preprocessor/_derive/ctotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ def required(project):
def calculate(cubes):
"""Compute total ecosystem carbon storage."""
try:
c_soil_cube = cubes.extract_strict(
c_soil_cube = cubes.extract_cube(
Constraint(name='soil_carbon_content'))
except iris.exceptions.ConstraintMismatchError:
try:
c_soil_cube = cubes.extract_strict(
c_soil_cube = cubes.extract_cube(
Constraint(name='soil_mass_content_of_carbon'))
except iris.exceptions.ConstraintMismatchError:
raise ValueError(f"No cube from {cubes} can be loaded with "
f"standard name CMIP5: soil_carbon_content "
f"or CMIP6: soil_mass_content_of_carbon")
c_veg_cube = cubes.extract_strict(
c_veg_cube = cubes.extract_cube(
Constraint(name='vegetation_carbon_content'))
c_total_cube = c_soil_cube + c_veg_cube
c_total_cube.standard_name = None
Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/preprocessor/_derive/et.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute evapotranspiration."""
hfls_cube = cubes.extract_strict(
hfls_cube = cubes.extract_cube(
Constraint(name='surface_upward_latent_heat_flux'))

et_cube = hfls_cube * 24.0 * 3600.0 / LATENT_HEAT_VAPORIZATION
Expand Down
6 changes: 3 additions & 3 deletions esmvalcore/preprocessor/_derive/lvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute Latent Heat Release from Precipitation."""
hfls_cube = cubes.extract_strict(var_name_constraint('hfls'))
pr_cube = cubes.extract_strict(var_name_constraint('pr'))
evspsbl_cube = cubes.extract_strict(var_name_constraint('evspsbl'))
hfls_cube = cubes.extract_cube(var_name_constraint('hfls'))
pr_cube = cubes.extract_cube(var_name_constraint('pr'))
evspsbl_cube = cubes.extract_cube(var_name_constraint('evspsbl'))

lvp_cube = hfls_cube * (pr_cube / evspsbl_cube)

Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/lwcre.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute longwave cloud radiative effect."""
rlut_cube = cubes.extract_strict(
rlut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux'))
rlutcs_cube = cubes.extract_strict(
rlutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux_assuming_clear_sky'))

lwcre_cube = rlutcs_cube - rlut_cube
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/lwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def calculate(cubes):
"""
# CMIP5 and CMIP6 names are slightly different, so use
# variable name instead to extract cubes
clwvi_cube = cubes.extract_strict(var_name_constraint('clwvi'))
clivi_cube = cubes.extract_strict(var_name_constraint('clivi'))
clwvi_cube = cubes.extract_cube(var_name_constraint('clwvi'))
clivi_cube = cubes.extract_cube(var_name_constraint('clivi'))

# CMIP5 and CMIP6 have different global attributes that we use
# to determine model name and project name:
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/ohc.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def calculate(cubes):
Output OHC cube.
"""
# 1. Load the thetao and volcello cubes
cube = cubes.extract_strict(
cube = cubes.extract_cube(
Constraint(cube_func=lambda c: c.var_name == 'thetao'))
volume = cubes.extract_strict(
volume = cubes.extract_cube(
Constraint(cube_func=lambda c: c.var_name == 'volcello'))
# 2. multiply with each other and with cprho0
# some juggling with coordinates needed since Iris is very
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/rlns.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute surface net downward longwave radiation."""
rlds_cube = cubes.extract_strict(
rlds_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_longwave_flux_in_air'))
rlus_cube = cubes.extract_strict(
rlus_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_longwave_flux_in_air'))

rlns_cube = rlds_cube - rlus_cube
Expand Down
6 changes: 3 additions & 3 deletions esmvalcore/preprocessor/_derive/rlnst.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ def calculate(cubes):
Compute Net Atmospheric Longwave Cooling
to surface and outer space.
"""
rlds_cube = cubes.extract_strict(
rlds_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_longwave_flux_in_air'))
rlus_cube = cubes.extract_strict(
rlus_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_longwave_flux_in_air'))
rlut_cube = cubes.extract_strict(
rlut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux'))

rlnst_cube = rlut_cube + (rlds_cube - rlus_cube)
Expand Down
6 changes: 3 additions & 3 deletions esmvalcore/preprocessor/_derive/rlnstcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def calculate(cubes):
Compute Net Atmospheric Longwave Cooling
to surface and outer space assuming clear sky.
"""
rldscs_cube = cubes.extract_strict(
rldscs_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_longwave_flux_in_air_' +
'assuming_clear_sky'))
rlus_cube = cubes.extract_strict(
rlus_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_longwave_flux_in_air'))
rlutcs_cube = cubes.extract_strict(
rlutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux_assuming_clear_sky'))

rlnstcs_cube = rlutcs_cube + (rldscs_cube - rlus_cube)
Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/preprocessor/_derive/rlntcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute toa net downward longwave radiation assuming clear sky."""
rlutcs_cube = cubes.extract_strict(
rlutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux_assuming_clear_sky'))
rlutcs_cube.data = -rlutcs_cube.core_data()
rlutcs_cube.attributes['positive'] = 'down'
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/rsns.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute surface net downward shortwave radiation."""
rsds_cube = cubes.extract_strict(
rsds_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_shortwave_flux_in_air'))
rsus_cube = cubes.extract_strict(
rsus_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_shortwave_flux_in_air'))

rsns_cube = rsds_cube - rsus_cube
Expand Down
8 changes: 4 additions & 4 deletions esmvalcore/preprocessor/_derive/rsnst.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute Heating from Shortwave Absorption."""
rsds_cube = cubes.extract_strict(
rsds_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_shortwave_flux_in_air'))
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsus_cube = cubes.extract_strict(
rsus_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_shortwave_flux_in_air'))
rsut_cube = cubes.extract_strict(
rsut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux'))

rsnst_cube = (rsdt_cube - rsut_cube) - (rsds_cube - rsus_cube)
Expand Down
8 changes: 4 additions & 4 deletions esmvalcore/preprocessor/_derive/rsnstcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute Heating from Shortwave Absorption assuming clear sky."""
rsdscs_cube = cubes.extract_strict(
rsdscs_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_shortwave_flux_in_air_' +
'assuming_clear_sky'))
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsuscs_cube = cubes.extract_strict(
rsuscs_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_shortwave_flux_in_air_' +
'assuming_clear_sky'))
rsutcs_cube = cubes.extract_strict(
rsutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux_assuming_clear_sky'))

rsnstcs_cube = (rsdt_cube - rsutcs_cube) - (rsdscs_cube - rsuscs_cube)
Expand Down
8 changes: 4 additions & 4 deletions esmvalcore/preprocessor/_derive/rsnstcsnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def calculate(cubes):
assuming clear sky normalized by
the incoming shortwave flux at the top of the atmosphere.
"""
rsdscs_cube = cubes.extract_strict(
rsdscs_cube = cubes.extract_cube(
Constraint(name='surface_downwelling_shortwave_flux_in_air_' +
'assuming_clear_sky'))
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsuscs_cube = cubes.extract_strict(
rsuscs_cube = cubes.extract_cube(
Constraint(name='surface_upwelling_shortwave_flux_in_air_' +
'assuming_clear_sky'))
rsutcs_cube = cubes.extract_strict(
rsutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux_assuming_clear_sky'))

rsnstcsnorm_cube = (((rsdt_cube - rsutcs_cube) -
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/rsnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute toa net downward shortwave radiation."""
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsut_cube = cubes.extract_strict(
rsut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux'))

rsnt_cube = rsdt_cube - rsut_cube
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/rsntcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute toa net downward shortwave radiation assuming clear sky."""
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsutcs_cube = cubes.extract_strict(
rsutcs_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux_assuming_clear_sky'))
rsntcs_cube = rsdt_cube - rsutcs_cube
rsntcs_cube.attributes['positive'] = 'down'
Expand Down
6 changes: 3 additions & 3 deletions esmvalcore/preprocessor/_derive/rtnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def required(project):
@staticmethod
def calculate(cubes):
"""Compute toa net downward total radiation."""
rsdt_cube = cubes.extract_strict(
rsdt_cube = cubes.extract_cube(
Constraint(name='toa_incoming_shortwave_flux'))
rsut_cube = cubes.extract_strict(
rsut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_shortwave_flux'))
rlut_cube = cubes.extract_strict(
rlut_cube = cubes.extract_cube(
Constraint(name='toa_outgoing_longwave_flux'))

rtnt_cube = rsdt_cube - rsut_cube - rlut_cube
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/sispeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def calculate(cubes):
Cube containing sea ice speed.

"""
siu = cubes.extract_strict(Constraint(name='sea_ice_x_velocity'))
siv = cubes.extract_strict(Constraint(name='sea_ice_y_velocity'))
siu = cubes.extract_cube(Constraint(name='sea_ice_x_velocity'))
siv = cubes.extract_cube(Constraint(name='sea_ice_y_velocity'))
try:
return DerivedVariable._get_speed(siu, siv)
except ValueError:
Expand Down
4 changes: 2 additions & 2 deletions esmvalcore/preprocessor/_derive/sithick.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def calculate(cubes):
Cube containing sea ice speed.

"""
sivol = cubes.extract_strict(Constraint(name='sea_ice_thickness'))
siconc = cubes.extract_strict(Constraint(name='sea_ice_area_fraction'))
sivol = cubes.extract_cube(Constraint(name='sea_ice_thickness'))
siconc = cubes.extract_cube(Constraint(name='sea_ice_area_fraction'))
siconc.convert_units('1.0')

sithick = sivol / siconc
Expand Down
Loading