Re: create and extract Lat lon variables netcdf data

From: fatkhuroyan - <izzaroyan_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 16 2013 - 03:05:02 MDT

Hi Mary, Thanks for your explanation, but I try to open other file for other region but there were error message : " fatal:Subscript out of range, error in subscript #0 fatal:An error occurred reading lon fatal:["Execute.c":7556]:Execute: Error occurred at or near line 57 in file read_CrefQC.ncl " Here I send the .png picture  as reference to construct the lat/lon array then I want to extract .nc file according to that picture to open the file, read off the pixel data and the data values, and print them out in Lat Lon, dBz values. Maybe, the Information from the file :                  :DataType = "SparseLatLonGrid" ;                 :Latitude = 7.874167 ;                 :Longitude = 93.14028 ;                 :LatGridSpacing = 0.005 ;                 :LonGridSpacing = 0.005 ; It mean that the Lat : 7.874167 and Lon : 93.14028 as the start point from the left top of the picture to construct the Lat/lon arrays. Once more, Can I overlay the .nc file on a map ? or add a map in the .nc file when i want to display that .nc file ? Thanks, Royan ________________________________ From: Mary Haley <haley_at_ucar.edu> To: fatkhuroyan - <izzaroyan_at_yahoo.com> Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> Sent: Tuesday, April 16, 2013 6:02 AM Subject: Re: create and extract Lat lon variables netcdf data Hi Royan, We suggest new users of NCL look at this page: http://www.ncl.ucar.edu/get_started.shtml and in particular the "Mini Reference Manual": http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf Meanwhile, if I understand your question, you simply want to open the file, read off the pixel data and the data values, and print them out? I tried reading your data, but there were some issues with it. First, a simple "ncdump" on the file indicates a missing value for the "SingleLayerCRefQC" array:                 :MissingData = -99900.f ; but when I tried to use this, I found values in your variable equal to -99903, which also seems like a missing value. So, I used -99903 instead of -99900. Secondly, it's not clear to me how to construct your lat/lon arrays. There is this information on your file:                 :DataType = "SparseLatLonGrid" ;                 :Latitude = 7.874167 ;                 :Longitude = 93.14028 ;                 :LatGridSpacing = 0.005 ;                 :LonGridSpacing = 0.005 ; But I'm not sure what the "Latitude" and "Longitude" attributes on the file mean. Also, I see these dimension names:    dimensions:       Lat = 935       Lon = 940       pixel = 70111 Here, I assume that "Lat" and "Lon" indicate the dimensions of a two-dimensional array? You will have to provide more information about how the lat/lon arrays are supposed to be constructed.   Maybe you can use something like:    lat = a_at_Latitude + ispan(0,934,1)*a_at_LatGridSpacing    lon = a_at_Longitude + ispan(0,939,1)*a_at_LonGridSpacing But again, I don't know how this ties into your pixel locations. I took a stab at guessing how the lat/lon arrays are supposed to be constructed, and even tried recreating the 2D sparse array to see what a plot looks like. See attached image and script. You will need to look over the construction of the lat/lon arrays carefully, if the information doesn't look correct. In particular, you will need to fix these lines: ;---Construct lat/lon arrays                                                       nlat = 935   nlon = 940   lat = a_at_Latitude  + ispan(0,nlat-1,1)*a_at_LatGridSpacing   lon = a_at_Longitude + ispan(0,nlon-1,1)*a_at_LonGridSpacing Also, I don't know for certain what xpixel and ypixel correspond to, so you may need to fix these lines as well:   dbz2d = new((/nlat,nlon/),typeof(dbz1d))   do n=0,npixel-1     dbz2d(ypixel(n),xpixel(n)) = dbz1d(n)   end do --Mary On Apr 15, 2013, at 3:28 AM, fatkhuroyan - wrote: Hi all, > > >Iam newbie in ncl and i have been searching far but  i couldn't find ! >could someone help me how to manage and to extract lon lat variable (dbz) so I know that i coud work out manually which pixels correspond to which location and its reflectivity value ? ( I want to make and  extract in :  Lat-Lon-dbz value). > > >Here I attach the files > > > >Thanks, > >Royan ><CrefQC.nc>_______________________________________________ >ncl-talk mailing list >List instructions, subscriber options, unsubscribe: >http://mailman.ucar.edu/mailman/listinfo/ncl-talk >

zoomBlueMarble_20130414_0008.png
Received on Tue Apr 16 03:11:47 2013

This archive was generated by hypermail 2.1.8 : Tue Apr 23 2013 - 12:54:13 MDT