make_OGCM_mercator fails... variable mismatch?


I am using motuclient to download from:
product: cmems_mod_glo_phy_my_0.083_P1D-m

The downloaded variables are: -v zos -v uo -v vo -v thetao -v so

but the make_OGCM_mercator script fails with the error:
"Undefined function ‘dim’ for input arguments of type ‘double’.

Error in ext_data_OGCM (line 77)

Error in interp_OGCM (line 61)

Error in make_OGCM_mercator (line 158)

It seems that the script is looking for the variable “ssh” instead of the variable “zos”. Even if I change the script to look for the variable “zos” it fails again with the error:
"Error using griddedInterpolant
Grid is improperly defined.

Error in interp2>makegriddedinterp (line 229)
F = griddedInterpolant(varargin{:});

Error in interp2 (line 137)
F = makegriddedinterp(X, Y, V, method,extrap);

Error in ext_data_OGCM (line 124)

Error in interp_OGCM (line 61)

Error in make_OGCM_mercator (line 158)

Any ideas what is the problem? In the interp_OGCM function the variable names seem to correspond to a different product e.g. “ssh”, “u”, “v”, “ubar”, “vbar”, “salt”, “temp”… instead of the “uo”, “vo”, “zos”, “thetao”, “so” downloaded from the cmems_mod_glo_phy_my_0.083_P1D-m

Thank you for any advice

make_OGCM_mercator is designed to first get a raw mercator data file with the variables zos …, then create a new file with the CROCO type variable names ssh … (the first file is then deleted in download_mercator_python.m). This last file is used for interpolation in the CROCO grid the result will be written in the CROCO input files. So look if you have the mercator_*.nc file and if ssh, u, v, ubar, vbar, temp, salt are there (using ncview).

Thanks Patrick, I was trying to download manually the raw data because I couldn’t make the auto-download script work but I was not including the landmask. Finally, after attending the CROCO training course in Barcelonnette, I managed to set up the crocotools_param.m properly, and make it work. :slight_smile: