5 from pathlib
import Path
7 IODA_CONV_PATH = Path(__file__).parent/
"@SCRIPT_LIB_PATH@"
8 if not IODA_CONV_PATH.is_dir():
9 IODA_CONV_PATH = Path(__file__).parent/
'..'/
'lib-python'
10 sys.path.append(
str(IODA_CONV_PATH.resolve()))
12 import wrfda_ncdiag
as wrfdad
14 parser = argparse.ArgumentParser(
15 description=(
'Test for WRFDA netCDF diag file to IODA Obs files converters'))
16 parser.add_argument(
'-i',
'--input',
17 help=
"name of input file",
18 type=str, required=
True)
19 parser.add_argument(
'-o',
'--output',
20 help=
"output directory",
21 type=str, required=
True)
22 parser.add_argument(
'-t',
'--type',
23 help=
"type of input file",
24 type=str, required=
True)
25 args = parser.parse_args()
29 if (args.type ==
'rad'):
30 diag = wrfdad.Radiances(infile)
34 diag.toIODAobs(outdir)