# [ncl-talk] Fw:question about function wmstnm

Zhu CE lovingzhuce at 163.com
Tue Nov 4 21:10:25 MST 2014

```
Dear Mary,

Script I used is same as you, which I download from weather map example page.

Have you found that no matter 'UNT' be set as '0' or '1', the precipitation amount is still in imperial unit? I have showed the 'UNT=0' and 'UNT=1' figures in attachment. (where the precipitation is 40mm actually)

I also read the wmstnm.f source code, and I find that the code transform the precipitation amount from WMO code into imperial unit. The source code is showed as below. My questions here are if I want to use metric unit in precipitation, can I just change the source code and rebuilt the NCL? Or are there any other ways I can try?

Thanks a lot!

Ce Zhu

IF (IPRSNT(14).EQ.1 .AND. RRR.GT.0) THEN
IF (RRR .EQ. 990) THEN
CALL PLCHHQ(SYMPOS(1,14),SYMPOS(2,14),'T',SIZ,0.,0.)
GO TO 75
ENDIF
IF (RRR .GT. 990) THEN
INCHES = NINT(10.*REAL(RRR-990)/25.4)
ELSE
INCHES = NINT(100.*REAL(RRR)/25.4)
ENDIF
CHR5 = ' '
WRITE(CHR5,'(I5)') INCHES
LL = WMGTLN(CHR5,LEN(CHR5),1)
CALL PLCHHQ(SYMPOS(1,14),SYMPOS(2,14),CHR5(LL:LEN(CHR5)),
+              SIZ,0.,0.)
ENDIF

At 2014-11-05 00:36:23, "Mary Haley" <haley at ucar.edu> wrote:

Dear Ce Zhu,

It is helpful if you include a script that illustrates the problem.

I just took a weather map example from our examples page, modified it, and tried it with "UNT" set to 0, and then 1.

I don't know anything about this procedure to be honest, but I do see that I get some different numbers when I use UNT = 0 or 1.

--Mary

On Tue, Nov 4, 2014 at 8:07 AM, Zhu CE <lovingzhuce at 163.com> wrote:

Dear ncl-talk,

I tried to use wmstnm draw weather symbol. Function introduction says that it uses use imperial units as default, but when I set wmsetp("unt",2), the precipitation unit is still in imperial unit. Is there something I missed? (e.g. when RRR=991, it means precipitation amount is 0.1mm, but the wmstnm gives zero precipitation in weather symbol.)

Thanks a lot.

Ce Zhu

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141105/9983fe16/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UNT=0,1.png
Type: image/png
Size: 37989 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141105/9983fe16/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UNT=0,1.png
Type: image/png
Size: 37989 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141105/9983fe16/attachment-0001.png
```