<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1497341540589_2794">Dear expert,</div><div id="yui_3_16_0_1_1497341540589_2794"><br></div><div id="yui_3_16_0_1_1497341540589_2794" dir="ltr">I attempt to calculate composite anomaly EP-Flux for selected years at different level.However, when I run the script the the window shows an error:</div><div id="yui_3_16_0_1_1497341540589_2794" dir="ltr"><br></div><div id="yui_3_16_0_1_1497341540589_2794" dir="ltr"> ga-> run E:\IMPORTANT\Desktop\Latest\EPFlux\EPF.gs</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2901">No hardcopy metafile open</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2902">All files closed; all defined objects released;</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2903">All GrADS attributes have been reinitialized</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2904">Most GrADS attributes have been reset</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2905">Error from CDIFF: Invalid dimension argument</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2906"> 2nd argument must be X, Y, Z, T or E</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2907">Operation Error: Error from cdiff function</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2908"> Error ocurred at column 10</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2909">DEFINE error: Invalid expression.</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2910">493125748 [sig] opengrads 1224 open_stackdumpfile: Dumping stack trace to opengrads.exe.stackdump</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2910"><br></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2910">Below are the script that I used. Please anyone help me. I really dont know what to do and I very knew to this software.</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_2910"><br></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3120">* To extract and calculate EP flux for HIP year and level</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3121">* for 35 years and composite month MMJ</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3122">* 7/5/2017 by Atiqah</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3123">* ================================</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3124">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3125"> 'reinit'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3126">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3127"> 'sdfopen E:\IMPORTANT\temp_uv_nlev.nc'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3128">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3129">* Selected Years during HIP[starting year of raw data: 1979]</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3130">* ========================</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3131"> y.1 = 1989</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3132"> y.2 = 1993 </div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3133"> y.3 = 1998</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3134"> y.4 = 2008</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3135"> y.5 = 2009</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3136"> y.6 = 2010</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3137">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3138">* (A) Obtain initial and final time for all parameters</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3139">* at 6 years</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3140">* -----------------------------------------------------</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3141">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3142"> n=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3143"> while (n <= 6)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3144">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3145"> 'mi=('y.n'- 1989)*12'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3146"> 'd mi'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3147"> tid=subwrd(result,4)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3148"> ti.n=125+tid</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3149"> tf.n=127+tid </div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3150"> n = n + 1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3151"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3152"> 'reset'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3153">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3154"> 'set gxout fwrite'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3155"> 'set fwrite E:\IMPORTANT\Desktop\Latest\EPF.dat'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3156">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3157">* standard 11 atmospheric levels</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3158">* ------------------------------</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3159">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3160"> p.1=1000</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3161"> p.2=850</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3162"> p.3=700</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3163"> p.4=600</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3164"> p.5=500</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3165"> p.6=400</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3166"> p.7=300</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3167"> p.8=250</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3168"> p.9=200</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3169"> p.10=150</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3170"> p.11=100</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3171">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3172">* (B) Extract the necessary data at each time step for all the levels</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3173">* --------------------------------------------------------------------</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3174">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3175"> n=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3176"> while (n <= 6)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3177"> m=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3178"> while (m <= 11)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3179"> 'set lev 'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3180"> 'set x 1 480'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3181">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3182"> 'cJa=ave(u,time=may1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3183"> 'cJla=ave(u,time=jun1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3184"> 'cAa=ave(u,time=jul1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3185"> 'au'p.m'=(cJa+cJla+cAa)/3'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3186"> 'au'y.n'=ave(u,t='ti.n',t='tf.n')'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3187"> 'anomu'y.n'=au'y.n'- au'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3188">* 'd anomu'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3189"> m=m+1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3190"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3191">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3192"> m=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3193"> while (m <= 11)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3194"> 'set lev 'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3195"> 'set x 1 480'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3196">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3197"> 'cJb=ave(v,time=may1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3198"> 'cJlb=ave(v,time=jun1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3199"> 'cAb=ave(v,time=jul1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3200"> 'av'p.m'=(cJb+cJlb+cAb)/3'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3201"> 'av'y.n'=ave(v,t='ti.n',t='tf.n')'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3202"> 'anomv'y.n'=av'y.n'- av'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3203">* 'd anomv'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3204"> m=m+1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3205"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3206">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3207"> m=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3208"> while (m <= 11)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3209"> 'set lev 'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3210"> 'set x 1 480'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3211">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3212"> 'cJc=ave(t,time=may1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3213"> 'cJlc=ave(t,time=jun1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3214"> 'cAc=ave(t,time=jul1979,time=dec2013,12)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3215"> 'aw'p.m'=(cJc+cJlc+cAc)/3'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3216"> 'aw'y.n'=ave(t,t='ti.n',t='tf.n')'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3217"> 'anomt'y.n'=aw'y.n'- aw'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3218">* 'd anomt'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3219"> m=m+1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3220"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3221">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3222">* EP-flux calculation for composite month in each year at different level</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3223">* =======================================================================</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3224">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3225"> m=1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3226"> while (m <= 11)</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3227"> 'set lev 'p.m</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3228"> 'set x 1 480'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3229">* </div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3230"> 'fcor=2*7.292e-5*sin(lat*3.1416/180)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3231"> 'ae=6.37e6'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3232"> 'grav=9.81'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3233"> 'pi2=2*3.1416'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3234"> 'sgk'y.n'=pow('p.m'/1000,0.286)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3235"> 'cs=cos(lat*3.1416/180)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3236"> 'tbar'y.n'=ave(anomt'y.n',lon=60,lon=90,-b)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3237"> 'tsgk'y.n'=tbar'y.n'/sgk'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3238"> 'stab'y.n'=(sgk'y.n'*cdiff(tsgk'y.n','p.m')/cdiff(100*'p.m','p.m'))'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3239"> 'vpup'y.n'=ave(anomu'y.n'*(anomu'y.n'-ave(anomu'y.n',lon=60,lon=90,-b)),lon=60,lon=90,-b)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3240"> 'vptp'y.n'=ave(anomv'y.n'*(anomt'y.n'-ave(anomt'y.n',lon=60,lon=90,-b)),lon=60,lon=90,-b)'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3241"> 'fphi'y.n'=-vpup'y.n'*cs*cs'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3242"> 'fprs'y.n'=-fcor*ae*cs*cs*vptp'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3243"> 'd fphi'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3244"> 'd fprs'y.n'/stab'y.n</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3245"> m=m+1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3246"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3247">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3248"> n=n+1</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3249">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3250"> endwhile</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3251">* </div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3252"> 'disable fwrite'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3253">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3254"> clear()</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3255">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3256"> 'reinit'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3257">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3258">function clear()</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3259"><br id="yui_3_16_0_1_1497341540589_3260"></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3261"> say 'Hit <CR> to continue...'; pull ans; 'clear'</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3262"><br id="yui_3_16_0_1_1497341540589_3263"></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3264">return</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">*</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265"><br></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265"><br></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">Thank you in advance</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265"><br></div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">Atiqah</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">Postgraduate student </div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">Universiti Malaya,</div><div dir="ltr" id="yui_3_16_0_1_1497341540589_3265">Malaysia</div></div></body></html>