Project

General

Profile

Changing the valid range of netcdf attribute

Added by N Kanha over 3 years ago

I have a netcdf where the valid range of snow values is 1,255 but I want it to display 0 values as well.
Any suggestions?
Thanks


Replies (2)

RE: Changing the valid range of netcdf attribute - Added by Karin Meier-Fleischer over 3 years ago

Hi,

use the setattribute operator (see documentation):

cdo setattribute,topo@valid_range="0.f,1.255f" infile outfile

Another way is to use NCOs ncatted command (see NCO documentation):

ncatted -O -a valid_range,your_variable_name,c,c,"0.f, 1.255f" infile outfile

-Karin

RE: Changing the valid range of netcdf attribute - Added by N Kanha over 3 years ago

Thank you so much Karin for your help.
That worked :)

    (1-2/2)