<div dir="ltr">Hi All:<div><br></div><div>I found some problems with vhaeC (vector spherical harmonics analysis) and vhseC (vector spherical harmonics synthesis), and am hoping someone can confirm them with me. The major issue is that the reconstructed u has discontinuity and reconstructed (u,v) shows up at the wrong occasions.</div><div><br></div><div>Problem A:</div><div>When the original two-dimensional u and v are on 721x1440 fixed grid</div><div>bc = vhaeC(u,v)</div><div>According to the manual, bc has the dimension (4,nlat,N), where</div><div>              N=minimum[nlat,nlon/2] if nlon is even</div><div>              N=minimum[nlat,(nlon+1)/2] if nlon is odd</div><div>Therefore, in my case, N is 720. However, I find N to be 721 when I use vhaeC, because N has to accommodate zonal wavenumber m=0,720. In other words, the value of N in practice is inconsistent with the manual.</div><div><br></div><div>Problem B (see NCL code - test_vhseC_n0m0.ncl in the attachment):</div><div>If I reconstruct (u,v) using vhseC, it is as simple as</div><div>ReUV=vhseC(bc,nlon)</div><div>ReU=ReUV(0,:,:)</div><div>ReV=ReUV(1,:,:)</div><div>For n=0, ReU and ReV are always 0. This can be seen when I put bc(:,0,:)=1 nlon=1440 into vhseC and check the output ReUV. Does this mean vhseC can not reconstruct global mean (u,v)?</div><div><br></div><div>Problem C (see NCL code - test_vhseC_n1m0.ncl - and its output figure - test_vhseC_n1m0.pdf - in the attachment):</div><div>According to the manual for vhaeC (<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/vhaeC-1.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/vhaeC-1.shtml</a>),</div><div>bc(0,nlat,N) contains the &quot;real&quot; coefficient [u]</div><div>bc(1,nlat,N) contains the &quot;imaginary&quot; coefficient [u]<br></div><div>bc(2,nlat,N) contains the &quot;real&quot; coefficient [v]<br></div><div>bc(3,nlat,N) contains the &quot;imaginary&quot; coefficient [v]<br></div><div>However, if I set bc(0:1,1,0)=1 and nlon=1440, and then throw them into vhseC, I get v field, instead of u field. Also, if I set bc(2:3,1,0)=1 and nlon=1440, and then throw them into vhseC, I get u field, instead of v field. This is exactly opposite to the manual&#39;s statement, unless I misunderstood it.</div><div><br></div><div>Problem D (see NCL code - test_vhseC_n1m1.ncl - and its output figure - test_vhseC_n1m1.pdf - in the attachment):</div><div>If bc(0:1,1,1)=1 and nlon=1440 thrown into vhseC, I get both u and v field, even though I am supposed to only get u. If bc(2:3,1,1)=1 and nlon=1440 thrown into vhseC, I get both u and v, even though I am supposed to only get v. The bc(0:1,1,1)=1 case and bc(2:3,1,1) case seem to be orthogonal to each other, which is good, but the output from the latter shows discontinuous u at the poles.</div><div><br></div><div>Sorry for the long post, but I am just trying to make the questions clear.</div><div><br></div><div>Any help is appreciated. If there is really a problem with the two functions - vhaeC and vhseC, whom should I report it to?</div><div><br></div><div>Thank you very much.</div><div><br></div><div>Best Regards,</div><div>Jih-Wang (Aaron) Wang</div></div>