diff --git a/bgcval2/timeseries/timeseriesAnalysis.py b/bgcval2/timeseries/timeseriesAnalysis.py index 83096752..6af0b827 100644 --- a/bgcval2/timeseries/timeseriesAnalysis.py +++ b/bgcval2/timeseries/timeseriesAnalysis.py @@ -139,8 +139,8 @@ def loadModel(self): # load and calculate the model info if glob.glob(self.shelvefn+'*'): # shelve files have .bak .dat .dir files now sh = shOpen(self.shelvefn) - print('seems fine:', self.shelvefn) - sh = shOpen(self.shelvefn) + print('Shelf opens fine:', self.shelvefn) +# sh = shOpen(self.shelvefn) print (sh.keys()) readFiles = sh['readFiles'] modeldataD = sh['modeldata'] diff --git a/bgcval2/timeseries/timeseriesPlots.py b/bgcval2/timeseries/timeseriesPlots.py index fb6d2ac3..0afa7d67 100644 --- a/bgcval2/timeseries/timeseriesPlots.py +++ b/bgcval2/timeseries/timeseriesPlots.py @@ -795,7 +795,8 @@ def multitimeseries( label = None else: label = labels.get(jobID, jobID) - + final_labels.append(final_labels) + if smoothing.lower() in ['spline', 'all']: tnew = np.linspace(times[0], times[-1], 60) arr_smooth = interpolate.spline(times, arr, tnew) @@ -1043,7 +1044,7 @@ def multitimeseries( ##### # Add legend: - legendSize = len(list(timesD.keys())) + legendSize = len(final_labels) ncols = int(legendSize / 25) + 1 box = ax.get_position() ax.set_position( diff --git a/input_yml/TerraFIRMA_overshoot_runs.yml b/input_yml/TerraFIRMA_overshoot_runs.yml index 64c7465d..e549b099 100644 --- a/input_yml/TerraFIRMA_overshoot_runs.yml +++ b/input_yml/TerraFIRMA_overshoot_runs.yml @@ -32,7 +32,7 @@ jobs: # ramp up u-cx209: description: 'E-mode free ice RAMP UP 8GtC/yr #1' - label: 'Ramp-up #1' + label: 'Ramp-up' # #1' colour: 'black' thickness: 1.2 linestyle: '-' @@ -42,7 +42,7 @@ jobs: u-cw988: description: 'E-mode free ice RAMP UP 8GtC/yr #2' - label: 'Ramp-up #2' + label: None #'Ramp-up #2' colour: 'black' thickness: 1.2 linestyle: '-' @@ -52,7 +52,7 @@ jobs: u-cw989: description: 'E-mode free ice RAMP UP 8GtC/yr #3' - label: 'Ramp-up #3' + label: None #'Ramp-up #3' colour: 'black' thickness: 1.2 linestyle: '-' @@ -62,7 +62,7 @@ jobs: u-cw990: description: 'E-mode free ice RAMP UP 8GtC/yr #4' - label: 'Ramp-up #4' + label: None #'Ramp-up #4' colour: 'black' thickness: 1.2 linestyle: '-' @@ -72,7 +72,7 @@ jobs: u-cz826: description: 'like cx209 but static ice sheet geometry 8GtC/yr #5' - label: 'Ramp-up #5' + label: None #'Ramp-up #5' colour: 'black' thickness: 1.2 linestyle: '-' @@ -83,7 +83,7 @@ jobs: # 1.5k Stabilisation u-cy837: description: '1.5K Stabilisation from u-cx209 (#1)' - label: '1.5K Stable #1' + label: '1.5K Stable' #e #1' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -93,7 +93,7 @@ jobs: u-cz834: description: '1.5K Stabilisation from u-cw988 (#2)' - label: '1.5K Stable #2' + label: None #'1.5K Stable #2' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -103,7 +103,7 @@ jobs: u-da087: description: '1.5K Stabilisation from u-cw989 (#3)' - label: '1.5K Stable #3' + label: None #'1.5K Stable #3' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -114,7 +114,7 @@ jobs: # 2k Stabilisation u-cy838: description: '2.0K Stabilisation from u-cx209 (#1)' - label: '2K Stable #1' + label: '2K Stable' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -124,7 +124,7 @@ jobs: u-cz855: description: '2.0K Stabilisation from cw988 (#2)' - label: '2K Stable #2' + label: None #'2K Stable #2' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -134,7 +134,7 @@ jobs: u-da266: description: '2.0K Stabilisation from cw988 (#3)' - label: '2K Stable #3' + label: None #'2K Stable #3' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -145,7 +145,7 @@ jobs: # 2.5k Stabilisation u-cz374: description: '2.5K Stabilisation from u-cx209 (#1)' - label: '2.5K Stable #1' + label: '2.5K Stable' colour: 'orange' thickness: 1.2 linestyle: '-' @@ -154,7 +154,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-cz859: description: '2.5K Stabilisation from cw988 (#2)' - label: '2.5K Stable #2' + label: None #'2.5K Stable #2' colour: 'orange' thickness: 1.2 linestyle: '-' @@ -166,7 +166,7 @@ jobs: # 3.0K Stabilisations u-cz375: description: '3.0K Stabilisation from u-cx209 (#1)' - label: '3K Stable #1' + label: '3K Stable' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -176,7 +176,7 @@ jobs: u-db587: description: '3.0K Stabilisation from u-cx209 (#2)' - label: '3K Stable #2' + label: None #'3K Stable #2' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -186,7 +186,7 @@ jobs: u-db597: description: '3.0K Stabilisation from u-cx209 (#3)' - label: '3K Stable #3' + label: None #'3K Stable #3' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -197,7 +197,7 @@ jobs: # 4k Stabilisations u-cz376: description: '4.0K Stabilisation from u-cx209 (#1)' - label: '4K Stable #1' + label: '4K Stable' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -207,7 +207,7 @@ jobs: u-db723: description: '4.0K Stabilisation from u-cw988 (#2)' - label: '4K Stable #2' + label: None #'4K Stable #2' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -217,7 +217,7 @@ jobs: u-db733: description: '4.0K Stabilisation from u-cw989 (#3)' - label: '4K Stable #3' + label: None #'4K Stable #3' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -228,7 +228,7 @@ jobs: # 5k & 6K Stabilisations u-cz377: description: '5.0K Stabilisation from u-cx209 (#1)' - label: '5K Stable #1' + label: '5K Stable' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -238,7 +238,7 @@ jobs: u-db731: description: '5.0K Stabilisation from u-cw988 (#2)' - label: '5K Stable #2' + label: None #'5K Stable #2' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -248,7 +248,7 @@ jobs: u-dc324: description: '5.0K Stabilisation from u-cw989 (#3)' - label: '5K Stable #3' + label: None #'5K Stable #3' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -258,7 +258,7 @@ jobs: u-cz378: description: '6.0K Stabilisation from u-cx209 (#1)' - label: '6K Stable #1' + label: '6K Stable' colour: 'indigo' thickness: 1.2 linestyle: '-' @@ -272,7 +272,7 @@ jobs: # -2 dashdot u-cz944: description: 'Ramp down from cy838 (- 2.0K Stabilisation from u-cx209) (#1)' - label: '2K Rampdown #1' + label: None #'2K Rampdown #1' colour: 'goldenrod' thickness: 1.7 linestyle: 'dotted' @@ -282,7 +282,7 @@ jobs: u-da800: description: 'Ramp down from cy838 (- 2.0K Stabilisation from u-cx209) (#1)' - label: '2K Rampdown #1' + label: None #'2K Rampdown #1' colour: 'goldenrod' thickness: 1.7 linestyle: 'dotted' @@ -292,7 +292,7 @@ jobs: u-da697: description: '1.5K Rampdown from u-cx209 (#1)' - label: '1.5K Rampdown #1' + label: '-8Pg/yr' colour: 'lawngreen' thickness: 1.7 linestyle: 'dotted' @@ -302,7 +302,7 @@ jobs: u-da892: description: '4.K Rampdown (#1)' - label: '4.K Rampdown #1' + label: None #'4.K Rampdown #1' colour: 'sienna' thickness: 1.7 linestyle: 'dotted' @@ -311,7 +311,7 @@ jobs: u-db223: description: '3.K Rampdown (#1)' - label: '3.K Rampdown #1' + label: None #'3.K Rampdown #1' colour: 'red' thickness: 1.7 linestyle: 'dotted' @@ -322,7 +322,7 @@ jobs: u-dc051: description: 'Rampdown from yr 50 of 1.5 stab #1, -4GtC/yr (#1)' - label: '1.5K Rampdown #1' + label: '-4Pg/yr' colour: 'lawngreen' thickness: 1.7 linestyle: 'dashed' @@ -332,7 +332,7 @@ jobs: u-dc052: description: 'Rampdown from yr 200 of 1.5deg, -4GtC/yr (#1)' - label: '1.5K Rampdown #1' + label: None #'1.5K Rampdown #1' colour: 'lawngreen' thickness: 1.7 linestyle: 'dashed' @@ -342,7 +342,7 @@ jobs: u-dc248: description: '1.5K Rampdown -4GtC/yr, (#1)' - label: '1.5K Rampdown #1' + label: None #'1.5K Rampdown #1' colour: 'lawngreen' thickness: 1.7 linestyle: 'dashed' @@ -351,7 +351,7 @@ jobs: u-dc249: description: '3.K Rampdown -4GtC/yr, 200 years, (#1)' - label: '3.K Rampdown #1' + label: None #'3.K Rampdown #1' colour: 'red' thickness: 1.7 linestyle: 'dashed' @@ -360,7 +360,7 @@ jobs: u-dc251: description: '5K Rampdown -8GtC/yr, 50 years, (#1)' - label: '5K Rampdown #1' + label: None #'5K Rampdown #1' colour: 'maroon' thickness: 1.7 linestyle: 'dotted' @@ -378,7 +378,7 @@ jobs: u-dc032: description: 'ramp-down from yr 50 of 3.0 stab #1, free ice, -4GtC/yr (#1)' - label: '3K Rampdown #1' + label: None #'3K Rampdown #1' colour: 'red' thickness: 1.7 linestyle: 'dashed' @@ -388,7 +388,7 @@ jobs: u-dc123: description: 'ramp-down from yr 50 of 4.0 stab #1, free ice, -4GtC/yr (#1)' - label: '4K Rampdown #1' + label: None #'#pdown' colour: 'sienna' thickness: 1.7 linestyle: 'dashed' @@ -398,7 +398,7 @@ jobs: u-dc130: description: 'ramp-down from yr 50 of 5.0 stab #1, free ice, -4GtC/yr (#1)' - label: '5K Rampdown #1' + label: None #'5K Rampdown #1' colour: 'maroon' thickness: 1.7 linestyle: 'dashed' @@ -408,145 +408,11 @@ jobs: -# # Ramp downs -# u-cz944: -# description: 'Ramp down from cy838 (- 2.0K Stabilisation from u-cx209) (#1)' -# label: '2K Rampdown #1' -# colour: 'goldenrod' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-da800: -# description: 'Ramp down from cy838 (- 2.0K Stabilisation from u-cx209) (#1)' -# label: '2K Rampdown #1' -# colour: 'goldenrod' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-da697: -# description: '1.5K Rampdown from u-cx209 (#1)' -# label: '1.5K Rampdown #1' -# colour: 'lawngreen' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-da892: -# description: '4.K Rampdown (#1)' -# label: '4.K Rampdown #1' -# colour: 'sienna' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# suite: kmf physics bgc #alkalinity physics - -# u-db223: -# description: '3.K Rampdown (#1)' -# label: '3.K Rampdown #1' -# colour: 'red' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# suite: kmf physics bgc #alkalinity physics - -# u-dc051: -# description: 'Rampdown from yr 50 of 1.5 stab #1, -4GtC/yr (#1)' -# label: '1.5K Rampdown #1' -# colour: 'lawngreen' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-dc052: -# description: 'Rampdown from yr 200 of 1.5deg, -4GtC/yr (#1)' -# label: '1.5K Rampdown #1' -# colour: 'lawngreen' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0 -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-dc248: -# description: '1.5K Rampdown -4GtC/yr, (#1)' -# label: '1.5K Rampdown #1' -# colour: 'lawngreen' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# suite: kmf physics bgc #alkalinity physics - -# u-dc249: -# description: '3.K Rampdown -4GtC/yr, 200 years, (#1)' -# label: '3.K Rampdown #1' -# colour: 'red' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# suite: kmf physics bgc #alkalinity physics - -# u-dc251: -# description: '5K Rampdown -8GtC/yr, 50 years, (#1)' -# label: '5K Rampdown #1' -# colour: 'maroon' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# suite: kmf physics bgc #alkalinity physics - -# # u-db956: -# # description: '1.5K Rampdown -8GtC/yr, 0 years, (#1)' -# # label: '1.5K Rampdown #1' -# # colour: 'lawngreen' -# # thickness: 1.2 -# # linestyle: ':' -# # shifttime: 0. -# # suite: kmf physics bgc #alkalinity physics - -# u-dc032: -# description: 'ramp-down from yr 50 of 3.0 stab #1, free ice, -4GtC/yr (#1)' -# label: '3K Rampdown #1' -# colour: 'red' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-dc123: -# description: 'ramp-down from yr 50 of 4.0 stab #1, free ice, -4GtC/yr (#1)' -# label: '4K Rampdown #1' -# colour: 'sienna' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics - -# u-dc130: -# description: 'ramp-down from yr 50 of 5.0 stab #1, free ice, -4GtC/yr (#1)' -# label: '5K Rampdown #1' -# colour: 'maroon' -# thickness: 1.2 -# linestyle: ':' -# shifttime: 0. -# #timerange: [1800, 2050] -# suite: kmf physics bgc #alkalinity physics # Ramp down stables. u-dc163: description: 'Stable post ramp-down (#1)' - label: 'Stab Rampdown #1' + label: None #'Stab Rampdown #1' colour: 'lawngreen' thickness: 1.2 linestyle: '-' diff --git a/input_yml/TerraFIRMA_overshoot_stables.yml b/input_yml/TerraFIRMA_overshoot_stables.yml index 25a66994..25975990 100644 --- a/input_yml/TerraFIRMA_overshoot_stables.yml +++ b/input_yml/TerraFIRMA_overshoot_stables.yml @@ -84,7 +84,7 @@ jobs: # 1.5k Stabilisation u-cy837: description: '1.5K Stabilisation from u-cx209 (#1)' - label: '1.5K Stable #1' + label: '1.5K Stable' # #1' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -93,7 +93,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-cz834: description: '1.5K Stabilisation from u-cw988 (#2)' - label: '1.5K Stable #2' + label: None #Stable #2' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -102,7 +102,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-da087: description: '1.5K Stabilisation from u-cw989 (#3)' - label: '1.5K Stable #3' + label: None #'Stable #3' colour: 'lawngreen' thickness: 1.2 linestyle: '-' @@ -113,7 +113,7 @@ jobs: # 2k Stabilisation u-cy838: description: '2.0K Stabilisation from u-cx209 (#1)' - label: '2K Stable #1' + label: '2K Stable' # #1' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -123,7 +123,7 @@ jobs: u-cz855: description: '2.0K Stabilisation from cw988 (#2)' - label: '2K Stable #2' + label: None #'2K Stable #2' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -133,7 +133,7 @@ jobs: u-da266: description: '2.0K Stabilisation from cw988 (#3)' - label: '2K Stable #3' + label: None #'2K Stable #3' colour: 'goldenrod' thickness: 1.2 linestyle: '-' @@ -144,7 +144,7 @@ jobs: # 2.5k Stabilisation u-cz374: description: '2.5K Stabilisation from u-cx209 (#1)' - label: '2.5K Stable #1' + label: '2.5K Stable' # #1' colour: 'orange' thickness: 1.2 linestyle: '-' @@ -153,7 +153,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-cz859: description: '2.5K Stabilisation from cw988 (#2)' - label: '2.5K Stable #2' + label: None #'2.5K Stable #2' colour: 'orange' thickness: 1.2 linestyle: '-' @@ -165,7 +165,7 @@ jobs: # 3.0K Stabilisations u-cz375: description: '3.0K Stabilisation from u-cx209 (#1)' - label: '3K Stable #1' + label: '3K Stable' # #1' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -175,7 +175,7 @@ jobs: u-db587: description: '3.0K Stabilisation from u-cx209 (#2)' - label: '3K Stable #2' + label: None #'3K Stable #2' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -185,7 +185,7 @@ jobs: u-db597: description: '3.0K Stabilisation from u-cx209 (#3)' - label: '3K Stable #3' + label: None #'3K Stable #3' colour: 'red' # thickness: 1.2 linestyle: '-' @@ -196,7 +196,7 @@ jobs: # 4k Stabilisations u-cz376: description: '4.0K Stabilisation from u-cx209 (#1)' - label: '4K Stable #1' + label: '4K Stable' # #1' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -205,7 +205,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-db723: description: '4.0K Stabilisation from u-cw988 (#2)' - label: '4K Stable #2' + label: None #'4K Stable #2' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -214,7 +214,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-db733: description: '4.0K Stabilisation from u-cw989 (#3)' - label: '4K Stable #3' + label: None #'4K Stable #3' colour: 'sienna' thickness: 1.2 linestyle: '-' @@ -225,7 +225,7 @@ jobs: # 5k & 6K Stabilisations u-cz377: description: '5.0K Stabilisation from u-cx209 (#1)' - label: '5K Stable #1' + label: '5K Stable' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -234,7 +234,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-db731: description: '5.0K Stabilisation from u-cw988 (#2)' - label: '5K Stable #2' + label: None #'5K Stable #2' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -243,7 +243,7 @@ jobs: suite: kmf physics bgc #alkalinity physics u-dc324: description: '5.0K Stabilisation from u-cw989 (#3)' - label: '5K Stable #3' + label: None #'5K Stable #3' colour: 'maroon' thickness: 1.2 linestyle: '-' @@ -253,7 +253,7 @@ jobs: u-cz378: description: '6.0K Stabilisation from u-cx209 (#1)' - label: '6K Stable #1' + label: '6K Stable' colour: 'indigo' thickness: 1.2 linestyle: '-' @@ -396,7 +396,7 @@ jobs: # Ramp down stables. u-dc163: description: 'Stable post ramp-down (#1)' - label: 'Stab Rampdown #1' + label: None #'Stab Rampdown #1' colour: 'lawngreen' thickness: 1.2 linestyle: '-'