[ncl-talk] problem plotting a specific region of the bathymetry in polar stereographic projection

Francesco Trotta francesco.trotta4 at unibo.it
Sun Feb 26 17:51:49 MST 2017


Dear Ncl-Team
   I'm using NCL - version 6.3.0.
   I have netcdf file representing the bathymetry of all greenLand
   I would like to do a countor map of a specific region of the bed topography (below there is a file description)
   but this file is mapped in polar_stereographic and  the
   the variable bed is define on Cartesian x and y coordinate and not in lon and lat.

   I applied polar plot like this

   res            = True                          ; plot mods desired
   res at gsnPolar   = "NH"                          ; specify the hemisphere
   plot = gsn_csm_contour_map_polar(wks,u,res)    ; create the plot

   but it is not working. It give me this error:


(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' 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 a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' 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'

   How can I then convert the the cartesian x,y coordinate in a regular lat,lon degree grid?

   I would be grateful is somebody could assist me.
   Thanks.

Francesco


/===============================
   netcdf BedMachineGreenland-2017-02-01 {
dimensions:
x = 10018 ;
y = 17946 ;
variables:
char mapping ;
mapping:geoid = "eigen-6c4" ;
mapping:false_easting = 0. ;
mapping:false_northing = 0. ;
mapping:grid_mapping_name = "polar_stereographic" ;
mapping:latitude_of_projection_origin = 90. ;
mapping:standard_parallel = 70. ;
mapping:straight_vertical_longitude_from_pole = -45. ;
int x(x) ;
x:long_name = "Cartesian x-coordinate" ;
x:standard_name = "projection_x_coordinate" ;
x:units = "meter" ;
int y(y) ;
y:long_name = "Cartesian y-coordinate" ;
y:standard_name = "projection_y_coordinate" ;
y:units = "meter" ;
byte mask(y, x) ;
mask:long_name = "mask (0 = ocean, 1 = ice-free land, 2 = grounded ice, 3 = floating ice, 4 = non-Greenland land)" ;
mask:units = "none" ;
mask:grid_mapping = "mapping" ;
mask:valid_range = 0b, 4b ;
mask:flag_values = 0b, 1b, 2b, 3b, 4b ;
mask:flag_meanings = "ocean ice_free_land grounded_ice floating_ice non_greenland_land" ;
mask:source = "gimpmask v2.0 (http://bprc.osu.edu/GDG/icemask.php) combined with coastline from Jeremie Mouginot" ;
short bed(y, x) ;
bed:long_name = "bed topography" ;
bed:standard_name = "bedrock_altitude" ;
bed:units = "meters" ;
bed:grid_mapping = "mapping" ;
bed:source = "Mass conservation (Mathieu Morlighem)" ;
bed:_FillValue = -9999s ;
short geoid(y, x) ;
geoid:long_name = "EIGEN-EC4 Geoid - WGS84 Ellipsoid difference" ;
geoid:standard_name = "geoid_height_above_reference_ellipsoid" ;
geoid:units = "meters" ;
geoid:grid_mapping = "mapping" ;
geoid:geoid = "eigen-6c4 (Forste et al 2014)" ;

// global attributes:
:Conventions = "CF-1.4" ;
:Title = "BedMachine Greenland: dataset based on mass conservation" ;
:Author = "Mathieu Morlighem" ;
:version = "01-Feb-2017 (v3.2)" ;
:nx = 17946. ;
:ny = 10018. ;
:Projection = "Polar Stereographic North (70N, 45W)" ;
:proj4 = "+init=epsg:3413" ;
:xmin = -637925 ;
:ymax = -657675 ;
:spacing = 150 ;
:no_data = -9999. ;
:Data_citation = "M. Morlighem, E. Rignot, J. Mouginot, H. Seroussi and E. Larour, Deeply incised submarine glacial valleys beneath the Greenland Ice Sheet, Nat. Geosci., 7, 418-422, 2014, doi:10.1038/ngeo2167, http://www.nature.com/ngeo/journal/vaop/ncurrent/full/ngeo2167.html" ;
:Notes = "Data processed at the Department of Earth System Science, University of California, Irvine" ;
}



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170227/d230f59a/attachment.html 


More information about the ncl-talk mailing list