[ncl-talk] getting latitude writing on axis wrong

Debasish Hazra debasish.hazra5 at gmail.com
Fri Jun 30 05:53:54 MDT 2023


Looking at previous examples with RAP files, I found the following defined
in resources as
res at mpLambertParallel1F    = lon2d at Latin1
   res at mpLambertParallel2F    = lon2d at Latin2
   res at mpLambertMeridianF     = lon2d at Lov
   res at mpCenterLonF           = lon2d at Lo1
   res at mpCenterLatF           = lon2d at La1

There is no Latin1 or Latin2 info in the grib2 file I am dealing with, but
has Lov, Lo1 and La1 . Any suggestion where to get that info ?

Thanks
Deba

On Thu, Jun 29, 2023 at 2:27 PM Debasish Hazra <debasish.hazra5 at gmail.com>
wrote:

> Hi Rick,
> Thanks for your reply. When I turned
> res at tfDoNDCOverlay = False
> got the following error
>
>  check_for_y_lat_coord: Warning: Data either does not contain
> (0)     a valid latitude coordinate array or doesn't contain one at all.
> (0)     A valid latitude coordinate array should have a 'units'
> (0)     attribute equal to one of the following values:
> (0)         'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
> (0)     check_for_lon_coord: Warning: Data either does not contain
> (0)     a valid longitude coordinate array or doesn't contain one at all.
> (0)     A valid longitude coordinate array should have a 'units'
> (0)     attribute equal to one of the following values:
> (0)         'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
> warning:ContourPlotDraw: out of range coordinates encountered; standard
> AreaFill rendering method may be unreliable;
>  consider setting the resource trGridType to "TriangularMesh" if
> coordinates contain missing values
>
> Debasish
>
> On Thu, Jun 29, 2023 at 2:13 PM Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Hi Debasish,
>>
>> I'm a little confused by this line:
>>
>>     res at tfDoNDCOverlay = True
>>
>> Should that be False?  If that doesn't help, if you can send me the
>> dataset, I'll try to figure out what is going on.
>>
>> Rick
>>
>>
>> On Thu, Jun 29, 2023 at 12:01 PM Debasish Hazra via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Hi,
>>> I am trying to plot grib2 file with Lambert projection and getting wrong
>>> latitude markers (0-25 N) on the y-axis. Attached is figure and code and
>>> also highlighting attributes from the file.
>>>
>>>  file global attributes:
>>>    dimensions:
>>>       ygrid_0 = 3268
>>>       xgrid_0 = 5200
>>>
>>>       float gridrot_0 ( ygrid_0, xgrid_0 )
>>>          long_name :    vector rotation angle
>>>          GridType :     Polar Sterographic Projection (North or South)
>>>          units :        radians
>>>          formula_u :    Uearth = sin(rot)*Vgrid + cos(rot)*Ugrid
>>>          formula_v :    Vearth = cos(rot)*Vgrid - sin(rot)*Ugrid
>>>          note1 :        u and v components of vector quantities are
>>> resolved relative to grid
>>>          note2 :        apply formulas to derive u and v components
>>> relative to earth
>>>
>>>       float gridlat_0 ( ygrid_0, xgrid_0 )
>>>          corners :      ( -4, -5.706548, 18.53903, 22.48842 )
>>>          long_name :    latitude
>>>          grid_type :    Polar Sterographic Projection (North or South)
>>>          units :        degrees_north
>>>          Dy :   3.17
>>>          Dx :   3.17
>>>          Lov :  245
>>>          Lo1 :  206.5
>>>          La1 :  -4
>>>
>>>       float gridlon_0 ( ygrid_0, xgrid_0 )
>>>          corners :      ( -153.5, -74.4254, -22.46207, 152.2681 )
>>>          long_name :    longitude
>>>          grid_type :    Polar Sterographic Projection (North or South)
>>>          units :        degrees_east
>>>          Dy :   3.17
>>>          Dx :   3.17
>>>          Lov :  245
>>>          Lo1 :  206.5
>>>          La1 :  -4
>>>
>>> Any help on this is appreciated.
>>> Thanks
>>> Deba
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at mailman.ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230630/43c33cf2/attachment.htm>


More information about the ncl-talk mailing list