Re: how can I print the coordinate information of the array in WRF OUTPUT FILE in NC format ?

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 21 2012 - 13:04:50 MST

Note that the attributes of the U variable include an attribute called "coordinates". This contains the names of (some of) the coordinate variables
associated with the variables. So if you just want to print coordinate information you can just look at the variables XLONG_U and XLAT_U for
the horizontal coordinates.
 -dave

On Feb 21, 2012, at 12:52 PM, Mary Haley wrote:

> You can't use NCL coordinate array syntax ({xx}) when dealing with WRF-ARW data, because this data has two-dimensional lat/lon arrays.
>
> Try using wrf_user_ll_to_ij to get the i,j index values into the part of the array you need:
>
> http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml
>
> --Mary
>
> On Feb 20, 2012, at 8:32 AM, Jie Tang wrote:
>
>> here I want to indict or print the coordinate information of the array in WRF OUTPUT FILE.
>> For example:
>>
>> I have such a wrf with the variables:
>> Variable: U
>> Type: float
>> Total Size: 26680320 bytes
>> 6670080 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [Time | 6] x [bottom_top | 30] x [south_north | 192] x [west_east_stag | 193]
>> Coordinates:
>> Time: not a coordinate variable
>> bottom_top: not a coordinate variable
>> south_north: not a coordinate variable
>> west_east_stag: not a coordinate variable
>> Number of Attributes: 6
>> FieldType : 104
>> MemoryOrder : XYZ
>> description : x-wind component
>> units : m s-1
>> stagger : X
>> coordinates : XLONG_U XLAT_U
>>
>> I want to print the bottom_top information.
>> aa=wrffile->U
>> print(aa&bottom_top )
>> But the error message said that :
>> fatal:No coordinate variable exists for dimension (bottom_top) in variable (aa)
>>
>> Here how may I to print and modify the information of bottom_top ?
>>
>>
>> --
>> TANG Jie
>> Email: totangjie@gmail.com
>> Tel: 0086-2154896104
>> Shanghai Typhoon Institute,China
>> _______________________________________________
>> 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 Tue Feb 21 13:05:01 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 10:01:53 MST