[ncl-talk] Trouble plotting 2D lat/lon data from NSIDC
Anne
anne.seidenglanz at unive.it
Mon Oct 23 14:06:15 MDT 2017
Hi Rick,
thanks for getting back to me. I do get a plot which however looks
distorted (see attached).
Yes the xgrid and ygrid are the x-offset and y-offset in meters of the
projection grid centers (taken from http://nsidc.org/data/
G02202#daily-projection-var, under the tab 'user guide').
For example reading in the latitude gives the following:
Variable: latitude
Type: double
Total Size: 1089536 bytes
136192 values
Number of Dimensions: 2
Dimensions and sizes: [ygrid | 448] x [xgrid | 304]
Coordinates:
ygrid: [5837500..-5337500]
xgrid: [-3837500..3737500]
Number Of Attributes: 5
standard_name : latitude
long_name : latitude
units : degrees_north
valid_range : ( 0, 90 )
_FillValue : -999
and equivalent for longitude. Printing the single values gives reasonable
results:
(0) 31.9602770108575
(1) 32.1115587186697
(2) 32.2628753734599
(3) 32.4142244216501
(4) 32.5656032790591
However there remains a problem with the plotting:
"warning:ScalarFieldSetValues: 2d coordinate array sfXArray has an
incorrect dimension size: defaulting sfXArray" comes when I set
'res at sfXArray' and 'res at sfYArray'
Without setting these resources:
"(0) check_for_y_lat_coord: Warning: Data either does not contain a valid
latitude coordinate array or doesn't contain one at all."
So definitely there is a problem with the coordinates. I don't which
function or resource can handle this problem in NCL.
I attached also the printVarSummary of the sea ice concentration variable.
thanks in advance
Anne
On 23 October 2017 at 17:36, Rick Brownrigg <brownrig at ucar.edu> wrote:
> Hi,
>
> Are you having trouble georeferencing the plot, or not getting any sort of
> plot at all. From the printVarSummary, it looks like the x/y coordinates
> are in meters on the ground, relative to some polar stereographic
> cartographic projection. Is there any sort of other metadata describing the
> projection? If you are able to share the file, I can to take a look.
> Otherwise, what is the output of a print-statement on the file-variable
> that reads this grid?
>
> Rick
>
> On Mon, Oct 23, 2017 at 9:27 AM, Anne <anne.seidenglanz at unive.it> wrote:
>
>> Hello everybody,
>>
>> I have a problem plotting data that have 2D latitude/longitude dimensions
>> (in particular monthly sea ice concentration in the Arctic from the NSIDC,
>> National Snow and Ice Data Center), even though I have used the
>>
>> res at sfXArray = lon2d
>> res at sfYArray = lat2d
>>
>> resources as I have done earlier for another case (traingular ocean grid)
>> which worked fine, however not so in this case.This is the information I
>> got about the grid:
>> "The grid is in the NSIDC Sea Ice Polar Stereographic [North/South]
>> projection. This is an irregular grid in that the latitude and longitude
>> are 2-dimensional arrays, where the x and the y component are specified by
>> xgrid and ygrid component (see below)"
>>
>> This is part of the the printVarSummary of the variable:
>>
>> Variable:* seaice_conc_monthly_cdr*
>> Type: byte
>> Total Size: 46441472 bytes
>> 46441472 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [time | 341] x *[ygrid | 448]* x *[xgrid | 304]*
>> Coordinates:
>> time: [141195..151544]
>> * ygrid: [5837500..-5337500]*
>> * xgrid: [-3837500..3737500]*
>> Number Of Attributes: 14
>> ...
>>
>>
>> I managed to convert time into a useful date using the cd_calender
>> function, but was not successful with the latitude and longitude (neither
>> with ascribing explicitly latitude and longitude to the 2nd and 3rd
>> coordinate dimension, respectively).
>>
>> Did I overlook something?
>>
>> Thanks in advance,
>> Anne
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> 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/20171023/38e7c732/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata 2017-10-23 alle 22.00.00.png
Type: image/png
Size: 343029 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171023/38e7c732/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printVarSummary(seaice_conc).rtf
Type: application/rtf
Size: 1348 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171023/38e7c732/attachment-0001.rtf>
More information about the ncl-talk
mailing list