Skip to content

Commit

Permalink
Variable extraction complete - osx
Browse files Browse the repository at this point in the history
  • Loading branch information
durack1 committed Dec 2, 2016
1 parent 3a50b74 commit 5e878d9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/python/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pcmdi_metrics
import cdat_info
import hashlib
import subprocess

value = 0
cdms2.setNetcdfShuffleFlag(value) # where value is either 0 or 1
Expand Down Expand Up @@ -114,6 +115,24 @@ def provenanceGrab(self):
#Out[21]: True
#os.access('/',os.W_OK)
#Out[22]: False

# Platform
platform = os.uname()
platformId = [platform[0], platform[2], platform[1]]
osAccess = [os.access('/', os.W_OK), os.access('/', os.R_OK)]
# Python
# conda (platform/conda-env/conda-build/python/root env/default env)

# Conda meta
p = subprocess.Popen('conda info', stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd='./', shell=True)
condaInfo = p.stdout.read()
p.terminate()
if p.stderr.read() = '':
for
# PMP

# CDP

# PMP version
# PMP obs version
# CDP version
Expand All @@ -130,6 +149,9 @@ def provenanceGrab(self):
# vtk version

provenance = {}
provenance['platformId'] = platformId
provenance['osAccess'] = ['Root write: ',osAccess[0], '; Root read: ',osAccess[1]]
provenance['condaEnv'] =
return provenance

def setTargetGrid(self, target, regridTool="esmf", regridMethod="linear"):
Expand Down

0 comments on commit 5e878d9

Please sign in to comment.