[Thread Prev][Thread Next][Index]

Re: [ferret_users] Calculate Transport between points not lying on a latitude or longitude




On 10/16/2012 8:16 AM, Paul Goddard wrote:
Hello to all,

I am trying to calculate transport between two points (near Jacksonville 80W,30N and Bermuda 65W,32N).  I have UO and VO data and want to calculate the transport passing through the line that connects them both.  From what I see in the FAQ, transport is not too difficult if the points have a latitude or longitude in common.  But for this case, I am stuck.  I imagine trig needs to be used to calculate the component vector of both UO and VO.  Thanks for any help!

Paul

==============================

Hi Paul,

[I will assume your underlying UO, VO variables are gridded model outputs on a lat-long-Z grid.  Also that you are fairly new to Ferret.]

There should be a script on your system called "vertical_section.jnl".  Try this from Ferret:
   
    yes? GO/HELP vertical_section

Apply this script to your UO and VO variables and you will get a gridded section of regularly spaced velocity points between your two endpoints, Jacksonville 80W,30N and Bermuda 65W,32N.   Then apply a rotation matrix to the resulting U,V pairs to find the component of velocity that is normal to the line between your endpoints.  (Use LET commands with SIN and COS functions to define a new variable normal_velocities_2d -- or some variant of this approach per your preference.)
R = \begin{bmatrix}
          \cos \theta & -\sin \theta \\
          \sin \theta & \cos \theta \\
          \end{bmatrix}
Then use @DIN as you showed in your email to integrate in 2d -- in Z and along the horizontal line you've defined.  Be careful about getting length units correct in the integration along the horizontal line.  In Ferret the way to be "careful" is to conduct a quick experiment.  For example, take your 2-dimensional field of normal velocities, and turn it into a field that is everywhere "1".  Then confirm that the horizontal integration gives you the length of the horizontal path in meters.
LET velocity_1 = 0 * normal_velocities_2d + 1
LIST/L=1 velocity_1[x=@DIN]
Insert suitable scale factors if it does not give you the desired path length.  Experimentation as the approach to "being careful" will leave you feeling confident that your result is correct.  I have not tried any of the above just now, so assume there are typos and minor logic errors.  Also note that the vertical_section.jnl script computes its grid points using bi-linear interpolation from the original lat-long grid (the Ferret function SAMPLE_XY).  This is probably not as precise as a modeler computing transport from first principles about the numerics of his/her grid.  So be aware that your answer is only "first order accurate".  (Which is still probably much more reliable than the underlying model itself  )

Note that once you have your integration working at a single time step, you need only name your time range of interest to plot a time series of the transport ( PLOT/T=1-jan-2010:1-jan:2012  my_transport ).

    Have fun Ferreting - Steve

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement