Project

General

Profile

Remapping/interpolation from SODA to ORCA025 grid

Added by Julia Araujo about 1 month ago

Hello,

I would like to have some help on the remapping/interpolation between SODA dataset and an ORCA025 grid.
I've tried the following codes:

  1. Get only one variable as reference grid
    ncks -O -v umask,time_counter,nav_lon,nav_lat,nav_lev mesh_mask.nc mask_file.nc
  1. Rename the variables
    ncrename -O -v nav_lon,lon -v nav_lat,lat -v time_counter,time -v nav_lev,depth mask_file.nc mask_file.nc
  1. Perform the interpolation
    cdo remapbil,mask_file.nc soda_1981.nc output.nc

I keep receiving the same error (even when I don't change the variables' names):
Warning (find_time_vars): Time variable >t< not found!
cdo remapbil (Abort): Unsupported target grid type (generic)!

Here are the files I'm using as a test:
ncdump -h mask_file.nc
netcdf mask_file {
dimensions:
y = 1021 ;
x = 1442 ;
z = 75 ;
t = UNLIMITED ; // (1 currently)
variables:
float lat(y, x) ;
float depth(z) ;
float lon(y, x) ;
double time(t) ;
byte umask(t, z, y, x) ;

ncdump -h soda_1981.nc
netcdf soda_1981 {
dimensions:
time = UNLIMITED ; // (12 currently)
st_ocean = 50 ;
yt_ocean = 330 ;
xt_ocean = 720 ;
yu_ocean = 330 ;
xu_ocean = 720 ;
variables:
float salt(time, st_ocean, yt_ocean, xt_ocean) ;
salt:standard_name = "sea_water_salinity" ;
salt:long_name = "Practical Salinity" ;
salt:units = "psu" ;
salt:_FillValue = -1.e+20f ;
salt:missing_value = -1.e+20f ;
salt:cell_methods = "time: mean time: mean" ;
salt:time_avg_info = "average_T1,average_T2,average_DT" ;
double st_ocean(st_ocean) ;
st_ocean:long_name = "tcell zstar depth" ;
st_ocean:units = "meters" ;
st_ocean:positive = "down" ;
st_ocean:axis = "Z" ;
st_ocean:cartesian_axis = "Z" ;
st_ocean:edges = "st_edges_ocean" ;
float temp(time, st_ocean, yt_ocean, xt_ocean) ;
temp:standard_name = "sea_water_potential_temperature" ;
temp:long_name = "Potential temperature" ;
temp:units = "degrees C" ;
temp:_FillValue = -1.e+20f ;
temp:missing_value = -1.e+20f ;
temp:cell_methods = "time: mean time: mean" ;
temp:time_avg_info = "average_T1,average_T2,average_DT" ;
double time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:units = "days since 1980-01-01 00:00:00" ;
time:calendar = "standard" ;
time:axis = "T" ;
time:cell_methods = "time: mean" ;
float u(time, st_ocean, yu_ocean, xu_ocean) ;
u:standard_name = "sea_water_x_velocity" ;
u:long_name = "i-current" ;
u:units = "m/sec" ;
u:_FillValue = -1.e+20f ;
u:missing_value = -1.e+20f ;
u:cell_methods = "time: mean time: mean" ;
u:time_avg_info = "average_T1,average_T2,average_DT" ;
float v(time, st_ocean, yu_ocean, xu_ocean) ;
v:standard_name = "sea_water_y_velocity" ;
v:long_name = "j-current" ;
v:units = "m/sec" ;
v:_FillValue = -1.e+20f ;
v:missing_value = -1.e+20f ;
v:cell_methods = "time: mean time: mean" ;
v:time_avg_info = "average_T1,average_T2,average_DT" ;
double xt_ocean(xt_ocean) ;
xt_ocean:standard_name = "longitude" ;
xt_ocean:long_name = "tcell longitude" ;
xt_ocean:units = "degrees_E" ;
xt_ocean:axis = "X" ;
double xu_ocean(xu_ocean) ;
xu_ocean:standard_name = "longitude" ;
xu_ocean:long_name = "ucell longitude" ;
xu_ocean:units = "degrees_E" ;
xu_ocean:axis = "X" ;
double yt_ocean(yt_ocean) ;
yt_ocean:standard_name = "latitude" ;
yt_ocean:long_name = "tcell latitude" ;
yt_ocean:units = "degrees_N" ;
yt_ocean:axis = "Y" ;
double yu_ocean(yu_ocean) ;
yu_ocean:standard_name = "latitude" ;
yu_ocean:long_name = "ucell latitude" ;
yu_ocean:units = "degrees_N" ;
yu_ocean:axis = "Y" ;

The SODA file is too large to upload.


Replies (1)

RE: Remapping/interpolation from SODA to ORCA025 grid - Added by Uwe Schulzweida about 1 month ago

The mask file needs to be a little more compliant with the CF-convention:

ncrename -v depth,z -v time,t mask_file.nc
ncatted -a coordinates,umask,c,c,"lon lat" -a units,lat,c,c,"degrees_N" -a units,lon,c,c,"degrees_E" mask_file.nc

    (1-1/1)