Project

General

Profile

Adding dimension to a variable from an existing variable

Added by N Kanha almost 3 years ago

I have a netcdf file that has two dimensions (station_id and time). The ncdump info is :
dimensions:
station_id = 2607 ;
time = 33816 ;
variables:
float snw(station_id, time) ;
snw:long_name = "Surface snow water equivalent" ;
snw:standard_name = "surface_snow_amount" ;
snw:units = "kg m**-2" ;
snw:_FillValue = 9.96921e+36f ;
string station_id(station_id) ;
station_id:long_name = "Primary station ID" ;
station_id:standard_name = "station_id" ;
int64 time(time) ;
time:units = "days since 1928-01-01 00:00:00" ;
time:calendar = "proleptic_gregorian" ;
float lat(station_id) ;
lat:_FillValue = NaNf ;
lat:long_name = "Station latitude" ;
lat:standard_name = "latitude" ;
lat:units = "degrees_north" ;
float lon(station_id) ;
lon:_FillValue = NaNf ;
lon:long_name = "Station longitude" ;
lon:standard_name = "longitude" ;
lon:units = "degrees_east" ;
I wanted to read the snw variable with lat/lon info. I am unable to view this file in ncview. How can I assign the dimensions 'lat' 'lon' to variable snw?
I really appreciate your help.
Thanks


Replies (4)

RE: Adding dimension to a variable from an existing variable - Added by Karin Meier-Fleischer almost 3 years ago

Without the input file I can only guess and I'm not really sure if it would work. Can you upload your file?

RE: Adding dimension to a variable from an existing variable - Added by N Kanha almost 3 years ago

Hi,
I have uploaded the file. It has all variables and I had extracted one variable in the question above. Thanks

RE: Adding dimension to a variable from an existing variable - Added by Karin Meier-Fleischer almost 3 years ago

Sorry, but I was not able to solve the problem. :-(

RE: Adding dimension to a variable from an existing variable - Added by N Kanha almost 3 years ago

Thanks for trying Karin :) Have a Good day !

    (1-4/4)