From 11424a30cc3a8d0b394f091ae293fd8573a3cf6a Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Mon, 7 Aug 2023 14:40:29 +0100 Subject: [PATCH 01/12] added new rejoins and new feature --- bgcval2/analysis_compare.py | 40 ++++++++++++++++++------------------- key_files/alkalinity.yml | 2 +- key_files/chlorophyll.yml | 2 +- key_files/mld.yml | 3 ++- key_files/oxygen.yml | 2 +- key_files/salinity.yml | 2 +- key_files/temperature.yml | 2 +- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index 50c31263..19c3d2c2 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -336,7 +336,6 @@ def timeseries_compare(jobs, if strictFileCheck: raise FileError('Model Files are not found jobID: %s, name: %s', jobID, name) - if 'dataFile' in av[name] and not os.path.exists(av[name]['dataFile']): print( "analysis-Timeseries.py:\tWARNING:\tdata file is not found:", @@ -344,7 +343,6 @@ def timeseries_compare(jobs, if strictFileCheck: raise FileError('Data Files are not found jobID: %s, name: %s', jobID, name) - ##### # time series and traffic lights. tsa = timeseriesAnalysis( @@ -368,6 +366,8 @@ def timeseries_compare(jobs, clean=False, noNewFiles=True, ) + + #dataD[(jobID,name )] = tsa.dataD modeldataD[(jobID, name)] = tsa.modeldataD @@ -378,12 +378,6 @@ def timeseries_compare(jobs, #### for name in av.keys(): -# for name in [ -# 'Temperature', 'Salinity', 'MLD', 'FreshwaterFlux', -# 'AirSeaFluxCO2', 'AirSeaFlux', 'Chlorophyll', 'Nitrate', -# 'Alkalinity', 'pH' -# ]: -# if name not in list(av.keys()): continue regions = av[name]['regions'] layers = av[name]['layers'] metrics = av[name]['metrics'] @@ -397,14 +391,11 @@ def timeseries_compare(jobs, continue title = titleify([region, layer, metric, name]) - #timesD[jobID] = sorted(mdata.keys()) - #arrD[jobID] = [mdata[t] for t in timesD[jobID]] - times, datas = apply_shifttimes(mdata, jobID, shifttimes) print('post apply_shifttimes:', len(times), len(datas)) times, datas = apply_timerange(times, datas, jobID, timeranges) - timesD[jobID] = times #mdata.keys()) - arrD[jobID] = datas #t] for t in timesD[jobID]] + timesD[jobID] = times + arrD[jobID] = datas print(jobID, region, layer, metric, len(times), len(datas)) timesD, arrD = build_ensemble(timesD, arrD, ensembles) @@ -413,7 +404,7 @@ def timeseries_compare(jobs, units = av[name]['modeldetails']['units'] ts = 'Together' - for ls in ['DataOnly', ]: # 'movingav30years'] + for ls in ['DataOnly', ]: tsp.multitimeseries( timesD, # model times (in floats) arrD, # model time series @@ -444,7 +435,7 @@ def timeseries_compare(jobs, if ensembles != {}: jobs = list(ensembles.keys()) - # Senmd everything to the comparison maker: + # Send everything to the comparison maker: comparehtml5Maker( jobIDs=jobs, reportdir=bvt.folder('CompareReports2/' + analysisname), @@ -455,6 +446,7 @@ def timeseries_compare(jobs, jobColours=colours, paths=paths, ) + print('End of timeseries_compare') def flatten(lats, lons, dataA, dataB): @@ -546,12 +538,10 @@ def load_comparison_yml(master_compare_yml_fn): details['timeranges'] = timeranges details['suites'] = suites details['auto_download'] = auto_download_dict -# print(details) -# assert 0 return details -def load_yml_and_run(compare_yml, config_user): +def load_yml_and_run(compare_yml, config_user, only_htmlreport): """ Loads the comparison yaml file and run compare_yml. @@ -565,6 +555,9 @@ def load_yml_and_run(compare_yml, config_user): do_mass_download = details['do_mass_download'] master_suites = details['master_suites'] + if only_htmlreport == True: # Skip time series analysis. + do_analysis_timeseries = False + colours = details['colours'] thicknesses = details['thicknesses'] linestyles = details['linestyles'] @@ -649,6 +642,13 @@ def get_args(): help='User configuration file (for paths).', required=False) + parser.add_argument('-r', + '--only_htmlreport', + default=False, + type=bool, + help='Make the html report and skip the new timeseries analyses - overwrites the do_analysis_timeseries flag in input_yml.', + required=False) + args = parser.parse_args() return args @@ -670,8 +670,8 @@ def main(): if not os.path.isfile(compare_yml): print(f"analysis_timeseries: Could not find comparison config file {compare_yml}") sys.exit(1) - - load_yml_and_run(compare_yml, config_user) + only_htmlreport = args.only_htmlreport + load_yml_and_run(compare_yml, config_user, only_htmlreport) print("Finished... ") diff --git a/key_files/alkalinity.yml b/key_files/alkalinity.yml index 52061c57..125901b1 100644 --- a/key_files/alkalinity.yml +++ b/key_files/alkalinity.yml @@ -19,4 +19,4 @@ model_convert : NoChange # function: convertmeqm3TOumolkg layers : Surface #50m #;100m 200m 500m 1000m 2000m -regions : Global #ignoreInlandSeas #;SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific diff --git a/key_files/chlorophyll.yml b/key_files/chlorophyll.yml index 35b7e3f8..0d224097 100644 --- a/key_files/chlorophyll.yml +++ b/key_files/chlorophyll.yml @@ -14,7 +14,7 @@ model_vars : CHD CHN model_convert : sum layers : Surface -regions : Global #ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific diff --git a/key_files/mld.yml b/key_files/mld.yml index e8cfcd9e..f90b8adc 100644 --- a/key_files/mld.yml +++ b/key_files/mld.yml @@ -26,4 +26,5 @@ data_convert: maskname : mask areafile: $BASEDIR_OBS/IFREMER-MLD/mld_DT02_c1m_reg2.0-annual.nc layers : Surface -regions : Global SouthernOcean +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/oxygen.yml b/key_files/oxygen.yml index f1551d00..c4bdd0ef 100644 --- a/key_files/oxygen.yml +++ b/key_files/oxygen.yml @@ -21,5 +21,5 @@ data_convert: factor : 44.661 layers : Surface 100m 500m -regions : Global #gnoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global SouthernOcean Equator10 #gnoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific diff --git a/key_files/salinity.yml b/key_files/salinity.yml index af964e75..a903bbe4 100644 --- a/key_files/salinity.yml +++ b/key_files/salinity.yml @@ -20,4 +20,4 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global #ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific diff --git a/key_files/temperature.yml b/key_files/temperature.yml index e2221818..715e739e 100644 --- a/key_files/temperature.yml +++ b/key_files/temperature.yml @@ -21,7 +21,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global # OnShelf OffShelf #ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf From 5be3496add6d7a519c19ac911802c4ca3b193ef9 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Mon, 7 Aug 2023 14:49:33 +0100 Subject: [PATCH 02/12] Added new tf run. --- input_yml/TerraFIRMA_overshoot_historical.yml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 input_yml/TerraFIRMA_overshoot_historical.yml diff --git a/input_yml/TerraFIRMA_overshoot_historical.yml b/input_yml/TerraFIRMA_overshoot_historical.yml new file mode 100644 index 00000000..c0a18ec3 --- /dev/null +++ b/input_yml/TerraFIRMA_overshoot_historical.yml @@ -0,0 +1,69 @@ +--- +# GC5 N96 ORCA1 spinup analysis +name: TerraFIRMA_overshoot_historical + +# Run the single job analysis +do_analysis_timeseries: True + +# Download from mass: +do_mass_download: False + +# master analysis suite +master_suites: physics bgc #alkalinity physics kmf1 + +clean: True + +jobs: + u-ca306: + description: 'Reference ' + colour: 'black' + thickness: 0.6 + linestyle: '-' + shifttime: 0. + timerange: [1800, 1900] + suite: physics bgc #alkalinity physics + + u-cy623: + description: 'interactive ice, started from picontrol yr 2277' + colour: red + thickness: 1.7 + linestyle: '-' + shifttime: 0. + suite: physics bgc #alkalinity physics + + u-cy690: + description: 'static ice sheets, started from picontrol yr 2277' + colour: purple + thickness: 1.7 + linestyle: '-' + shifttime: 0. + suite: physics bgc #alkalinity physics + + u-cy691: + description: 'static ice sheets, started from picontrol yr 2197' + colour: blue + thickness: 1.7 + linestyle: '-' + shifttime: 0. + suite: physics bgc #alkalinity physics + + u-cy692: + description: ' static ice sheets, started from picontrol yr 2237' + colour: green + thickness: 1.7 + linestyle: '-' + shifttime: 0. + suite: physics bgc #alkalinity physics kmf + + u-cy693: + description: ' static ice sheets, started from picontrol yr 2317' + colour: goldenrod + thickness: 1.7 + linestyle: '-' + shifttime: 0. + suite: physics bgc #alkalinity physics kmf + + + + + From cb9dec0b32a13653f105a1c196411ae4cd1cc295 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Mon, 7 Aug 2023 15:05:27 +0100 Subject: [PATCH 03/12] added new regions. --- key_files/atmospco2.yml | 3 ++- key_files/dic.yml | 3 ++- key_files/dust.yml | 3 ++- key_files/iron.yml | 3 ++- key_files/nitrate.yml | 3 ++- key_files/silicate.yml | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/key_files/atmospco2.yml b/key_files/atmospco2.yml index 2f9d9106..9b88bc62 100644 --- a/key_files/atmospco2.yml +++ b/key_files/atmospco2.yml @@ -8,6 +8,7 @@ modelFiles : $BASEDIR_MODEL/$JOBID/medusa*$JOBIDo_1y_*_diad-T.nc model_vars : ATM_PCO2 model_convert : NoChange layers : layerless -regions : Global #gnoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/dic.yml b/key_files/dic.yml index 49184cc6..f6478668 100644 --- a/key_files/dic.yml +++ b/key_files/dic.yml @@ -15,4 +15,5 @@ model_convert : NoChange layers : Surface #50m #;100m 200m 500m 1000m 2000m -regions : Global #ignoreInlandSeas #;SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/dust.yml b/key_files/dust.yml index fefe2131..6e23f17e 100644 --- a/key_files/dust.yml +++ b/key_files/dust.yml @@ -9,6 +9,7 @@ model_vars : AEOLIAN model_convert: function: NoChange layers : layerless -regions : Global +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/iron.yml b/key_files/iron.yml index 441393dc..76cd34b1 100644 --- a/key_files/iron.yml +++ b/key_files/iron.yml @@ -25,7 +25,8 @@ model_convert : #data_convert_factor : 1000 layers : Surface #Transect ;CanRusTransect PTransect SOTransect Equator ArcTransect AntTransect ArcTransect AntTransect -regions : Global +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/nitrate.yml b/key_files/nitrate.yml index f9d6ba1b..bc23cf41 100644 --- a/key_files/nitrate.yml +++ b/key_files/nitrate.yml @@ -21,6 +21,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface 50m #;100m 200m 500m 1000m 2000m -regions : Global ignoreInlandSeas #;SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + diff --git a/key_files/silicate.yml b/key_files/silicate.yml index e0966b76..5dfdf5c9 100644 --- a/key_files/silicate.yml +++ b/key_files/silicate.yml @@ -19,6 +19,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global SouthernOcean # ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific ignoreInlandSeas +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf + From 1e6f23c18a299981a9f4bb6051af97e4c290c0b6 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Mon, 7 Aug 2023 15:59:22 +0100 Subject: [PATCH 04/12] Re-did boolean command line arg. --- README.md | 10 +++++++++ bgcval2/analysis_compare.py | 22 ++++++++++--------- input_yml/TerraFIRMA_overshoot_historical.yml | 12 +++++----- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index deb6f639..c972b16d 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,7 @@ These values are: - `do_analysis_timeseries`: - A Boolean value to run or skip the single model timeseries. - Set to False if the single model analysis has already completed. + - This value is overwritten by the `analysis_compare -s` which skips new timeseries analyses. - `do_mass_download`: - A boolean value to run the mass download. - This is not currently possible as we can only download mass file from mass-cli1 on jasmin. @@ -293,6 +294,15 @@ These values are: A sample yaml exists in `input_yml/comparison_analysis_template.yml`, which can be adapted to additional analyses. +In order to only run the report making part of the comparison analysis +(skip the `analysis_timeseries part`), +either set the `do_analysis_timeseries` key to `False` in the `input_yml` file, +or run `analysis_compare` with the command line argument: `-s` or --skip-timeseries. +To force the analysis timeseries command to run use `--no-skip-timeseries`. +Though without without either of these command line arguments, +bgcval2 will default to the value in your `input_yml` file. +Also, the command line argument overwrites the value in `input_yml`. + Once the comparison suite has been run, members of the esmeval group workspace on JASMIN can copy the html report to a web-visible directory, using the script: diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index 19c3d2c2..de074215 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -541,7 +541,7 @@ def load_comparison_yml(master_compare_yml_fn): return details -def load_yml_and_run(compare_yml, config_user, only_htmlreport): +def load_yml_and_run(compare_yml, config_user, skip_timeseries): """ Loads the comparison yaml file and run compare_yml. @@ -555,8 +555,10 @@ def load_yml_and_run(compare_yml, config_user, only_htmlreport): do_mass_download = details['do_mass_download'] master_suites = details['master_suites'] - if only_htmlreport == True: # Skip time series analysis. - do_analysis_timeseries = False + if skip_timeseries == None: + pass + else: + do_analysis_timeseries = not skip_timeseries colours = details['colours'] thicknesses = details['thicknesses'] @@ -642,11 +644,11 @@ def get_args(): help='User configuration file (for paths).', required=False) - parser.add_argument('-r', - '--only_htmlreport', - default=False, - type=bool, - help='Make the html report and skip the new timeseries analyses - overwrites the do_analysis_timeseries flag in input_yml.', + parser.add_argument('--skip_timeseries', + '-s', + default=None, + help='When True: skip the new timeseries analyses and make the html report. Overwrites the do_analysis_timeseries flag in input_yml.', + action=argparse.BooleanOptionalAction, required=False) args = parser.parse_args() @@ -670,8 +672,8 @@ def main(): if not os.path.isfile(compare_yml): print(f"analysis_timeseries: Could not find comparison config file {compare_yml}") sys.exit(1) - only_htmlreport = args.only_htmlreport - load_yml_and_run(compare_yml, config_user, only_htmlreport) + skip_timeseries = args.skip_timeseries + load_yml_and_run(compare_yml, config_user, skip_timeseries) print("Finished... ") diff --git a/input_yml/TerraFIRMA_overshoot_historical.yml b/input_yml/TerraFIRMA_overshoot_historical.yml index c0a18ec3..9f1cb965 100644 --- a/input_yml/TerraFIRMA_overshoot_historical.yml +++ b/input_yml/TerraFIRMA_overshoot_historical.yml @@ -21,7 +21,7 @@ jobs: linestyle: '-' shifttime: 0. timerange: [1800, 1900] - suite: physics bgc #alkalinity physics + suite: kmf physics bgc #alkalinity physics u-cy623: description: 'interactive ice, started from picontrol yr 2277' @@ -29,7 +29,7 @@ jobs: thickness: 1.7 linestyle: '-' shifttime: 0. - suite: physics bgc #alkalinity physics + suite: kmf physics bgc #alkalinity physics u-cy690: description: 'static ice sheets, started from picontrol yr 2277' @@ -37,7 +37,7 @@ jobs: thickness: 1.7 linestyle: '-' shifttime: 0. - suite: physics bgc #alkalinity physics + suite: kmf physics bgc #alkalinity physics u-cy691: description: 'static ice sheets, started from picontrol yr 2197' @@ -45,7 +45,7 @@ jobs: thickness: 1.7 linestyle: '-' shifttime: 0. - suite: physics bgc #alkalinity physics + suite: kmf physics bgc #alkalinity physics u-cy692: description: ' static ice sheets, started from picontrol yr 2237' @@ -53,7 +53,7 @@ jobs: thickness: 1.7 linestyle: '-' shifttime: 0. - suite: physics bgc #alkalinity physics kmf + suite: kmf physics bgc #alkalinity physics kmf u-cy693: description: ' static ice sheets, started from picontrol yr 2317' @@ -61,7 +61,7 @@ jobs: thickness: 1.7 linestyle: '-' shifttime: 0. - suite: physics bgc #alkalinity physics kmf + suite: kmf physics bgc #alkalinity physics kmf From 1da18aafdbe7441bb66e42a1396314fb30b56029 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 9 Aug 2023 12:10:07 +0100 Subject: [PATCH 05/12] Update key_files/alkalinity.yml --- key_files/alkalinity.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/key_files/alkalinity.yml b/key_files/alkalinity.yml index 125901b1..252c7a03 100644 --- a/key_files/alkalinity.yml +++ b/key_files/alkalinity.yml @@ -19,4 +19,5 @@ model_convert : NoChange # function: convertmeqm3TOumolkg layers : Surface #50m #;100m 200m 500m 1000m 2000m -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean + From ca8ba2803d18ddeeaa5666eaf87c36943a6df51f Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 9 Aug 2023 12:11:17 +0100 Subject: [PATCH 06/12] Apply suggestions from code review --- README.md | 6 +++--- key_files/atmospco2.yml | 2 +- key_files/chlorophyll.yml | 2 +- key_files/dic.yml | 2 +- key_files/dust.yml | 2 +- key_files/iron.yml | 2 +- key_files/mld.yml | 2 +- key_files/nitrate.yml | 2 +- key_files/oxygen.yml | 2 +- key_files/salinity.yml | 2 +- key_files/silicate.yml | 2 +- key_files/temperature.yml | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c972b16d..1a05ee71 100644 --- a/README.md +++ b/README.md @@ -295,10 +295,10 @@ A sample yaml exists in `input_yml/comparison_analysis_template.yml`, which can be adapted to additional analyses. In order to only run the report making part of the comparison analysis -(skip the `analysis_timeseries part`), +(skip the `analysis_timeseries` part), either set the `do_analysis_timeseries` key to `False` in the `input_yml` file, -or run `analysis_compare` with the command line argument: `-s` or --skip-timeseries. -To force the analysis timeseries command to run use `--no-skip-timeseries`. +or run `analysis_compare` with the command line argument: `-s` or `--skip-timeseries`. +To skip the analysis timeseries command, use `--no-skip-timeseries`. Though without without either of these command line arguments, bgcval2 will default to the value in your `input_yml` file. Also, the command line argument overwrites the value in `input_yml`. diff --git a/key_files/atmospco2.yml b/key_files/atmospco2.yml index 9b88bc62..66e71bfb 100644 --- a/key_files/atmospco2.yml +++ b/key_files/atmospco2.yml @@ -8,7 +8,7 @@ modelFiles : $BASEDIR_MODEL/$JOBID/medusa*$JOBIDo_1y_*_diad-T.nc model_vars : ATM_PCO2 model_convert : NoChange layers : layerless -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/chlorophyll.yml b/key_files/chlorophyll.yml index 0d224097..439e0858 100644 --- a/key_files/chlorophyll.yml +++ b/key_files/chlorophyll.yml @@ -14,7 +14,7 @@ model_vars : CHD CHN model_convert : sum layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/dic.yml b/key_files/dic.yml index f6478668..8a6c5ec8 100644 --- a/key_files/dic.yml +++ b/key_files/dic.yml @@ -15,5 +15,5 @@ model_convert : NoChange layers : Surface #50m #;100m 200m 500m 1000m 2000m -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/dust.yml b/key_files/dust.yml index 6e23f17e..e400e4d7 100644 --- a/key_files/dust.yml +++ b/key_files/dust.yml @@ -9,7 +9,7 @@ model_vars : AEOLIAN model_convert: function: NoChange layers : layerless -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/iron.yml b/key_files/iron.yml index 76cd34b1..a240f3c0 100644 --- a/key_files/iron.yml +++ b/key_files/iron.yml @@ -25,7 +25,7 @@ model_convert : #data_convert_factor : 1000 layers : Surface #Transect ;CanRusTransect PTransect SOTransect Equator ArcTransect AntTransect ArcTransect AntTransect -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/mld.yml b/key_files/mld.yml index f90b8adc..b96d7914 100644 --- a/key_files/mld.yml +++ b/key_files/mld.yml @@ -26,5 +26,5 @@ data_convert: maskname : mask areafile: $BASEDIR_OBS/IFREMER-MLD/mld_DT02_c1m_reg2.0-annual.nc layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/nitrate.yml b/key_files/nitrate.yml index bc23cf41..427e45f5 100644 --- a/key_files/nitrate.yml +++ b/key_files/nitrate.yml @@ -21,7 +21,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface 50m #;100m 200m 500m 1000m 2000m -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/oxygen.yml b/key_files/oxygen.yml index c4bdd0ef..74017a0a 100644 --- a/key_files/oxygen.yml +++ b/key_files/oxygen.yml @@ -21,5 +21,5 @@ data_convert: factor : 44.661 layers : Surface 100m 500m -regions : Global SouthernOcean Equator10 #gnoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/salinity.yml b/key_files/salinity.yml index a903bbe4..2fb7b53f 100644 --- a/key_files/salinity.yml +++ b/key_files/salinity.yml @@ -20,4 +20,4 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/silicate.yml b/key_files/silicate.yml index 5dfdf5c9..67e50b93 100644 --- a/key_files/silicate.yml +++ b/key_files/silicate.yml @@ -19,7 +19,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean diff --git a/key_files/temperature.yml b/key_files/temperature.yml index 715e739e..7a9ee346 100644 --- a/key_files/temperature.yml +++ b/key_files/temperature.yml @@ -21,7 +21,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean From beabca4f4fa1cde12f851f03906e5c69d4ae6ccf Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 9 Aug 2023 12:11:42 +0100 Subject: [PATCH 07/12] local copy --- key_files/dust.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/key_files/dust.yml b/key_files/dust.yml index 6e23f17e..557a7348 100644 --- a/key_files/dust.yml +++ b/key_files/dust.yml @@ -9,7 +9,4 @@ model_vars : AEOLIAN model_convert: function: NoChange layers : layerless -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific # OnShelf OffShelf - - - +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean #orthernSubpolarAtlantic NorthernSubpolarPacific AtlanticSOcean # OnShelf OffShelf From 3feb1960bc67b1ec968e10235c5eb196aa89fde1 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 9 Aug 2023 15:00:05 +0100 Subject: [PATCH 08/12] Solved #104 and #105 --- bgcval2/analysis_compare.py | 6 +- bgcval2/bgcval2_make_report.py | 139 ++++++++++++++++++--------------- key_files/mld.yml | 21 +++-- 3 files changed, 93 insertions(+), 73 deletions(-) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index de074215..ca56b583 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -190,7 +190,8 @@ def timeseries_compare(jobs, lineThicknesses=defaultdict(lambda: 1), linestyles=defaultdict(lambda: '-'), ensembles={}, - config_user=None): + config_user=None, + ): """ timeseries_compare: Suite of tools to take pre-analyses time series model data @@ -445,6 +446,7 @@ def timeseries_compare(jobs, jobDescriptions=jobDescriptions, jobColours=colours, paths=paths, + analysisKeys=analysisKeys, ) print('End of timeseries_compare') @@ -619,7 +621,7 @@ def load_yml_and_run(compare_yml, config_user, skip_timeseries): analysisname=analysis_name, lineThicknesses=thicknesses, linestyles=linestyles, - config_user=config_user + config_user=config_user, ) diff --git a/bgcval2/bgcval2_make_report.py b/bgcval2/bgcval2_make_report.py index aa10aafc..497b92de 100755 --- a/bgcval2/bgcval2_make_report.py +++ b/bgcval2/bgcval2_make_report.py @@ -1371,7 +1371,8 @@ def comparehtml5Maker( doZip=False, jobDescriptions={}, jobColours={}, - paths = {} + paths = {}, + analysisKeys=[] ): if clean: @@ -1498,7 +1499,7 @@ def newImageLocation(fn): 'BGC Key Metrics': [], 'Other Plots': [], } - extrafolds = [] +# extrafolds = [] for fn in files: found = False @@ -1525,15 +1526,15 @@ def newImageLocation(fn): ] found = True if found: continue - for extracat in extrafolds: - if found: continue - if fn.find('/' + extracat + '/') > -1: - try: - categories[extracat].append(fn) - except: - categories[extracat] = [ - fn, - ] +# for extracat in extrafolds: +# if found: continue +# if fn.find('/' + extracat + '/') > -1: +# try: +# categories[extracat].append(fn) +# except: +# categories[extracat] = [ +# fn, +# ] if found: continue try: @@ -1548,9 +1549,9 @@ def newImageLocation(fn): categoryOrder.append('Physics Key Metrics') if len(categories['BGC Key Metrics']): categoryOrder.append('BGC Key Metrics') - for exf in extrafolds: - if exf not in list(categories.keys()): continue - if len(categories[exf]): categoryOrder.append(exf) +# for exf in extrafolds: +# if exf not in list(categories.keys()): continue +# if len(categories[exf]): categoryOrder.append(exf) if len(categories['Other Plots']): categoryOrder.append('Other Plots') categories['Other Plots'] = sorted(categories['Other Plots']) @@ -1598,57 +1599,67 @@ def newImageLocation(fn): FileLists = {} FileOrder = {} - names = [ - 'Chlorophyll', - 'MLD', - 'Nitrate', - 'Phosphate', - 'Salinity', - 'Temperature', - 'Current', - #'so', - 'Ice', - 'DIC', - 'pH', - 'DMS', - 'DiaFrac', - 'Dust', - 'Iron', - 'Silicate', - 'Alkalinity', - 'AMOC', - 'ADRC', - 'DrakePassage', - 'AirSeaFlux', - 'DTC', - 'Oxygen', - 'OMZ', - 'Production', - 'Export', - 'FreshwaterFlux', - 'HeatFlux', - 'soga', - 'scvoltot', - 'thetaoga', - 'scalarHeatContent', - ] + if analysisKeys: + names = analysisKeys + else: + names = [ + 'Chlorophyll', + 'MLD', + 'Nitrate', + 'Phosphate', + 'Salinity', + 'Temperature', + 'Current', + #'so', + 'Ice', + 'DIC', + 'pH', + 'DMS', + 'DiaFrac', + 'Dust', + 'Iron', + 'Silicate', + 'Alkalinity', + 'AMOC', + 'ADRC', + 'DrakePassage', + 'AirSeaFlux', + 'DTC', + 'Oxygen', + 'OMZ', + 'Production', + 'Export', + 'FreshwaterFlux', + 'HeatFlux', + 'soga', + 'scvoltot', + 'thetaoga', + 'scalarHeatContent', + ] # Add the rest of the names from key_lists directory. - key_lists_dir = os.path.join(paths.bgcval2_repo, 'key_lists') - for suite_yml in glob(os.path.join(key_lists_dir, '*.yml')): - # look for a list in keys_list directory: - # Open yml file: - with open(suite_yml, 'r') as openfile: - suite_dict = yaml.safe_load(openfile) - - keys_dict = suite_dict.get('keys', {}) - for key, key_bool in keys_dict.items(): - if not key_bool: - continue - if key in names: - continue - names.append(key) - +# key_lists_dir = os.path.join(paths.bgcval2_repo, 'key_lists') +# for suite_yml in glob(os.path.join(key_lists_dir, '*.yml')): +# # look for a list in keys_list directory: +# # Open yml file: +# with open(suite_yml, 'r') as openfile: +# suite_dict = yaml.safe_load(openfile) +# print('suite_yml', suite_yml) +# print('suite_dict', suite_dict) +# keys_dict = suite_dict.get('keys', {}) +# print('keys_dict',keys_dict) +# print('names (pre):', names) +# for key, key_bool in keys_dict.items(): +# print(key,key_bool) +# if not key_bool: +# continue +# if key in names: +# continue +# names.append(key) +# + print('names', names) +# assert 0 for key in sorted(names): + ##### # Determine the list of files: vfiles = [] @@ -1690,6 +1701,8 @@ def newImageLocation(fn): print("Adding ", relfn, "to script") if len(otherFilenames): + # I think this is never happens anymore. + assert 0 href = 'OtherPlots-others' hrefs.append(href) diff --git a/key_files/mld.yml b/key_files/mld.yml index b96d7914..82398e3f 100644 --- a/key_files/mld.yml +++ b/key_files/mld.yml @@ -11,12 +11,16 @@ modelFile_p2p : $BASEDIR_MODEL/$JOBID/nemo*_$JOBIDo_1y_*$YEAR????_grid-T.nc dataFile : $BASEDIR_OBS/IFREMER-MLD/mld_DT02_c1m_reg2.0-annual.nc # Model coordinates/dimension names -model_vars : somxl010 somxzint1 -model_convert: - path: bgcval2/functions/applyLandMask.py - function: applyLandMask - areafile: $PATHS_GRIDFILE - maskname : tmask +model_vars : mlotst +model_convert : NoChange +layers : layerless + +#model_vars : somxl010 somxzint1 +#model_convert: +# path: bgcval2/functions/applyLandMask.py +# function: applyLandMask +# areafile: $PATHS_GRIDFILE +# maskname : tmask data_vars : mld data_tdict : ZeroToZero @@ -25,6 +29,7 @@ data_convert: function: applyLandMask maskname : mask areafile: $BASEDIR_OBS/IFREMER-MLD/mld_DT02_c1m_reg2.0-annual.nc -layers : Surface -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean +#layers : Surface +#regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean +regions : Global OnShelf OffShelf ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthAtlanticOcean SouthAtlanticOcean NorthPacificOcean SouthPacificOcean #;Remainder NorthernSubpolarAtlantic NorthernSubpolarPacific From 2a3323615139d285ce46620aa78e2bd29065ddf3 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 9 Aug 2023 15:38:23 +0100 Subject: [PATCH 09/12] Some bug fixes. --- bgcval2/analysis_compare.py | 1 - bgcval2/bgcval2_make_report.py | 103 ++++++--------------------------- 2 files changed, 18 insertions(+), 86 deletions(-) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index ca56b583..56217169 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -442,7 +442,6 @@ def timeseries_compare(jobs, reportdir=bvt.folder('CompareReports2/' + analysisname), files=AllImages, clean=False, - doZip=False, jobDescriptions=jobDescriptions, jobColours=colours, paths=paths, diff --git a/bgcval2/bgcval2_make_report.py b/bgcval2/bgcval2_make_report.py index 497b92de..50bd6884 100755 --- a/bgcval2/bgcval2_make_report.py +++ b/bgcval2/bgcval2_make_report.py @@ -113,7 +113,6 @@ def html5Maker( reportdir='reports/tmp', year='*', clean=False, - doZip=False, physicsOnly=False, paths=None, config_user=None, @@ -1358,9 +1357,6 @@ def newImageLocation(fn): print("-------------\nSuccess\ntest with:\nfirefox", indexhtmlfn) print("To zip it up:\n", tar) - if doZip: - import subprocess - subprocess.Popen(tar.split()) def comparehtml5Maker( @@ -1368,13 +1364,23 @@ def comparehtml5Maker( reportdir='reports/tmp', files=[], clean=False, - doZip=False, jobDescriptions={}, jobColours={}, paths = {}, analysisKeys=[] ): - + """ + Generates the multi-job comparison report. + + jobIDs: list of job IDs + reportdir: output job direction + files: a list of paths to images + clean: bool to remove old report. + jobDescriptions: dict to describe eahc job + jobColours: dict for each jobs colour in the legend. + paths: bgcval.paths + analysisKeys: list of analysis keys (generated from the input_yml). + """ if clean: ##### # Delete old files @@ -1453,6 +1459,8 @@ def newImageLocation(fn): Caption=Caption, tablehtml=htmltable) + # A curated list of specific plots to include in the headlines + # of the comparison report physicsKM = [ 'AMOC_26N', 'ADRC_26N', @@ -1470,7 +1478,6 @@ def newImageLocation(fn): 'MA_Drake', 'MA_AMOC_26N', 'MA_AEU', - ] bgcKM = [ @@ -1494,13 +1501,14 @@ def newImageLocation(fn): 'MA_TotalPhytoC_Global_Surface', 'MA_TotalZooC_Global_Surface', ] + categories = { 'Physics Key Metrics': [], 'BGC Key Metrics': [], 'Other Plots': [], } -# extrafolds = [] + for fn in files: found = False for key in physicsKM: @@ -1526,17 +1534,6 @@ def newImageLocation(fn): ] found = True if found: continue -# for extracat in extrafolds: -# if found: continue -# if fn.find('/' + extracat + '/') > -1: -# try: -# categories[extracat].append(fn) -# except: -# categories[extracat] = [ -# fn, -# ] - - if found: continue try: categories['Other Plots'].append(fn) except: @@ -1549,9 +1546,6 @@ def newImageLocation(fn): categoryOrder.append('Physics Key Metrics') if len(categories['BGC Key Metrics']): categoryOrder.append('BGC Key Metrics') -# for exf in extrafolds: -# if exf not in list(categories.keys()): continue -# if len(categories[exf]): categoryOrder.append(exf) if len(categories['Other Plots']): categoryOrder.append('Other Plots') categories['Other Plots'] = sorted(categories['Other Plots']) @@ -1589,7 +1583,7 @@ def newImageLocation(fn): Files=relativeFiles) if len(categories['Other Plots']): - otherFilenames = files[:] #categories['Other Plots'][:] + otherFilenames = files[:] SectionTitle = 'All Plots' hrefs = [] @@ -1599,67 +1593,7 @@ def newImageLocation(fn): FileLists = {} FileOrder = {} - if analysisKeys: - names = analysisKeys - else: - names = [ - 'Chlorophyll', - 'MLD', - 'Nitrate', - 'Phosphate', - 'Salinity', - 'Temperature', - 'Current', - #'so', - 'Ice', - 'DIC', - 'pH', - 'DMS', - 'DiaFrac', - 'Dust', - 'Iron', - 'Silicate', - 'Alkalinity', - 'AMOC', - 'ADRC', - 'DrakePassage', - 'AirSeaFlux', - 'DTC', - 'Oxygen', - 'OMZ', - 'Production', - 'Export', - 'FreshwaterFlux', - 'HeatFlux', - 'soga', - 'scvoltot', - 'thetaoga', - 'scalarHeatContent', - ] - # Add the rest of the names from key_lists directory. -# key_lists_dir = os.path.join(paths.bgcval2_repo, 'key_lists') -# for suite_yml in glob(os.path.join(key_lists_dir, '*.yml')): -# # look for a list in keys_list directory: -# # Open yml file: -# with open(suite_yml, 'r') as openfile: -# suite_dict = yaml.safe_load(openfile) -# print('suite_yml', suite_yml) -# print('suite_dict', suite_dict) -# keys_dict = suite_dict.get('keys', {}) -# print('keys_dict',keys_dict) -# print('names (pre):', names) -# for key, key_bool in keys_dict.items(): -# print(key,key_bool) -# if not key_bool: -# continue -# if key in names: -# continue -# names.append(key) -# - print('names', names) -# assert 0 - for key in sorted(names): - + for key in sorted(analysisKeys): ##### # Determine the list of files: vfiles = [] @@ -1737,7 +1671,6 @@ def newImageLocation(fn): print(Descriptions) print(FileLists) print(FileOrder) - # hrefs=[] if len(hrefs): html5Tools.AddSubSections(indexhtmlfn, hrefs, From ae6fe0ee9b4cefc9bd1337e943c9ff853ececd91 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Thu, 10 Aug 2023 15:26:27 +0100 Subject: [PATCH 10/12] add case with new cmd line arg --- tests/integration/test_analysis_compare_end-end.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration/test_analysis_compare_end-end.py b/tests/integration/test_analysis_compare_end-end.py index 2845c7da..471b2ed0 100644 --- a/tests/integration/test_analysis_compare_end-end.py +++ b/tests/integration/test_analysis_compare_end-end.py @@ -49,3 +49,14 @@ def test_run_analysis_compare(): bgcval2_test_data() with arguments('analysis_compare', '-y', 'input_yml/integration_testing.yml'): main() + + +@patch('bgcval2.analysis_compare.main', new=wrapper(bgcval2.analysis_compare.main)) +@pytest.mark.usefixtures('test_create_files') +def test_run_analysis_compare_with_skip_timeseries(): + """Patch and run the whole thing.""" + bgcval2_test_data() + with arguments('analysis_compare', '-y', + 'input_yml/integration_testing.yml', + '--skip_timeseries'): + main() From d576930551ad62072263905e02ad21dcfd4271ab Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Thu, 10 Aug 2023 16:25:52 +0100 Subject: [PATCH 11/12] run test with no-skip too --- tests/integration/test_analysis_compare_end-end.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration/test_analysis_compare_end-end.py b/tests/integration/test_analysis_compare_end-end.py index 471b2ed0..1f97ed6b 100644 --- a/tests/integration/test_analysis_compare_end-end.py +++ b/tests/integration/test_analysis_compare_end-end.py @@ -60,3 +60,14 @@ def test_run_analysis_compare_with_skip_timeseries(): 'input_yml/integration_testing.yml', '--skip_timeseries'): main() + + +@patch('bgcval2.analysis_compare.main', new=wrapper(bgcval2.analysis_compare.main)) +@pytest.mark.usefixtures('test_create_files') +def test_run_analysis_compare_with_no_skip_timeseries(): + """Patch and run the whole thing.""" + bgcval2_test_data() + with arguments('analysis_compare', '-y', + 'input_yml/integration_testing.yml', + '--no-skip_timeseries'): + main() From c79c0454f367f43b8084a01a4816d4c4fd5e94db Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Thu, 10 Aug 2023 16:28:03 +0100 Subject: [PATCH 12/12] Update bgcval2/analysis_compare.py Co-authored-by: Valeriu Predoi --- bgcval2/analysis_compare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index 56217169..e1c3be68 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -556,7 +556,7 @@ def load_yml_and_run(compare_yml, config_user, skip_timeseries): do_mass_download = details['do_mass_download'] master_suites = details['master_suites'] - if skip_timeseries == None: + if skip_timeseries is None: pass else: do_analysis_timeseries = not skip_timeseries