How can I fix the error in get_Mmean.m?

When I do the climatologic simulation, I run in matlab “get_Mmean”, but the program works with the croco_avg files and then it stops and says:

“Expected one output from a curly brace or dot indexing expression,
but there were 4 results.
Error in get_Mmean (line 151)
nc{‘time’}(imonth)=(imonth-0.5)3024*3600;”

previously line 151 said “scrum_time” and not “time”

Hi Catalina,

I had the same error. Earlier in the Matlab output, the following error message appeared:

/bin/bash: …/Diagnostic_tools/copycdf.csh: No existe el fichero o el directorio

This is because the path directory to the Diagnostic_tools in start.m conflicts with the path defined
at the end of the crocotools_param.m file

DIAG_dir = [CROCOTOOLS_dir,‘Diagnostic_tools/’];

so, just modify that line in crocotools_param.m to the correct path to croco_tools in your system, in my case it is

% CROCOTOOLS directory
%
CROCOTOOLS_dir = ‘/home/matlab/croco_tools/’;
%

Regards,

Andres

Hello Andres,
now it says the following:
" mkdir: cannot create directory ‘/home/catalina/CROCO/Kuroshio/CROCO_FILES/’: File exists
CROCO monthly mean file
ncdump: Command not found.
ncgen: Command not found.
Opening : /home/catalina/CROCO/Kuroshio/CROCO_FILES/croco_avg_Y1M1.nc
[…]

[…]
Write in the file…

NetCDF file not opened: /home/catalina/CROCO/Kuroshio/CROCO_FILES/croco_Mmean.nc

Expected one output from a curly brace or dot indexing
expression, but there were 10 results.

Error in get_Mmean (line 152)
nc{‘scrum_time’}(imonth)=(imonth-0.5)3024*3600; "

Hi Catalina,

ncgen and ncdump are part of the netcdf-bin package (at least in Ubuntu). Please install them in your system.

sudo apt-get install netcdf-bin

Regards,

Andres

thank you very much! Now it works!