OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

Public Member Functions

def __init__ (self, dbfile=None, local=False)
 
def openDB (self)
 
def closeDB (self)
 
def create_db (self)
 
def insert_record (self, satfile=None, starttime=None, stoptime=None, dbstat=0, ancfile=None, ancpath=None, anctype=None, atteph=False)
 
def delete_record (self, filename, anctype=None, starttime=None)
 
def check_dbrtn_status (self, dbstat, anctype)
 
def check_file (self, filename, anctype=None, starttime=None)
 
def get_status (self, filename, atteph=False, starttime=None)
 
def get_filetime (self, filename, starttime=None)
 
def get_ancfiles (self, filename, atteph=False, starttime=None)
 

Public Attributes

 dbfile
 
 local
 
 conn
 
 cursor
 

Detailed Description

Definition at line 5 of file ancDB.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  dbfile = None,
  local = False 
)
A small set of functions to generate, update, and read from a local SQLite database of ancillary
file information

Definition at line 6 of file ancDB.py.

Member Function Documentation

◆ check_dbrtn_status()

def check_dbrtn_status (   self,
  dbstat,
  anctype 
)
Check the database return status.
DB return status bitwise values:
    all bits off means all is well in the world
    value of -1 means have not checked for ancfiles yet
    Ancillary:
bit 0 - missing one or more MET
bit 1 - missing one or more OZONE
bit 2 - missing SST
bit 3 - missing NO2
bit 4 - missing ICE
    Attitude-Ephemeris
bit 0 - predicted attitude selected
bit 1 - predicted ephemeris selected
bit 2 - no attitude found
bit 3 - no ephemeris found
bit 4 - invalid mission

Definition at line 145 of file ancDB.py.

◆ check_file()

def check_file (   self,
  filename,
  anctype = None,
  starttime = None 
)
Check database for existing file, return ID if exists

Definition at line 196 of file ancDB.py.

◆ closeDB()

def closeDB (   self)
Close the DB connection, committing changes.

Definition at line 25 of file ancDB.py.

◆ create_db()

def create_db (   self)
Create the ancillary DB

Definition at line 34 of file ancDB.py.

◆ delete_record()

def delete_record (   self,
  filename,
  anctype = None,
  starttime = None 
)
Deletes records from ancillary DB
If given a satellite filename, deletes all records associated with it
If given an ancillary filename and keyword anc is set true, deletes only that ancillary record

Definition at line 116 of file ancDB.py.

◆ get_ancfiles()

def get_ancfiles (   self,
  filename,
  atteph = False,
  starttime = None 
)
Return the ancillary files associated with a given input file

Definition at line 279 of file ancDB.py.

◆ get_filetime()

def get_filetime (   self,
  filename,
  starttime = None 
)
return the stored file start and stop times

Definition at line 261 of file ancDB.py.

◆ get_status()

def get_status (   self,
  filename,
  atteph = False,
  starttime = None 
)
Check the stored database return status

Definition at line 233 of file ancDB.py.

◆ insert_record()

def insert_record (   self,
  satfile = None,
  starttime = None,
  stoptime = None,
  dbstat = 0,
  ancfile = None,
  ancpath = None,
  anctype = None,
  atteph = False 
)
Insert record into ancillary DB

Definition at line 67 of file ancDB.py.

◆ openDB()

def openDB (   self)
Open connection to the ancillary DB and initiate a cursor

Definition at line 14 of file ancDB.py.

Member Data Documentation

◆ conn

conn

Definition at line 11 of file ancDB.py.

◆ cursor

cursor

Definition at line 12 of file ancDB.py.

◆ dbfile

dbfile

Definition at line 9 of file ancDB.py.

◆ local

local

Definition at line 10 of file ancDB.py.


The documentation for this class was generated from the following file:
  • /gfs-oceanweb/web/ocssw/ocssw_src/src/scripts/seadasutils/ancDB.py