[ncl-talk] unrotate grib2 data projected into polar stereographic projection

Juliette Lapeyre Juliette.Lapeyre at USherbrooke.ca
Thu Jan 11 11:22:02 MST 2018


Thank you Denis,


I understand better now!


Juliette

________________________________
De : Dennis Shea <shea at ucar.edu>
Envoyé : lundi 8 janvier 2018 18:46:15
À : Juliette Lapeyre
Cc : ncl-talk at ucar.edu
Objet : Re: [ncl-talk] unrotate grib2 data projected into polar stereographic projection

The:

         formula_u :    Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid
         formula_v :    Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid

Are for 'directional' quantities (eg: vectors): the {U/V}grid are the wind components on the rotated grid. *IF* you had vector quantities these equations must be used to transform to winds relative to the earth's poles.

===
Your file(s) contain scalar quantities. Hence, no rotation need be performed.

Use gridlat_0 and gridlon_0 for plotting

   f    = addfile("CMC_RDPA_APCP...grib2", "r")
                                                                    ;  APCP_P8_L1_GST0_acc6h  attributes include
                                                                    :  type_of_statistical_processing :       Accumulation
                                                                    ;  statistical_process_duration : 6 hours (ending at forecast time)
   p6 = f->APCP_P8_L1_GST0_acc6h       ; ( ygrid_0, xgrid_0 )
   printVarSummary(p6)
   print(MinMax(p6, 0)

; plot

    p6 at lat2d  = f->gridlat_0   ; for plotting only
    p6 at lon2d = f->gridlon_0

====
Also, just for fun try

%> ncl_filedump CMC_RDPA_APCP...grib2 -itime   | less

The -itime will add a time (record) dimension

APCP_P8_L1_GST0_acc6h ( initial_time0_hours, ygrid_0, xgrid_0 )

It will also add time information.

Good luck



On Mon, Jan 8, 2018 at 9:01 AM, Juliette Lapeyre via ncl-talk <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>> wrote:

Hi,


I am using grib2 data from the RDPA CaPA project (https://weather.gc.ca/grib/grib2_RDPA_ps10km_e.html) and I would like to change the polar stereographic projection to NAD 83/UTM zone 14.


I can that there are three variables that I should  use (gridrot_0, gridlat_0, gridlon_0) but I don't understand how to apply the formulas indicated in gridrot_0 (see below). What are exactly Vearth, Vgrid, Uearth and Ugrid ? I guess "rot" is the value of grid_rot for each coordinate ?


Thanks,


Juliette


    gridrot_0
           Size:       493x399
           Dimensions: xgrid_0,ygrid_0
           Datatype:   single
           Attributes:
                       note2     = 'apply formulas to derive u and v components relative to earth'
                       note1     = 'u and v components of vector quantities are resolved relative to grid'
                       formula_v = 'Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid'
                       formula_u = 'Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid'
                       units     = 'radians'
                       GridType  = 'Polar Sterographic Projection (North or South)'
                       long_name = 'vector rotation angle'
    gridlat_0
           Size:       493x399
           Dimensions: xgrid_0,ygrid_0
           Datatype:   single
           Attributes:
                       La1       = 32.5
                       Lo1       = 225
                       Lov       = 249
                       Dx        = 15
                       Dy        = 15
                       units     = 'degrees_north'
                       grid_type = 'Polar Sterographic Projection (North or South)'
                       long_name = 'latitude'
                       corners   = [3.25e+01 2.45e+01 4.63e+01 6.52e+01]
    gridlon_0
           Size:       493x399
           Dimensions: xgrid_0,ygrid_0
           Datatype:   single
           Attributes:
                       La1       = 32.5
                       Lo1       = 225
                       Lov       = 249
                       Dx        = 15
                       Dy        = 15
                       units     = 'degrees_east'
                       grid_type = 'Polar Sterographic Projection (North or South)'
                       long_name = 'longitude'
                       corners   = [-1.35e+02 -7.24e+01 -2.10e+01  1.59e+02]




_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180111/ca542b98/attachment.html>


More information about the ncl-talk mailing list