[ncl-talk] Assign lat lon cordinates to polar stereographic coordinate
Mary Haley
haley at ucar.edu
Mon Sep 12 14:38:32 MDT 2016
Sourav,
I'm not sure what you mean by "converting my variable".
Since your latitude and longitude arrays are two-dimensional, you cannot
associate them with "temperature" in the same way that "y" and "x" are
currently associated with "temperature" as coordinate variables. This is a
NetCDF limitation that requires that coordinate variables be
one-dimensional and the same length as the dimension they represent.
You already have a "coordinates" *attribute* associated with "temperature",
that indicates which variables represent the lat/lon arrays for your data:
temperature:coordinates = "longitude latitude" ;
This is how we would normally suggest that you "associate" 2D lat/lon
arrays with a variable on a NetCDF file, so really, your "temperature"
variable looks pretty good as it is.
--Mary
On Fri, Sep 9, 2016 at 4:19 AM, Sourav Chatterjee <srvsxc at outlook.com>
wrote:
> Hi all
>
>
> I want convert my variable (temperature) to temperature
> (time,depth,lat,lon) from temperature(time,depth,x,y)
>
>
>
> here is how it looks like now.
>
>
> Any help!
>
>
> Thanks
>
>
> dimensions:
> depth = 12 ;
> time = UNLIMITED ; // (288 currently)
> x = 428 ;
> y = 403 ;
> variables:
> int stereographic ;
> stereographic:grid_mapping_name = "polar_stereographic" ;
> stereographic:latitude_of_projection_origin = 90. ;
> stereographic:longitude_of_projection_origin = -45. ;
> stereographic:scale_factor_at_projection_origin = 1. ;
> stereographic:straight_vertical_longitude_from_pole = -45. ;
> stereographic:false_easting = 0. ;
> stereographic:false_northing = 0. ;
> float x(x) ;
> x:axis = "X" ;
> x:standard_name = "projection_x_coordinate" ;
> x:units = "100 km" ;
> float y(y) ;
> y:standard_name = "projection_y_coordinate" ;
> y:axis = "Y" ;
> y:units = "100 km" ;
> float depth(depth) ;
> depth:long_name = "depth" ;
> depth:units = "m" ;
> depth:standard_name = "depth" ;
> depth:positive = "down" ;
> depth:axis = "Z" ;
> double time(time) ;
> time:units = "hour since 1950-1-1T00:00:00Z" ;
> time:long_name = "forecast time" ;
> float longitude(y, x) ;
> longitude:standard_name = "longitude" ;
> longitude:units = "degrees_east" ;
> float latitude(y, x) ;
> latitude:standard_name = "latitude" ;
> latitude:units = "degrees_north" ;
> short temperature(time, depth, y, x) ;
> temperature:_FillValue = -32767s ;
> temperature:missing_value = -32767s ;
> temperature:add_offset = 23.5 ;
> temperature:scale_factor = 0.000808839239385893 ;
> temperature:units = "Celsius" ;
> temperature:standard_name = "sea_water_potential_temperature" ;
> temperature:grid_mapping = "stereographic" ;
> temperature:coordinates = "longitude latitude" ;
> temperature:cell_methods = "area: mean" ;
>
> // global attributes:
> :title = "Arctic Ocean Physics Reanalysis (1991-2014), 12.5km
> monthly mean (dataset-ran-arc-myoceanv2-be)" ;
> :institution = "NERSC, Thormoehlens gate 47, N-5006 Bergen,
> Norway" ;
> :history = "20160112:Created by program hyc2proj, version V0.3" ;
> :source = "NERSC-HYCOM model fields" ;
> :references = "http://topaz.nersc.no" ;
> :field_type = "Files based on file type nersc_weekly" ;
> :Conventions = "CF-1.4" ;
> :field_date = "2014-11-15" ;
> :bulletin_date = "2014-11-15" ;
> }
>
>
> _______________________________________________
> 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/20160912/c40ac0dd/attachment.html
More information about the ncl-talk
mailing list