Ask Your Question
0

make_OGCM_mercator fails... variable mismatch?

asked 2022-08-04 23:02:15 +0200

Hi,

I am using motuclient to download from: service: GLOBAL_MULTIYEAR_PHY_001_030-TDS 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) ndims=length(dim(nc{vname}));

Error in interp_OGCM (line 61) zeta=ext_data_OGCM(nc,lonT,latT,'ssh',tin,lon,lat,1,Roa,interp_method);

Error in make_OGCM_mercator (line 158) interp_OGCM(OGCM_dir,OGCM_prefix,Ymin,Mmin,Roa,interp_method,..."

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) data=interp2(x,y,data,lon,lat,'nearest');

Error in interp_OGCM (line 61) zeta=ext_data_OGCM(nc,lonT,latT,'zos',tin,lon,lat,1,Roa,interp_method);

Error in make_OGCM_mercator (line 158) interp_OGCM(OGCM_dir,OGCM_prefix,Ymin,Mmin,Roa,interp_method,... "

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 Konstantinos

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2022-08-12 10:07:57 +0200

make_OGCM_mercator is designed to first get a raw mercator data file raw_motu_.nc with the variables zos ..., then create a new file mercator_.nc 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).

edit flag offensive delete link more

Comments

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. :-)

Konstantinos_K gravatar imageKonstantinos_K ( 2022-10-25 10:51:31 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-08-04 23:02:15 +0200

Seen: 103 times

Last updated: Aug 12 '22