Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Jul 17, 2019 7:16 am




Post new topic Reply to topic  [ 9 posts ] 

All times are UTC

Author Message
PostPosted: Thu May 07, 2015 11:14 am 
Offline

Joined: Wed Nov 07, 2012 5:48 pm
Posts: 45
Location: Dalian University
Hi:
I use MAIN_Grid.m of RNT to make topography of ETOPO. After the code as follows:

h=rnt_griddata(lon,lat,topo,grd.lonr,grd.latr,'cubic');

The error as follows:
******
Error using rnt_hindicesTRI_mex
Function "MXCREATEFULL" is obsolete.
If your MEX file or Simulink S-function calls this function, replace
it with "MXCREATEDOUBLEMATRIX".
If this error originates from a Fortran Simulink S-function that does
not call "MXCREATEFULL", recompile the S-function in the current
release.

Error in rnt_hindicesTRI (line 41)
[Ipos,Jpos,triX,triY,Ival,Jval]=rnt_hindicesTRI_mex(Xpos,Ypos,Xgrd,Ygrd);

Error in rnt_griddata (line 36)
[Ipos,Jpos]=rnt_hindicesTRI(lon(:),lat(:),Xgrd,Ygrd);
*******

My matlab is R2013a, I have run the rnt_compile.m and 'rnt and rnt/mex' in my matlab toolbox path.

How can I solve the problem, Thanks a lot.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 28, 2015 3:52 pm 
Offline

Joined: Wed Nov 07, 2012 5:48 pm
Posts: 45
Location: Dalian University
Can somebody help? Thanks a lot!


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 12, 2017 8:35 am 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
Hi
Could somebody here can tell me how to compile the RNT? I am puzzled about the struction at the website.I dont known how to add the path.if anybody can help me ,i will appreciate it very much!


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 12, 2017 6:14 pm 
Offline

Joined: Mon Jan 16, 2017 1:02 am
Posts: 11
Location: DSS
You need to edit all the files that you are compiling in rnt and replace word Mxcreatefull with word mxcreatedoublematrix as the error suggests. Latest matlab does not support former word.
Then recompile rnt toolbox.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 13, 2017 3:00 am 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
Hello
could you give me a detail of the process? The previous matlab i used is 2014a,so i am going to use MatlibR2009b,my system is ocentos7.I dont known whether it will satisfy the requirement? if it is ok or do something else? there are so many kinds of instruction to compile the RNT that make me dont known how to do. thanks for you reply and i will appreciate your help very much.


cheers


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 13, 2017 4:09 am 
Offline

Joined: Mon Jan 16, 2017 1:02 am
Posts: 11
Location: DSS
Is your matlab 32 bit or 64 bit? Rnt compiles well with 32 bit matlab.
It needs g95 fortran compiler and gcc. G95 works well with 32 bit. Mine is matlab 2013b, 32 bit. in windows.
I tried with 64 bit matlab version under linux without success.
You need to use right version of gcc.
http://oces.us/RNT/mex_compile.txt
I think 32 bit matlab with g95, gcc 4.1 or something would work under linux too.
As mentioned in link you have to edit each mex file top 3 lines from integer*8 to integer.
And also change MXCREATEFULL with MXCREATEDOUBLEMATRIX. Try compiling.
You will get file with extension .mex32a under 32bit matlab or .mex64a under matlab64 bit after compiling successfully.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 13, 2017 9:56 am 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
my gcc version is 4.8.5, if it need a low version?


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 22, 2017 2:01 pm 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
hello roopakotta
There exist a new problem.I replace the mexnc and snctool according my matlab version,but i still can't
use the netcdf_toolbox.Every time i found the m file under the subdirectory which are initialized with a sysmbol @.even it can pass by commentting some line, i can finally get a void nc file .I known possibily the netcdf_toolbox isn't installed properly,but i dont know how to deal with it.could you give me some suggestion with your rich experience
? my matlab version is 2009b.thank you very much.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 05, 2017 7:19 am 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
roopakotta wrote:
Is your matlab 32 bit or 64 bit? Rnt compiles well with 32 bit matlab.
It needs g95 fortran compiler and gcc. G95 works well with 32 bit. Mine is matlab 2013b, 32 bit. in windows.
I tried with 64 bit matlab version under linux without success.
You need to use right version of gcc.
http://oces.us/RNT/mex_compile.txt
I think 32 bit matlab with g95, gcc 4.1 or something would work under linux too.
As mentioned in link you have to edit each mex file top 3 lines from integer*8 to integer.
And also change MXCREATEFULL with MXCREATEDOUBLEMATRIX. Try compiling.
You will get file with extension .mex32a under 32bit matlab or .mex64a under matlab64 bit after compiling successfully.


Hello
Thanks for your help.I recompile the RNT toolbox accoding what you told me.however,there still a problem unsolved,and i really don't know what the problem is.It seems that the G95 compiler does not support the %val() construct or maybe I configure the G95 unproperly.Could you help me? Thank you in addvance.

>> cd mex/
>> mex rnt_2s_mex.F
In file rnt_2s_mex.F:57

call vertinterp(%val(pr_finp),%val(pr_sn),%val(pr_zn),
1
In file rnt_2s_mex.F:74

subroutine vertinterp(finp1,s1,z1,im,jm,km,lm,fout1)
2
Warning (155): Inconsistent types (INTEGER(8)/REAL(8)) in actual argument lists at (1) and (2)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group