cachu's page


Last modified: Tue May 22 19:17:45 JST 2007


GMT Wind barb extension

[Japanese]

CONTENTS

I sent this patch to the author. It would be available as one of the supplement packages in near future.

Sample

INTRODUCTION

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 ).

INSTALL

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 Version
File NameSizeVersion
4.4.0 gmt4.5.9_barb_src.patch2013011846.9kB 20130118
3.4.6 gmt_3.4.6_barb.patch_v0.5b427.8kB 20060522
gmt_3.4.6_man_barb.patch_v0.5b423.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.

USAGE

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

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.1
since
GMT4.1.2
Options -Sr/-SR -Su/-SU -Swb/-SWB

The input data file has 4 columns as vector plot (-Sv or -SV),

X  Y  angle length

If 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 ).

BINARY PACKAGES

Currently, no binary packages are prepared.

CAUTION

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 @ ).

TODO

Q & A

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.

HISTORY

ACKNOWLEDGE

- Hiigaki san
patch for GMT-4.1.x and comments
- LE LAY Patrick san
patch about southern hemisphere
- Sato san
comment on the bug
- Suzuki san
comment on the bug

PATCH FILES OF OLDER VERSIONs

Target
GMT Version
File Name Size Version
4.4.0 gmt4.4.0_barb_src.patch2009022446.3kB 20090224
4.2.1 gmt4.2.1_barb_src.patch2007121144.1kB 20071211
4.2.0 gmt4.2.0_barb_src.patch2007052131.6kB 20070521
gmt4.2.0_barb_man.patch2007051911.5kB
4.1.4 gmt4.1.4_barb_src.patch2007052130.7kB 20070521
gmt4.1.2_barb_man.patch2006052211.5kB
4.1.3 gmt4.1.3_barb_src.patch2006060130.5kB 20060601
gmt4.1.2_barb_man.patch2006052211.5kB
4.1.2 gmt4.1.2_barb_src.patch2006052230.3kB 20060522
gmt4.1.2_barb_man.patch2006052211.5kB
4.1.1 gmt4.1.1_barb_patch.diff35.9kB 0.6
gmt4.1.1_barb_man_patch.diff10.5kB
4.0 gmt4.0_barb_patch.diff27.8kB 0.6
gmt4.0_barb_man_patch.diff10.8kB
3.4.5 gmt_3.4.5_barb.patch_v0.5b327.1kB 0.5b3
gmt_3.4.5_man_barb.patch_v0.5b38.0kB
3.4.4 gmt_3.4.4_barb.patch_v0.5b326.5kB 0.5b3
gmt_3.4.4_man_barb.patch_v0.5b37.5kB
3.4.3 gmt_3.4.3_barb.patch_v0.5b326.5kB 0.5b3
gmt_3.4.3_man_barb.patch_v0.5b37.5kB
3.4.2 gmt_3.4.2_barb.patch_v0.5b326.4kB 0.5b3
gmt_3.4.2_man_barb.patch_v0.5b37.5kB
3.4.1 gmt_3.4.1_barb.patch_v0.5b326.4kB 0.5b3
gmt_3.4.1_man_barb.patch_v0.5b37.5kB
3.1.1 gmt_3.1.1_bulb.patch_v0.4b239.4kB0.4b2
3.2 ---

by mkato@pastel.ocn.ne.jp