diff --git a/esmvaltool/diag_scripts/shared/scaling.ncl b/esmvaltool/diag_scripts/shared/scaling.ncl index 986398746d..a2ef8f185d 100644 --- a/esmvaltool/diag_scripts/shared/scaling.ncl +++ b/esmvaltool/diag_scripts/shared/scaling.ncl @@ -169,6 +169,15 @@ begin end if end if + if (units_from.eq."kg.s-1") then + if (any(units_to.eq.(/"PgC y-1", "GtC y-1"/))) then + out = out * 3600. * 24. * 365 / 1.e12 + out@units = units_to + leave_msg(scriptname, funcname) + return(out) + end if + end if + if (units_from.eq."kg m-2 s-1") then if (any(units_to.eq.(/"PgC y-1", "GtC y-1"/))) then out = out * 3600. * 24. * 365 / 1.e12 diff --git a/esmvaltool/recipes/recipe_wenzel14jgr.yml b/esmvaltool/recipes/recipe_wenzel14jgr.yml index cd66bfc64c..814da02a18 100644 --- a/esmvaltool/recipes/recipe_wenzel14jgr.yml +++ b/esmvaltool/recipes/recipe_wenzel14jgr.yml @@ -26,14 +26,14 @@ preprocessors: area_type: land exclude: [ 'GCP2018', - ] + ] sea_fraction_weighting: weighting_landsea_fraction: area_type: sea exclude: [ 'GCP2018', 'HadGEM2-ES', 'CanESM2', 'IPSL-CM5A-LR', 'GFDL-ESM2M', 'MPI-ESM-LR', 'CESM1-BGC', 'NorESM1-ME', - ] + ] regrid: target_grid: CanESM2 scheme: area_weighted @@ -43,30 +43,30 @@ preprocessors: area_type: land exclude: [ 'GCP2018', 'HadGEM2-ES', 'CanESM2', 'IPSL-CM5A-LR', 'GFDL-ESM2M', 'MPI-ESM-LR', 'CESM1-BGC', 'NorESM1-ME', - ] + ] area_statistics: - operator: sum + operator: sum tropical_land: weighting_landsea_fraction: area_type: land exclude: [ 'GCP2018', 'HadGEM2-ES', 'CanESM2', 'IPSL-CM5A-LR', 'GFDL-ESM2M', 'MPI-ESM-LR', 'CESM1-BGC', 'NorESM1-ME', - ] + ] extract_region: start_longitude: 0. end_longitude: 360. start_latitude: -30. end_latitude: 30. area_statistics: - operator: sum + operator: sum global_ocean: weighting_landsea_fraction: area_type: sea exclude: [ 'GCP2018', 'HadGEM2-ES', 'CanESM2', 'IPSL-CM5A-LR', 'GFDL-ESM2M', 'MPI-ESM-LR', 'CESM1-BGC', 'NorESM1-ME', - ] + ] area_statistics: operator: sum @@ -77,7 +77,7 @@ preprocessors: start_latitude: -30. end_latitude: 30. area_statistics: - operator: mean + operator: mean diagnostics: