utilizing expression to compute a particular variable?
Added by Ameer Muhammad over 4 years ago
I would like to compute Relative Humidity (RH) using three other variables that comes in NetCDF file. I have merged the three variables (Pressure_UARB, specific_UARB, and SurfaceTemp_UARB)
in one big file (sh_ps_tas_merged.nc)
and used the following code to compute RH.nc.
cdo 'rh=0.263*Pressure_UARB*specific_UARB/exp((17.67*(SurfaceTemp_UARB-273.15)/(SurfaceTemp_UARB-29.95)))' sh_ps_tas_merged.nc RH.nc
However, i am getting the attached error- any help would be appreciated.
Replies (2)
RE: utilizing expression to compute a particular variable? - Added by Karin Meier-Fleischer over 4 years ago
Hi Ameer,
you've missed the expr operator.
cdo -expr,'rh=0.263*Pressure_UARB*specific_UARB/exp((17.67*(SurfaceTemp_UARB-273.15)/(SurfaceTemp_UARB-29.95)))' sh_ps_tas_merged.nc RH.nc
-Karin
RE: utilizing expression to compute a particular variable? - Added by Ameer Muhammad over 4 years ago
That worked- many thanks.
Ameer