Ask Your Question
0

How can I fix the error in get_Mmean.m?

asked 2020-10-19 22:58:51 +0100

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"

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2020-10-20 17:47:53 +0100

andres gravatar image

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

edit flag offensive delete link more

Comments

thank you very much! Now it works!

Catalina gravatar imageCatalina ( 2020-10-20 18:13:02 +0100 )edit
0

answered 2020-10-20 02:56:19 +0100

andres gravatar image

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

edit flag offensive delete link more

Comments

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 [...]

Catalina gravatar imageCatalina ( 2020-10-20 17:36:02 +0100 )edit

[...] 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)*30*24*3600; "

Catalina gravatar imageCatalina ( 2020-10-20 17:36:43 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-10-19 22:58:51 +0100

Seen: 457 times

Last updated: Oct 20