[2393] | 1 | # PyNCplot |
---|
| 2 | # Python to manage netCDF files. |
---|
| 3 | # From L. Fita work in different places: CCRC (Australia), LMD (France) |
---|
| 4 | # More information at: http://www.xn--llusfb-5va.cat/python/PyNCplot |
---|
| 5 | # |
---|
| 6 | # pyNCplot and its component nc_var.py comes with ABSOLUTELY NO WARRANTY. |
---|
| 7 | # This work is licendes under a Creative Commons |
---|
| 8 | # Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0) |
---|
| 9 | # |
---|
| 10 | ## Python script to indepdententy test different components |
---|
| 11 | ## L. Fita, CIMA. |
---|
| 12 | ####### ####### ##### ##### #### ### ## # |
---|
| 13 | |
---|
[2691] | 14 | from optparse import OptionParser |
---|
[2393] | 15 | import numpy as np |
---|
| 16 | from netCDF4 import Dataset as NetCDFFile |
---|
| 17 | import os |
---|
| 18 | import re |
---|
[2691] | 19 | import subprocess as sub |
---|
[2393] | 20 | import numpy.ma as ma |
---|
[2691] | 21 | import matplotlib as mpl |
---|
| 22 | mpl.use('Agg') |
---|
| 23 | from matplotlib.pylab import * |
---|
| 24 | import matplotlib.pyplot as plt |
---|
| 25 | from mpl_toolkits.basemap import Basemap |
---|
| 26 | |
---|
[2692] | 27 | # Importing generic tools file 'generic_tools.py' and the others |
---|
[2393] | 28 | import generic_tools as gen |
---|
| 29 | import nc_var_tools as ncvar |
---|
[2692] | 30 | import drawing_tools as drw |
---|
| 31 | import diag_tools as diag |
---|
| 32 | import geometry_tools as geo |
---|
| 33 | |
---|
| 34 | # Importing Fortran modules and the others |
---|
[2393] | 35 | import module_ForDef as fdef |
---|
[2692] | 36 | import module_ForDiag as fdiag |
---|
[2393] | 37 | import module_ForGen as fgen |
---|
| 38 | import module_ForSci as fsci |
---|
| 39 | |
---|
[2691] | 40 | parser = OptionParser() |
---|
| 41 | parser.add_option("-x", "--Xx", dest="x", help="x", metavar="X") |
---|
| 42 | (opts, args) = parser.parse_args() |
---|
[2393] | 43 | |
---|
[2718] | 44 | ####### ####### |
---|
| 45 | ## MAIN |
---|
| 46 | ####### |
---|
[2691] | 47 | |
---|
[2718] | 48 | |
---|
[2393] | 49 | # Testing Fortran tws |
---|
| 50 | print fdiag.module_fordiagnosticsvars.var_tws_s11.__doc__ |
---|
| 51 | t = 20. + 273.15 |
---|
| 52 | hur = 0.5 |
---|
| 53 | print fdiag.module_fordiagnosticsvars.var_tws_s11(t, hur) |
---|
| 54 | |
---|
| 55 | quit() |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | #quit() |
---|
| 59 | |
---|