[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #MUE-362705]: attribute



Hello,

There isn't an easy way to do this with the tools provided by the netCDF 
library. However, you can use the 'ncrename' utility provided as part of the 
NetCDF Operators (NCO) utility package.  We do not maintain this package, but 
you can download it from the following link:

* https://sourceforge.net/projects/nco/

I hope this helps!

-Ward

> Hi ,
> I need to merge two netcdf files to create meteorological files for the
> ocean file, unfortunately they have different  attribute.
> the both of them have the following attributes, How can I convert the
> first  file to the second file ?
> looking forward to any replies.
> 
> Kind Regards,
> Pooran
> 
> THe first file
> float lon(lon) ;
> lon:standard_name = "longitude" ;
> lon:long_name = "Longitude" ;
> lon:units = "degrees_east" ;
> lon:axis = "X" ;
> float lat(lat) ;
> lat:standard_name = "latitude" ;
> lat:long_name = "Latitude" ;
> lat:units = "degrees_north" ;
> lat:axis = "Y" ;
> double time(time) ;
> time:standard_name = "time" ;
> time:long_name = "Time" ;
> time:units = "hours since 1800-1-1 00:00:00" ;
> time:calendar = "standard" ;
> time:axis = "T" ;
> float uwnd(time, lat, lon) ;
> uwnd:long_name = "4xDaily u-wind at 10 m" ;
> uwnd:units = "m/s" ;
> uwnd:_FillValue = -9.96921e+36f ;
> uwnd:missing_value = -9.96921e+36f ;
> uwnd:precision = 2s ;
> uwnd:least_significant_digit = 1s ;
> uwnd:GRIB_id = 33s ;
> uwnd:GRIB_name = "U GRD" ;
> uwnd:var_desc = "u-wind" ;
> uwnd:level_desc = "10 m" ;
> uwnd:statistic = "Individual Obs" ;
> uwnd:parent_stat = "Other" ;
> uwnd:dataset = "NCEP Reanalysis" ;
> uwnd:actual_range = -7.599991f, 3.900009f ;
> float vwnd(time, lat, lon) ;
> vwnd:long_name = "4xDaily v-wind at 10 m" ;
> vwnd:units = "m/s" ;
> vwnd:_FillValue = -9.96921e+36f ;
> vwnd:missing_value = -9.96921e+36f ;
> vwnd:precision = 2s ;
> vwnd:least_significant_digit = 1s ;
> vwnd:GRIB_id = 34s ;
> vwnd:GRIB_name = "V GRD" ;
> vwnd:var_desc = "v-wind" ;
> vwnd:level_desc = "10 m" ;
> vwnd:statistic = "Individual Obs" ;
> vwnd:parent_stat = "Other" ;
> vwnd:dataset = "NCEP Reanalysis" ;
> vwnd:actual_range = -9.199997f, -0.8000031f ;
> 
> 
> and the second file has the below attribute :
> variables:
> float longitude(longitude) ;
> longitude:standard_name = "longitude" ;
> longitude:long_name = "longitude" ;
> longitude:units = "degrees_east" ;
> longitude:axis = "X" ;
> float latitude(latitude) ;
> latitude:standard_name = "latitude" ;
> latitude:long_name = "latitude" ;
> latitude:units = "degrees_north" ;
> latitude:axis = "Y" ;
> double time(time) ;
> time:standard_name = "time" ;
> time:long_name = "time" ;
> time:units = "seconds since 2006-1-1 00:00:00" ;
> time:calendar = "standard" ;
> time:axis = "T" ;
> short msl(time, latitude, longitude) ;
> msl:standard_name = "air_pressure_at_sea_level" ;
> msl:long_name = "Mean sea level pressure" ;
> msl:units = "Pa" ;
> msl:add_offset = 101166.416650295 ;
> msl:scale_factor = 0.0729494109837792 ;
> msl:_FillValue = -32767s ;
> msl:missing_value = -32767s ;
> short tcc(time, latitude, longitude) ;
> tcc:standard_name = "cloud_area_fraction" ;
> tcc:long_name = "Total cloud cover" ;
> tcc:units = "(0 - 1)" ;
> tcc:add_offset = 0.499996179307912 ;
> tcc:scale_factor = 1.52596038365047e-05 ;
> tcc:_FillValue = -32767s ;
> tcc:missing_value = -32767s ;
> short u10(time, latitude, longitude) ;
> u10:long_name = "10 metre U wind component" ;
> u10:units = "m s**-1" ;
> u10:add_offset = 1.36124727366643 ;
> u10:scale_factor = 0.000384862457178063 ;
> u10:_FillValue = -32767s ;
> u10:missing_value = -32767s ;
> short v10(time, latitude, longitude) ;
> v10:long_name = "10 metre V wind component" ;
> v10:units = "m s**-1" ;
> v10:add_offset = 0.760294888953219 ;
> v10:scale_factor = 0.000405362169245577 ;
> v10:_FillValue = -32767s ;
> v10:missing_value = -32767s ;
> short t2m(time, latitude, longitude) ;
> t2m:long_name = "2 metre temperature" ;
> t2m:units = "K" ;
> t2m:add_offset = 291.838878833291 ;
> t2m:scale_factor = 0.000953270918850045 ;
> t2m:_FillValue = -32767s ;
> t2m:missing_value = -32767s ;
> short d2m(time, latitude, longitude) ;
> d2m:long_name = "2 metre dewpoint temperature" ;
> d2m:units = "K" ;
> d2m:add_offset = 274.628680192296 ;
> d2m:scale_factor = 0.000970914235689223 ;
> d2m:_FillValue = -32767s ;
> d2m:missing_value = -32767s ;
> short tp(time, latitude, longitude) ;
> tp:long_name = "Total precipitation" ;
> tp:units = "m" ;
> tp:add_offset = 0.032011497292309 ;
> tp:scale_factor = 9.76972999215925e-07 ;
> tp:_FillValue = -32767s ;
> tp:missing_value = -32767s ;
> 
> 
> 
> --
> *Ph.D. student**, **Department of Physical Oceanography.*
> 
> 
> *Khorramshahr Marine Science and Technology University,Khorramshahr, P.O.
> Box: 669,Khuzestan Province, Iran.*
> 
> 


Ticket Details
===================
Ticket ID: MUE-362705
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.