From dc595a6424736682fb7dbd97d4791f16b699108b Mon Sep 17 00:00:00 2001 From: Stephen Po-Chedley Date: Wed, 16 Aug 2023 08:37:12 -0700 Subject: [PATCH] add nimbus support --- xsearch/__init__.py | 2 +- xsearch/search.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xsearch/__init__.py b/xsearch/__init__.py index a4ec43a..d010ee7 100644 --- a/xsearch/__init__.py +++ b/xsearch/__init__.py @@ -12,7 +12,7 @@ import os # version -__version__ = "0.0.5" +__version__ = "0.0.6" # since this software is installed centrally and may be updated # this section of code stores the xsearch version in a hidden diff --git a/xsearch/search.py b/xsearch/search.py index 8ea101e..24ff5d3 100755 --- a/xsearch/search.py +++ b/xsearch/search.py @@ -140,6 +140,7 @@ def findPaths(experiment, deduplicate=True, printDuplicates=False, lcpath=False, + nimbuspath=False, filterRetired=True, filterRetracted=True, filterIgnored=True, @@ -159,6 +160,7 @@ def findPaths(experiment, where version is the string version_id, timepoints is the number of time steps, and creation_date is the creation date in the dataset header lcpath Bool: flag to denote whether search is on an LC system (data path is different on LC systems) + nimbuspath Bool: flag to denote search is on an Nimbus system (data path is different on Nimbus) deduplicate Bool: flag to de-duplicate datasets for the same model/realization filterRetracted Bool: flag to ignore retracted datasets (if True; default True) filterIgnored Bool: flag to ignore datasets marked as ignored (if True; default True) @@ -178,6 +180,8 @@ def findPaths(experiment, fn = jsonDir + experiment + '/' + variable + '.json' if lcpath: fn = fn.replace('/p/', '/p/climate/') + if nimbuspath: + fn = fn.replace('/p/', '/home/jovyan/local-data/') # load data files = glob.glob(fn) # loop over all json files and store