I have a netcdf file :
dimensions:
y = 453 ;
x = 453 ;
plev = 1 ;
time = UNLIMITED ; // (1460 currently)
variables:
double plev(plev) ;
plev:name = "plev" ;
plev:standard_name = "air_pressure" ;
plev:long_name = "pressure" ;
plev:units = "Pa" ;
plev:axis = "Z" ;
plev:positive = "down" ;
float va925(time, plev, y, x) ;
va925:_FillValue = 1.e+20f ;
va925:missing_value = 1.e+20f ;
va925:coordinates = "lon lat plev" ;
va925:grid_mapping = "Lambert_Conformal" ;
I would like to remove the plev dimension, but keep plev variable and do not modify va925 coordinates attribute.
So I would like :
dimensions:
y = 453 ;
x = 453 ;
time = UNLIMITED ; // (1460 currently)
variables:
double plev;
plev:name = "plev" ;
plev:standard_name = "air_pressure" ;
plev:long_name = "pressure" ;
plev:units = "Pa" ;
plev:axis = "Z" ;
plev:positive = "down" ;
float va925(time, y, x) ;
va925:_FillValue = 1.e+20f ;
va925:missing_value = 1.e+20f ;
va925:coordinates = "lon lat plev" ;
va925:grid_mapping = "Lambert_Conformal" ;
I have tried with : ncwa -a plev in.nc out.nc But it modifies va925 coordinates such as : va925:coordinates = "lon lat ";
I can change it again with : ncatted -h -O -a coordinates,va925,m,c,"lon lat plev" out.nc But it means that I have to loop on the variable name, which is too long!
Thank you in advance,
Lola