Project

General

Profile

how to Merge two grids

Added by gabriele greco almost 3 years ago

Good morning,

I have a temperature map with Nans in the coordinates (temperature map file) and i need to remap this file with Remapbil, in order to convert from curvilinear to lon-lat.

I created a rectangoular grid filled with zeros, using as reference the coordinates of the temperature map with the command - cdo setclonlatbox,0,8.48826,11.41976,44.63501,46.63701 "tmax_2m_CMCC-COSMO-CLM-8km-Italy_historical.nc" "rectangoular.nc" -
With this second file i wanted to create a "background" for the temperature map, in order to not have nans in the coordinates. In this way the command remapbil could work.

But is there anyway to merge these two files, in order to have the values of the temperature map and zeros where the temperature map has nan values?

I'll give you an example in the attachments: i need to get an output like the one in "figure".

Thank you