change the attribute of varible in ECMWF forecat
Added by Guanhuan Wen 11 months ago
Hi all
I have a landsea file from the analysis (the initial time )of ECMWRF model forecast. The varible name is LSM_GDS0_SFC and var172 derived from ncl_filedump and cdo -showname, respectively. I want to change the forecast_time 0 to 6. I use cdo -setattribute,var172@forecast_time=6 infile outfil. I found that the attribute of forecast_time was not changed. How to change the attribute correctly? Thank you!
Replies (1)
RE: change the attribute of varible in ECMWF forecat - Added by Estanislao Gavilan 11 months ago
Hi Guanhuan,
I am not having any issue with that command. if you type
cdo -f nc4 -setattribute,var172@forecast_time=6 LANDSEA01220000012200001 output.nc
and then
ncdump -h output.nc
You will see that the variable 172 has a new attribute called forcast_time=6. setattribute only changes the attribute name, it does not change your time axis. If you want to select the 6hour output or compute the 6 hour mean, you need to use the command selhour or timselmean