... | ... | @@ -2018,7 +2018,17 @@ def dhw(cube,mmm_climatology,years_over_which_to_calculate_dhw): |
|
|
|
|
|
|
|
|
#if cube is a variable holding some historical and future daily surface ocean temperature data read in from model output (S2P3 or CMIP)
|
|
|
# Note this dataset mustr include the years 1985 to 2012, because this is the range of years used to define the maximum monthly mean climatology
|
|
|
# Note this dataset must include the years 1985 to 2012, because this is the range of years used to define the maximum monthly mean climatology
|
|
|
|
|
|
# read in historical surface temperature files
|
|
|
cube = iris.load_cube('ssp119_surfacetemperature_all.nc')
|
|
|
|
|
|
#add time coordinate info
|
|
|
iris.coord_categorisation.add_year(cube, 'time', name='year')
|
|
|
iris.coord_categorisation.add_month(cube, 'time', name='month')
|
|
|
iris.coord_categorisation.add_month_number(cube, 'time', name='month_number')
|
|
|
|
|
|
|
|
|
|
|
|
#1st we can calculate the Maximum Monthly Mean climatology
|
|
|
mmm_climatology = mmm_skirving(cube)s
|
... | ... | |