[Thread Prev][Thread Next][Index]

[ferret_users] extraction of var



HI
  I  have 500 data files.Using these data file I want to extract some parameters with in 10 to 14 pm from  global attributes of the data files with the .jnl script as bellow:
 def symb start=1
def symb end=500
def axis/t0=15-May-2009/t=1:500:1/unit=hours tax
repeat/range=($start):($end)/name=yy (;\
use may`yy`.nc;\
let lat1=..botlat;\
let lat2=..edmaxlat;\
let lon1=..botlon;\
let lon2=..edmaxlon;\
let alt1=..edmaxalt;\
let month=..month;\
let edmax=..edmax;\
let lct=..botlct;\
let day=..day;\
if ` lct1 ge 10 and lct1 le 14` then ;\
let lat11=lat1+0*t[gt=tax];\
let lat12=lat2+0*t[gt=tax];\
let lon11=lon1+0*t[gt=tax];\
let lon12=lon2+0*t[gt=tax];\
let alt=alt1+0*t[gt=tax];\
let month1=month+0*t[gt=tax];\
let edmax1=edmax+0*t[gt=tax];\
let lct1=lct+0*t[gt=tax];\
let day1=day+0*t[gt=tax];\
let ed135=if elec_dens[x=70:700:0.001] lt 0 then 0 else elec_dens[x=70:700:0.001]*10^6;\
let ed_tec1=ed135[x=70:200@din]+0*t[gt=tax];\
let ed_tec2=ed135[x=200:350@din]+0*t[gt=tax];\
list/file=mday9_ma22.nc/format=cdf/clob/l=`yy`/llimits=1:500 lat11,lat12,lon11,lon12,alt,month1,day1,lct1,edmax1,ed_tec1,ed_tec2;\
else ;\
list/app/file=mday9_ma22.nc/format=cdf/clob/l=`yy` lat11,lat12,lon11,lon12,alt,month1,day1,lct1,edmax1,ed_tec1,ed_tec2;\
endif ;\
can da/all ;\
)
***************************************
The result is as follwes;
!-> repeat/range=1:500/name=yy (;use may`yy`.nc;let lat1=..botlat;let lat2=..edmaxlat;let lon1=..botlon;let lon2=..edmaxlon;let alt1=..edmaxalt;let month=..month;let edmax=..edmax;let lct=..botlct;let day=..day;if ` lct1 ge 10 and lct1 le 14` then ;let lat11=lat1+0*t[gt=tax];let lat12=lat2+0*t[gt=tax];let lon11=lon1+0*t[gt=tax];let lon12=lon2+0*t[gt=tax];let alt=alt1+0*t[gt=tax];let month1=month+0*t[gt=tax];let edmax1=edmax+0*t[gt=tax];let lct1=lct+0*t[gt=tax];let day1=day+0*t[gt=tax];let ed135=if elec_dens[x=70:700:0.001] lt 0 then 0 else elec_dens[x=70:700:0.001]*10^6;let ed_tec1=ed135[x=70:200@din]+0*t[gt=tax];let ed_tec2=ed135[x=200:350@din]+0*t[gt=tax];list/file=mday9_ma22.nc/format=cdf/clob/l=`yy`/llimits=1:500 lat11,lat12,lon11,lon12,alt,month1,day1,lct1,edmax1,ed_tec1,ed_tec2;else ;list/app/file=mday9_ma22.nc/format=cdf/clob/l=`yy` lat11,lat12,lon11,lon12,alt,month1,day1,lct1,edmax1,ed_tec1,ed_tec2;endif ;can da/all ;)
!-> REPEAT: YY:1
 !-> SET DAT/FORM=CDF may1.nc
 **ERROR: invalid command: grave accent doesnt evaluate to scalar
           lct1 ge 10 and lct1 le 14
if ` lct1 ge 10 and lct1 le 14` then
Command file, command group, or REPEAT execution aborted
***********************************
How can I solve this issue
Also I want to impose same condition to lat11 and lon11 to extract the parameters.

Ples. help me  to solve this problem.
thanks in advance.
Gopal

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement