<div dir="ltr"><div>vr(ntim,klev,nlat,mlon) ==> dimension numbers (0,1,2,3)</div><div> flat(nlat)<br></div>-----<br><div> va = vr + <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml"><b>conform</b></a>(vr, flat, 2) ) ; flat matched the '2-th' dimension of 'vr'</div><div><br></div><div><div> va@long_name = "absolute vorticity"</div><div> va@units = "per second<div> <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarCoords.shtml"><b>copy_VarCoords</b></a>(u, va)</div><div> <br></div><div>or overwrite rather than create a new variable</div><div><br></div><div><div> vr = vr + <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml"><b>conform</b></a>(vr, flat, 2) ) ; flat matched the '2-th' dimension of 'vr'</div><div><br></div><div><div> vr@long_name = "absolute vorticity"</div><div> vr@units = "per second<div> <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarCoords.shtml"><b>copy_VarCoords</b></a>(u, vr)</div></div></div></div></div></div><div>"</div><div><br></div><div>Good luck<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 8, 2019 at 2:11 AM Lyndz <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div>I am calculating vorticity tendency using the following equation (also attached in this email):</div><div>I want to add the coriolis parameter (1D) and the calculated relative vorticity (4D) before calculating its advection. These two parameters have dimensions.<br></div><div><br></div><div><div><img src="cid:ii_jrvtp09c1" alt="Screenshot from 2019-02-08 18-02-16.png" width="318" height="238"><br></div></div><div><br></div><div><br></div><div>Below is the part that calculates the vorticity using spherical harmonics and the coriolis parameter.</div><div><div>;************************************************</div><div>; variable and file handling</div><div>;************************************************</div><div> f = addfile("../<a href="http://ncep_6h_jan.nc" target="_blank">ncep_6h_jan.nc</a>","r") ; open netcdf file</div><div> u = f->U_GRD_2_ISBL(:,:,:,:) ; pull u off file</div><div> v = f->V_GRD_2_ISBL(:,:,:,:) ; pull v off file</div><div> u = u(:,:,::-1,:) ;for speherical harmonics</div><div> v = v(:,:,::-1,:)</div><div>;************************************************</div><div>; calculate vorticity on a Fixed Grid</div><div>;************************************************</div><div><b><font color="#ff0000"> vr = uv2vrF_Wrap(u,v)</font></b></div><div> printVarSummary(vr)</div><div><br></div><div> vr@long_name = "vorticity"</div><div> vr@units = "per second"</div><div>;************************************************</div><div>;calculate coriolis parameter</div><div>;************************************************</div><div> lat = vr&lat</div><div><b><font color="#ff0000"> flat = coriolis_param(lat)</font></b></div></div><div><br></div><div>[1] I apologize, I think this is a basic question. How do add the coriolis parameter to the calculated vorticity? I already know how to get the advection, I only got stuck in this part. </div><div><br></div><div>I'll appreciate any help.</div><div><br></div><div><br></div><div>Sincerely,</div><div><br></div><div><div dir="ltr" class="gmail-m_5879078058015952487gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="comic sans ms, sans-serif"><b><u>Lyndz</u></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>