|
Last change
on this file since 6016 was
6016,
checked in by yann meurdesoif, 3 months ago
|
|
Add new ecrad version from DWD ported onto OpenACC, closed from original ecrad ECMWF starting point for LMDZ ecrad version.
Modification from ecrad-lmdz version has been included.
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
|
File size:
958 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/env python3 |
|---|
| 2 | |
|---|
| 3 | def warn(*args, **kwargs): |
|---|
| 4 | pass |
|---|
| 5 | |
|---|
| 6 | import os, warnings |
|---|
| 7 | warnings.warn = warn |
|---|
| 8 | |
|---|
| 9 | from ecradplot import plot as eplt |
|---|
| 10 | |
|---|
| 11 | def main(input_srcfile, dstdir): |
|---|
| 12 | """ |
|---|
| 13 | Plot input files |
|---|
| 14 | """ |
|---|
| 15 | |
|---|
| 16 | if not os.path.isdir(dstdir): |
|---|
| 17 | os.makedirs(dstdir) |
|---|
| 18 | |
|---|
| 19 | #Get input file name |
|---|
| 20 | name_string = os.path.splitext(os.path.basename(input_srcfile))[0] |
|---|
| 21 | |
|---|
| 22 | dstfile = os.path.join(dstdir, name_string + ".png") |
|---|
| 23 | |
|---|
| 24 | print(f"Plotting inputs to {dstfile}") |
|---|
| 25 | eplt.plot_inputs(input_srcfile, dstfile=dstfile); |
|---|
| 26 | |
|---|
| 27 | if __name__ == "__main__": |
|---|
| 28 | import argparse |
|---|
| 29 | parser = argparse.ArgumentParser(description="Plot surface properties, atmospheric composition and clouds from input file to ecRAD.") |
|---|
| 30 | parser.add_argument("input", help="ecRAD input file") |
|---|
| 31 | parser.add_argument("--dstdir", help="Destination directory for plots", default="./") |
|---|
| 32 | args = parser.parse_args() |
|---|
| 33 | |
|---|
| 34 | main(args.input, args.dstdir) |
|---|
Note: See
TracBrowser
for help on using the repository browser.