[ncl-talk] U and V components rotation

李嘉鹏 lijpbasin at 126.com
Tue Oct 28 05:54:35 MDT 2014


Hi, `$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl` provides an example on how `cone` is calculated. Here's the code snippet.

         cone = 1.
         if( map_projection .eq. 1) then    ; Lambert Conformal mapping
           if( (fabs(true_lat1 - true_lat2) .gt. 0.1) .and.  \
               (fabs(true_lat2 - 90. )      .gt. 0.1)       ) then
               cone = log(cos(true_lat1*radians_per_degree)) \
                     -log(cos(true_lat2*radians_per_degree))
               cone = cone/( log(tan(( 45. -fabs(true_lat1/2.))*radians_per_degree)) - \
                             log(tan((45. -fabs(true_lat2/2.))*radians_per_degree)) )
           else
               cone = sin(fabs(true_lat1)*radians_per_degree)
           end if
         end if
         if(map_projection .eq. 2) then      ; polar stereographic
           cone = 1.
         end if
         if(map_projection .eq. 3) then      ; Mercator
           cone = 0.
         end if






At 2014-10-28 17:14:11, maxpalma at fastwebnet.it wrote:
>Dear Sir or Madame,
>
>I am writing because i have problem with a rotation of a u, v components.
>
>I know that u and v must be rotated together, using something like this: 
>   uNew = u*cos(rot) - v*sin(rot) 
>   vNew = u*sin(rot) + v*cos(rot) 
>but in my case, i don't have the rotation angle (rot).
>
>How can I rotate the components?
>
>I found the function  wrf_uvmet,  but i did't understand it very well, and i don
>'t know if this function is the solution of my problem.
>
>The result of the "ncdump -h" of my file "tauvo" ( v component for example, for 
>u is the same) is: 
>
>variables:
>
>double lon(y, x) ;
>lon:standard_name = "longitude" ;
>lon:long_name = "Longitude" ;
>lon:units = "degrees_east" ;
>lon:_CoordinateAxisType = "Lon" ;
>
>double lat(y, x) ;
>lat:standard_name = "latitude" ;
>lat:long_name = "Latitude" ;
>lat:units = "degrees_north" ;
>lat:_CoordinateAxisType = "Lat" ;
>
>double time(time) ;
>time:standard_name = "time" ;
>time:units = "hours since 2012-01-01 00:00:00" ;
>time:calendar = "standard" ;
>
>double tauvo(time, y, x) ;
>tauvo:standard_name = "tauvo" ;
>tauvo:long_name = "surface_downward_y_stress" ;
>tauvo:units = "N/m2" ;
>tauvo:coordinates = "lon lat" ;
>
>
>Can I use this wrf_uvmet function with these variables? I have only these..
>How can I use this function? What is "cen_lon" and "cone"? I don't have these in
>formations..
>
>I would be most grateful if you could give me also a practical examples..
>
>Thank you very much!
>
>Yours faithfully
>
>Massimiliano Palma
> 
>
>_______________________________________________
>ncl-talk mailing list
>List instructions, subscriber options, unsubscribe:
>http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list