OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
ncattredit Namespace Reference

Variables

string callseq = sys.argv[0] + ' file ' + 'attr-file'
 
 inFile = sys.argv[1]
 
 attrFile = sys.argv[2]
 
 rootgrp = nc.Dataset(inFile, 'a')
 
 processtime = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%dT%H:%M:%S')
 
string history = nc.Dataset.getncattr(rootgrp,'history').rstrip() + '\n'+'['+processtime+'] '+os.path.basename(sys.argv[0])+ ' ' + sys.argv[1] + ' ' + sys.argv[2]
 
 attrs = open(attrFile,'r')
 
 attrName = parts.pop()
 
 attrValue = attrValue.rstrip()
 
 group = rootgrp
 
 parts = attrName.split('/')
 
string attrGroup = '/'.join(parts).strip()
 
 attrValueExisting = nc.Dataset.getncattr(group,attrName)
 
 partsStr = attrValue.split(',')
 

Variable Documentation

◆ attrFile

attrFile = sys.argv[2]

Definition at line 24 of file ncattredit.py.

◆ attrGroup

string attrGroup = '/'.join(parts).strip()

Definition at line 44 of file ncattredit.py.

◆ attrName

attrName = parts.pop()

Definition at line 37 of file ncattredit.py.

◆ attrs

attrs = open(attrFile,'r')

Definition at line 34 of file ncattredit.py.

◆ attrValue

attrValue = attrValue.rstrip()

Definition at line 37 of file ncattredit.py.

◆ attrValueExisting

attrValueExisting = nc.Dataset.getncattr(group,attrName)

Definition at line 52 of file ncattredit.py.

◆ callseq

string callseq = sys.argv[0] + ' file ' + 'attr-file'

Definition at line 12 of file ncattredit.py.

◆ group

group = rootgrp

Definition at line 39 of file ncattredit.py.

◆ history

string history = nc.Dataset.getncattr(rootgrp,'history').rstrip() + '\n'+'['+processtime+'] '+os.path.basename(sys.argv[0])+ ' ' + sys.argv[1] + ' ' + sys.argv[2]

Definition at line 30 of file ncattredit.py.

◆ inFile

inFile = sys.argv[1]

Definition at line 23 of file ncattredit.py.

◆ parts

parts = attrName.split('/')

Definition at line 41 of file ncattredit.py.

◆ partsStr

partsStr = attrValue.split(',')

Definition at line 68 of file ncattredit.py.

◆ processtime

processtime = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%dT%H:%M:%S')

Definition at line 28 of file ncattredit.py.

◆ rootgrp

rootgrp = nc.Dataset(inFile, 'a')

Definition at line 25 of file ncattredit.py.