[gradsusr] gsfpath bug?

KODAMA Chihiro kodamac at jamstec.go.jp
Mon Mar 30 05:06:13 EDT 2015


Dear GrADS developers,

I encountered an trouble of gsfpath() function, and may found a bug in
the (nearly) latest GrADS.

GrADS script which includes gsfpath(), say,
  ...
  rc = gsfallow('on')
  rc = gsfpath('dir1 dir2')
  ...
never stops (I found it with GrADS ver. 2.1.a2).

It seems that the following line around line 3065 in gscrpt.c,
  while (j<i) *(pcmn->ppath+j) = *(pvar->strng+j);
, should be replaced with
  while (j<i) { *(pcmn->ppath+j) = *(pvar->strng+j); j++; }
to avoid infinite loop. I did not carefully read the whole source code,
and my understanding may be wrong. (if so, please teach me!)

I hope it may help improve GrADS.

Sincerely,

Chihiro Kodama

-- 
=====================================================
KODAMA Chihiro, Ph.D.
Dept. Seamless Environmental Prediction Research
Japan Agency for Marine-Earth Science and Technology
PHONE: +81-45-778-5623 (direct)
URL:   http://kodama.fubuki.info/
=====================================================



More information about the gradsusr mailing list