Project

General

Profile

Changing SST values based on a linear interpolation within one file

Added by Paul MAUGER about 1 month ago

Hello,

I've got WRF NetCDF surface input files with SST values I computed by using a bunch of CDO and NCO operators for remapping. Unfortunately, some files show huge anmalous SST values due to interpolation from 21km to 2.333km grid (i.e. negative SST values in Tropical South Pacific...).

These anomalous SST only show in a small area of the domain (120x120) : from latitude indices 45 to 75 ; and longitude indices 30 to 75 (around mountainous islands)

For any given latitude within latitude indices mentioned aboved, I would like to replace SST value at longitude indice N by a linear interplation of SST value at longitude indice 30 and SST value at longitude indice 75.

So, for example, at time-step 0, latitude indice 60, and longitude indices 30 < N < 75 :

SST = SST + i * increment
i = N - 30
increment = (SST - SST)/(75 - 30 + 1)

Is there a way I can do it using CDO ?

See attached screenshots the domain ST values ; white represent under minimum colormap range values.

Thanks for your help,

Paul