Re: meteogram from grib2 file

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat Sep 07 2013 - 07:08:59 MDT

Please read NCL'se documentation:

    http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml
    Example 6

    Learn the various options ofr future use.

==========
Also, the documentaion for
   http://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml

ncl_filedump -itime ....grb2 | less

==========

L0ok at the various 'time' variables

Read/look at:
     http://www.ncl.ucar.edu/Applications/time_labels.shtml

On 9/7/13 6:57 AM, Luis Fernando Montana Roa wrote:
> Hi Mary,
> Thank you for your suggestions. Another question: If each GRIB2 read file
> has a single time step, ┐how can I create the time reference for the
> meteogram?
> Thanks
>
> -- Fernando
>
> On Fri, Sep 6, 2013 at 12:20 PM, Mary Haley <haley@ucar.edu> wrote:
>
>> Hi Luis,
>>
>> Your script is one that assumes you have a WRF-ARW file. The GRIB2 file
>> you attached doesn't have any file attribute information on it, so I'm not
>> sure it is a proper WRF-ARW file.
>>
>> Usually, with WRF-ARW files, you have all kinds of file attributes, like
>> MAP_PROJ, GRID_TYPE, DX, DY, TITLE, START_DATE, etc.
>>
>> Some of the wrf_user_xxxx functions depend on these global attributes in
>> order to get the map projection information.
>>
>> You are trying to use "wrf_user_ll_to_ij", which depends on this attribute
>> information, but can't find it.
>>
>> Also, you are trying read "Times" off the file, which doesn't exist on the
>> file.
>>
>> Rule #1: Look at your data:
>>
>> ncl_filedump
>> grid_WRF_20130904-060000_ECOLOMBIA_F00080000_Pideam_R4km.grb2
>>
>> This file does not have 2-dimensional lat/lon, but rather 1-dimensional
>> lat/lon coordinate arrays. You shouldn't even need to use
>> wrf_user_ll_to_jj. You can simply use lat/lon coordinate arrays:
>>
>> t2_point = t2({lat},{lon}) ; extract a time series at a point
>> pres_point = pres({lat},{lon})
>> tc_point = tc({lat},{lon})
>> u_point = umet({lat},{lon})
>> v_point = vmet({lat},{lon})
>>
>>
>> However, the other issue is your "lon" value is not in the range of the
>> longitude values on the file. They go from 0 to 360, and you are using a
>> lon of -74.15. Add 360 to this, and it should work.
>>
>> lon = 285.85 ; -74.15 + 360
>>
>> This script still has issues, because you are referencing variables as if
>> they are WRF ARW variables with "bottom_top" dimensions, which doesn't
>> exist on this file. Therefore, this part of the script fails as well:
>>
>> ; Swap the dimensions as we want to plot time on the X axis later
>> tt = tc_point(bottom_top|:,Time|:)
>> ugrid = u_point(bottom_top|:,Time|:)
>> vgrid = v_point(bottom_top|:,Time|:)
>>
>> I don't have time to try to get this code working, so please try to debug
>> some of these issues yourself.
>>
>> You may want to consider using a "generic" meteogram code, instead of a
>> WRF-ARW one. See the example at:
>>
>> http://www.ncl.ucar.edu/Applications/meteo.shtml
>>
>> --Mary
>>
>>
>>
>> On Sep 5, 2013, at 9:13 PM, Luis Fernando Montana Roa wrote:
>>
>>> Hi, I'm trying to plot a meteogram from GRIB2 files (such as attached).
>>> When I run the script, shows the following errors:
>>> ...
>>> warning:Attempt to reference attribute (MAP_PROJ) which is undefined
>>> warning:Attempt to reference attribute (TRUELAT1) which is undefined
>>> warning:Attempt to reference attribute (TRUELAT2) which is undefined
>>> warning:Attempt to reference attribute (STAND_LON) which is undefined
>>> warning:Attempt to reference attribute (DX) which is undefined
>>> warning:Attempt to reference attribute (DY) which is undefined
>>> fatal:The result of the conditional expression yields a missing value.
>> NCL can not determine branch, see ismissing function
>>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 2262 in
>> file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>>>
>>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 21 in
>> file meteogram02.ncl
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> -- Fernando
>>>
>> <meteogram02.ncl><grid_WRF_20130904-060000_ECOLOMBIA_F00080000_Pideam_R4km.grb2>_______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Sep 7 07:09:04 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT