CONTENTSI sent this patch to the author. It would be available as one of the supplement packages in near future. |
GMT package is very useful and powerful tool for geophisical researchers. GMT generates beautiful postscript formatted pictures. GMT has detail map data and can draw many map projections. When many meteorologist will draw wind fields, they would like to use "wind barb". However, they are limited only vector fields because GMT does not support wind barb fields.
Now, I make patch files drawing wind barb fields. If you will apply this patches, grdbarb command would be created. A sample of grdbarb is shown here. You also draw wind barb via psxy command ( using -Sr or -SR option ).
Download following patch file(s). If you want to get older version patch files, you can get them from the bottom of this page.
Target
GMT VersionFile Name Size Version 4.4.0 gmt4.5.9_barb_src.patch20130118 46.9kB 20130118 3.4.6 gmt_3.4.6_barb.patch_v0.5b4 27.8kB 20060522 gmt_3.4.6_man_barb.patch_v0.5b4 23.0kB Expand GMT files. (Note: If your netCDF library is > 4.0, please replace nc3 with nc4. )
% tar zxvf gmt-4.5.9.tar.bz2
% cd GMT4.5.9
% tar zxvf gshhg-gmt-nc3-2.2.2.tar.bz2
% mv gshhg-gmt-nc3-2.2.2/ share/coast/
Next, apply patch.
% cd GMT4.5.9
% patch -p1 < gmt4.5.9_barb_src.patch20130118
Next, do as normal GMT installation.
% ./configure
% make
% make install-gmt
% make install-data
% make install-man
% make install-doc
% make install-suppl
( if you want )
Please read README file which contain GMT packages in detail.
grdbarb
The source file of grdbarb made use of grdvector. So, if you have used grdvector, you can use grdbarb relative quickly. The differences of options between grdvector and grdbarb are
- no S options (in grdbarb),
- different Q option.
If you firstly use GMT or you have not used grdvector, please refer GMT online manual (man grdbarb).
grdbarb has many options. Here, I would explain only Q option that specify shape of wind barb.
- FORMAT -Q<barbwidth>/<barblength>/<barbangle>/<barbscale>
- SAMPLE
- -Q0.1i/0.2i/120/5
Q option needs 4 parameters, barbwidth is barb length, barblengeh is pillar of wind barb, barbangle is angle between barb and pillar, and barbscale is magnitude corresponding to one full barb. Please show top picture as referrence.
psxy / psxyz ( available in psxyz since GMT-4.1.2 )
If you would like to draw wind barb using psxy, you would use -S option. A letter following -S depends on the version of GMT as follows;
- GMT3.4.x GMT4.0
GMT4.1.1since
GMT4.1.2Options -Sr/-SR -Su/-SU -Swb/-SWB The input data file has 4 columns as vector plot (-Sv or -SV),
X Y angle lengthIf a capital is used ( ex. -SWB rather than -Swb ), psxy will expect azimuth and length and convert azimuths based on the chosen map projection. You also specify the wind barb shape as grdbarb,
-Swb<barbwidth>/<barblength>/<barbangle>/<barbscale>Explanation of each meaning refer above description ( see grdbarb ).
Currently, no binary packages are prepared.
These patches are still trial. If you have any question or comments, please give me an e-mail( mkato at pastel.ocn.ne.jp ; replace at with @ ).
- bug check
- detail description
- merge to original GMT (ambition)
Q: I have already installed GMT. So, Do I copy only grdbarb psxy, and psxyz ? A: No. You must re-install all barb-patched GMT package.