You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Included '--ulevels' command line argument/ option to allow user to specify their own list of levels. It should be between 50-1000hPa levels only.
Removed `_version.py` file from the source. This would be created automatically during build process.
Update to Documentation to reflect two added options.
Works on both Linux [](https://svgshare.com/i/Zhy.svg)and Windows [](https://svgshare.com/i/ZhY.svg). Mac OS [](https://svgshare.com/i/ZjP.svg) support is available via `conda`.
Status of Documentation [](https://wrfplot.readthedocs.io/en/latest/?badge=latest)
Details of PyPi package [](https://pypi.python.org/pypi/wrfplot/)[](https://pepy.tech/project/wrfplot)
8
8
9
-

9
+
Status of builds 
10
+
11
+
Conda details 
10
12
11
13
## About wrfplot
12
14
@@ -22,11 +24,26 @@ Documentation of this project is located at https://wrfplot.readthedocs.io.
22
24
23
25
A typical use case of wrfplot would be to include as part of your WRF model run framework to plotting of variables immediately after the model run is completed. The other use case would be to use it for producing publication quality 2D maps which does not much tweaking for your publication.
24
26
25
-
## Installation
27
+
## Installation on all Platforms (Windows, Linux and Mac OS)
28
+
29
+
Support for all platforms is provided through `conda-forge`. If you have already conda installed, then following command is enough to install `wrfplot`:
30
+
31
+
```
32
+
conda install -c cond-forge wrfplot
33
+
```
34
+
Check your installation by typing following command which should show the version number:
35
+
36
+
```
37
+
wrfplot --version
38
+
0.1.0
39
+
```
40
+
26
41
27
-
Since it is intended to be used as command line, the application is distributed as stand-alone on both Linux and Windows. You must download the correct version of application installer or setup file. Both are described below:
42
+
## Binary (standalone) Installation
28
43
29
-
### Windows
44
+
Since it is intended to be used as command line, the application is also distributed as stand-alone on both Linux and Windows. You must download the correct version of application installer or setup file. Both are described below:
45
+
46
+
### Windows Only
30
47
31
48
Go to https://github.com/wxguy/wrfplot/releases and look for latest release. The Windows setup executable will have name `wrfplot-windows-64bit.exe`. Click on the link and download it to local disk. The rest of the installation procedure is same as you do for any other windows setup files. Once installed Check if installation is successful by typing following command in `cmd` window which should not produce any errors:
32
49
@@ -35,9 +52,9 @@ wrfplot --version
35
52
0.1.0
36
53
```
37
54
38
-
### Linux
55
+
### Linux Only
39
56
40
-
Go to https://github.com/wxguy/wrfplot/releases and look for latest release. The Linux installer will have name `wrfplot-linux-64bit.run`. Click on the link and download it to local disk. Thereafter execute the below command (assuming that the Linux installer is downloaded at `~/Downloads`):
57
+
You must have at least `Ubuntu 22.04` or above for this to work. There is no additional packages or admin rights are required to install this package. Go to https://github.com/wxguy/wrfplot/releases and look for latest release. The Linux installer will have name `wrfplot-linux-64bit.run`. Click on the link and download it to local disk. Thereafter execute the below command (assuming that the Linux installer is downloaded at `~/Downloads`):
41
58
42
59
```
43
60
bash ~/Downloads/wrfplot-linux-64bit.run
@@ -65,6 +82,10 @@ wrfplot --version
65
82
0.1.0
66
83
```
67
84
85
+
### Mac OS Only
86
+
87
+
At the moment, Mac OS support is not available in binary format. You can install `wrfplot` using method mentioned above.
88
+
68
89
## How to use?
69
90
70
91
Please refer to https://wrfplot.readthedocs.io for complete documentation on how to use `wrfplot` application.
@@ -74,12 +95,12 @@ Please refer to https://wrfplot.readthedocs.io for complete documentation on how
74
95
75
96
Add following command line options:
76
97
77
-
*`--levels `:To plot upper level data as per user defined levels
78
-
*`--cmap`: Use user provided colour map
79
-
*`--contours` : Control contour levels
98
+
*~~`--cmap`: Use user provided colour map~~
99
+
*~~`--ulevels `:To plot upper level data as per user defined upper levels~~
100
+
*`--clevels ` : Control contour levels
80
101
*`--animation` : Create animation for specific variable(s) in GIF for max compatibility
81
-
*`--fig-format`: Save image in specific file format
82
-
*`--list-fig-format` : List all supported image file format
102
+
*`--save-format`: Save image in specific file format
103
+
*`--list-save-format` : List all supported image file format
Copy file name to clipboardexpand all lines: docs/usage.rst
+21-3
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
How to use wrfplot
3
3
==================
4
4
5
+
Basic Usage
6
+
~~~~~~~~~~~~
7
+
5
8
The first step in plotting diagnostic variable to find what all variables are supported by ``wrfplot`` application. This is required as the application would accept variable names only in certain string format. Therefore, you should list and review the name of variable by issuing following command in terminal::
6
9
7
10
$ wrfplot --list-vars
@@ -53,7 +56,7 @@ Looking at the above output, you will understand that it looks similar to what i
53
56
54
57
Now, lets go ahead and start plotting the variable "2m Relative Humidity" named as "rh2"::
*** Initialising plotting for variable : "rh2" ***
59
62
@@ -66,12 +69,27 @@ In the above command, we have provided three options where:
66
69
67
70
* ``--input`` is the path to WRF model output NetCDF file.
68
71
* ``--output`` is the path to output directory where the plotted images are required to be saved. If the path to directory does not exist, then wrfplot will try to create it.
69
-
* ``--var`` is the variable name we need the wrfplot to plot.
72
+
* ``--vars`` is the variable name we need the wrfplot to plot.
70
73
71
74
When the wrfplot start plotting the variable for all times, you can see the progress of operation through progress bar at the bottom of terminal. The plotted output for variable will look like below:
You can see from the above image that all the required fields such as title, colour map, colour bar range, model cycle and forecast validity are automatically picked up by wrfplot. Now onwards, you can only change the ``--var`` with different name to plot new variables.
80
+
You can see from the above image that all the required fields such as title, colour map, colour bar range, model cycle and forecast validity are automatically picked up by wrfplot. Now onwards, you can only change the ``--vars`` with different name to plot new variables.
81
+
82
+
Plotting Upper Atmospheric Variables
83
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
+
85
+
`wrfplot` supports a few upper atmospheric variables. These variables are indicated with ``u_`` tag for ease of identification. By default, the plot for upper atmospheric variables would be plotted for ``925, 850, 700, 600, 500, 400, 300 & 200hPa``. The upper levels can be controlled using ``--ulevels`` though. If you want to plot upper winds, you can specify the variable with following command::
Note that the wrf output file resolution is very high. However, `wrfplot` automatically calculates the correct resolution and size to fit the wind barbs within plot area. The above command would produce the plot as indicated above. Only 400hPa level plot is indicated below to ensure that page is not loaded with only images.
90
+
91
+
.. image:: _static/images/u_winds_400hpa.png
92
+
:width:800
93
+
:alt:Alternative text
94
+
95
+
You can also control various par of plotting with additional command line options. They are described in next page.
"--list-vars", action="store_true", help="List variables supported by wrfplot."
@@ -444,7 +444,7 @@ def _praser():
444
444
parser.add_argument(
445
445
"--list-cmaps",
446
446
action="store_true",
447
-
help="List colour maps (cmaps) supported by wrfplot.",
447
+
help="List colour maps (cmaps) supported by wrfplot. Refer https://pratiman-91.github.io/colormaps for information on each colourmaps.",
448
448
)
449
449
parser.add_argument(
450
450
"--cmap",
@@ -453,6 +453,12 @@ def _praser():
453
453
default=False,
454
454
help="Valid colormap name to fill colors. Use '--list-cmaps' option to see list of supported colormaps. Must have minimum 11 colors, else will lead to error.",
455
455
)
456
+
parser.add_argument(
457
+
"--ulevels",
458
+
metavar="<upper-levels>",
459
+
type=arguments.validate_ulevels,
460
+
help="Provide custom upper level(s) when plotting upper atmospheric data. Each level is to be seperated by ',' i.e., '925,850,700'. Use '--list-vars' to know list of supported upper level variables.",
0 commit comments