[gradsusr] EP-Flux
syairah atiqah atiq
syairahatiqah at yahoo.com
Tue Jun 13 04:17:01 EDT 2017
Dear expert,
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:
ga-> run E:\IMPORTANT\Desktop\Latest\EPFlux\EPF.gsNo hardcopy metafile openAll files closed; all defined objects released;All GrADS attributes have been reinitializedMost GrADS attributes have been resetError from CDIFF: Invalid dimension argument 2nd argument must be X, Y, Z, T or EOperation Error: Error from cdiff function Error ocurred at column 10DEFINE error: Invalid expression.493125748 [sig] opengrads 1224 open_stackdumpfile: Dumping stack trace to opengrads.exe.stackdump
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.
* To extract and calculate EP flux for HIP year and level* for 35 years and composite month MMJ* 7/5/2017 by Atiqah* ================================* 'reinit'* 'sdfopen E:\IMPORTANT\temp_uv_nlev.nc'** Selected Years during HIP[starting year of raw data: 1979]* ======================== y.1 = 1989 y.2 = 1993 y.3 = 1998 y.4 = 2008 y.5 = 2009 y.6 = 2010** (A) Obtain initial and final time for all parameters* at 6 years* -----------------------------------------------------* n=1 while (n <= 6)* 'mi=('y.n'- 1989)*12' 'd mi' tid=subwrd(result,4) ti.n=125+tid tf.n=127+tid n = n + 1 endwhile 'reset'* 'set gxout fwrite' 'set fwrite E:\IMPORTANT\Desktop\Latest\EPF.dat'** standard 11 atmospheric levels* ------------------------------* p.1=1000 p.2=850 p.3=700 p.4=600 p.5=500 p.6=400 p.7=300 p.8=250 p.9=200 p.10=150 p.11=100** (B) Extract the necessary data at each time step for all the levels* --------------------------------------------------------------------* n=1 while (n <= 6) m=1 while (m <= 11) 'set lev 'p.m 'set x 1 480'* 'cJa=ave(u,time=may1979,time=dec2013,12)' 'cJla=ave(u,time=jun1979,time=dec2013,12)' 'cAa=ave(u,time=jul1979,time=dec2013,12)' 'au'p.m'=(cJa+cJla+cAa)/3' 'au'y.n'=ave(u,t='ti.n',t='tf.n')' 'anomu'y.n'=au'y.n'- au'p.m* 'd anomu'y.n m=m+1 endwhile* m=1 while (m <= 11) 'set lev 'p.m 'set x 1 480'* 'cJb=ave(v,time=may1979,time=dec2013,12)' 'cJlb=ave(v,time=jun1979,time=dec2013,12)' 'cAb=ave(v,time=jul1979,time=dec2013,12)' 'av'p.m'=(cJb+cJlb+cAb)/3' 'av'y.n'=ave(v,t='ti.n',t='tf.n')' 'anomv'y.n'=av'y.n'- av'p.m* 'd anomv'y.n m=m+1 endwhile* m=1 while (m <= 11) 'set lev 'p.m 'set x 1 480'* 'cJc=ave(t,time=may1979,time=dec2013,12)' 'cJlc=ave(t,time=jun1979,time=dec2013,12)' 'cAc=ave(t,time=jul1979,time=dec2013,12)' 'aw'p.m'=(cJc+cJlc+cAc)/3' 'aw'y.n'=ave(t,t='ti.n',t='tf.n')' 'anomt'y.n'=aw'y.n'- aw'p.m* 'd anomt'y.n m=m+1 endwhile** EP-flux calculation for composite month in each year at different level* =======================================================================* m=1 while (m <= 11) 'set lev 'p.m 'set x 1 480'* 'fcor=2*7.292e-5*sin(lat*3.1416/180)' 'ae=6.37e6' 'grav=9.81' 'pi2=2*3.1416' 'sgk'y.n'=pow('p.m'/1000,0.286)' 'cs=cos(lat*3.1416/180)' 'tbar'y.n'=ave(anomt'y.n',lon=60,lon=90,-b)' 'tsgk'y.n'=tbar'y.n'/sgk'y.n 'stab'y.n'=(sgk'y.n'*cdiff(tsgk'y.n','p.m')/cdiff(100*'p.m','p.m'))' 'vpup'y.n'=ave(anomu'y.n'*(anomu'y.n'-ave(anomu'y.n',lon=60,lon=90,-b)),lon=60,lon=90,-b)' 'vptp'y.n'=ave(anomv'y.n'*(anomt'y.n'-ave(anomt'y.n',lon=60,lon=90,-b)),lon=60,lon=90,-b)' 'fphi'y.n'=-vpup'y.n'*cs*cs' 'fprs'y.n'=-fcor*ae*cs*cs*vptp'y.n 'd fphi'y.n 'd fprs'y.n'/stab'y.n m=m+1 endwhile* n=n+1* endwhile* 'disable fwrite'* clear()* 'reinit'*function clear()
say 'Hit <CR> to continue...'; pull ans; 'clear'
return*
Thank you in advance
AtiqahPostgraduate student Universiti Malaya,Malaysia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170613/87c51c30/attachment.html
More information about the gradsusr
mailing list