MPAS-JEDI
JediDBArgs.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
3 # static parameter
4 default_path='../Data'
5 
6 # command-line parameters
7 obsFKey = 'ObsSpace'
8 geoFKey = 'geoval'
9 diagFKey = 'ObsDiag'
10 fPrefixes = {
11  obsFKey: 'obsout',
12  geoFKey: 'geoval',
13  diagFKey: 'ydiags',
14 }
15 
16 def add_arguments(parser):
17  global obsFKey, geoFKey, diagFKey, fPrefixes
18  parser.add_argument("-o", "--oPrefix", default = fPrefixes[obsFKey],
19  help="prefix for ObsSpace files")
20  parser.add_argument("-g", "--gPrefix", default = fPrefixes[geoFKey],
21  help="prefix for GeoVaLs files")
22  parser.add_argument("-d", "--dPrefix", default = fPrefixes[diagFKey],
23  help="prefix for ObsDiagnostics files")
24 
25 def parse_args(args):
26  global fPrefixes
27  fPrefixes = {
28  obsFKey: args.oPrefix,
29  geoFKey: args.gPrefix,
30  diagFKey: args.dPrefix,
31  }
def parse_args(args)
Definition: JediDBArgs.py:25
def add_arguments(parser)
Definition: JediDBArgs.py:16