FV3 Bundle
plotFields.py
Go to the documentation of this file.
1 #!/usr/local/bin/python
2 # (C) Copyright 2009-2016 ECMWF.
3 #
4 # This software is licensed under the terms of the Apache Licence Version 2.0
5 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 # In applying this licence, ECMWF does not waive the privileges and immunities
7 # granted to it by virtue of its status as an intergovernmental organisation nor
8 # does it submit to any jurisdiction.
9 
10 
11 import QgPlot
12 import QgRead
13 
14 #fdbdir="/home/rd/dai/Data/FDB"
15 fdbdir="/home/da/dasg/Data/FDB"
16 attributes = {}
17 attributes["expver"] = "example"
18 attributes["validitydate"] = "2010-01-01T00:00:00Z"
19 
20 #truth
21 #attributes["referencedate"] = "2009-12-15T00:00:00Z"
22 #attributes["type"] = "truth"
23 
24 #bg
25 #attributes["type"] = "fc"
26 #attributes["referencedate"] = "2009-12-31T00:00:00Z"
27 
28 #an
29 attributes["type"] = "an"
30 attributes["referencedate"] = "2010-01-02T00:00:00Z"
31 
32 # Read the fields
33 
34 qgReader = QgRead.QgRead()
35 
36 pv, psi = qgReader.readFields(fdbdir,attributes)
37 
38 # Plot the fields
39 
40 qgplt = QgPlot.QgPlot()
41 
42 qgplt.plot(pv,psi)