I am using vertical profile nc data.taking some of the global attributes I want to make another nc data file. my .jnl scripts is as bellow:
def symb start=1
def symb end=23
def axis/t0=15-May-2009/t=1:23:1/unit=hours tax
repeat/range=($start):($end)/name=yy (;\
use daytime8.`yy`.nc;\
let lat1=..botlat;\
let lat2=..edmaxlat;\
let lon1=..botlon;\
let lon2=..edmaxlon;\
let month=..month;\
let edmax=..edmax;\
let lct=..botlct;\
let day=..day;\
if `yy eq 1` then ;\
list/file=
daytime8_ma20.nc/format=cdf/clob/l=`yy`/llimits=1:23 lat1,lat2,lon1,lon2,month,day,lct,edmax;\
else ;\
list/app/file=
daytime8_ma20.nc/format=cdf/clob/l=`yy` lat1,lat2,lon1,lon2,month,day,lct,edmax;\
endif ;\
can da/all ;\
)
data file
daytime8_ma20.nc created but with the parameters of 23(i.e. last data file) data file. But in a .dat the parameters of all 23 data file are created saved(if I remove the 'format=cdf" command).
Also I want to make a nc file with minlat<lat1,lat2<maxlat and minlon<lon1,lon2<maxlon with these 23 data file with a .jnl file as bellow:
def symb start=1
def symb end=2240
def axis/t0=1-Jan-2008/t=1:23:1/unit=hours tax
repeat/range=($start):($end)/name=yy (;\
use nighttime8.`yy`.nc;\
let lat1=..botlat;\
let lat2=..edmaxlat;\
let lon1=..botlon;\
let lon2=..edmaxlon;\
let month=..month;\
let edmax=..edmax;\
let lct=..botlct;\
let day=..day;\
let glat1=if lat1 lt 17 then 0 else lat1 ;\
let glon1=if lon1 lt 83 then 0 else lon1 ;\
let glat2=if lat2 lt 17 then 0 else lat2 ;\
let glon2=if lon2 lt 83 then 0 else lon2 ;\
if `glat1 le 27 and glon1 le 93` then ;\
list/file=
nighttime8_ma19.nc/format=cdf/clob/l=`yy`/llimits=1:23 glat1,glon1,glat2,glon2,month,day,lct,edmax;\
elif `glat2 le 27 and glon2 le 93` then;\
list/app/file=
nighttime8_ma19.nc/format=cdf/clob/l=`yy` glat1,glon1,glat2,glon2,month,day,lct,edmax;\
else ;\
list/file=nighttime8_ma20.dat/head/clob/l=`yy` glat1,glon1,glat2,glon2,month,day,lct,edmax;\
endif ;\
can da/all ;\
)
I think in last .jnl scripts the if -then else have some problem. Ples.any one help me.