Problem of " rnt_griddata" of MAIN_Grid.m in RNT

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
limaolin
Posts: 45
Joined: Wed Nov 07, 2012 5:48 pm
Location: Dalian University

Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#1 Post by limaolin » Thu May 07, 2015 11:14 am

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.

limaolin
Posts: 45
Joined: Wed Nov 07, 2012 5:48 pm
Location: Dalian University

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#2 Post by limaolin » Thu May 28, 2015 3:52 pm

Can somebody help? Thanks a lot!

Chang
Posts: 20
Joined: Sun Dec 04, 2016 1:03 am
Location: ocean university of china

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#3 Post by Chang » Sun Mar 12, 2017 8:35 am

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!

roopakotta
Posts: 11
Joined: Mon Jan 16, 2017 1:02 am
Location: DSS

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#4 Post by roopakotta » Sun Mar 12, 2017 6:14 pm

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.

Chang
Posts: 20
Joined: Sun Dec 04, 2016 1:03 am
Location: ocean university of china

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#5 Post by Chang » Mon Mar 13, 2017 3:00 am

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

roopakotta
Posts: 11
Joined: Mon Jan 16, 2017 1:02 am
Location: DSS

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#6 Post by roopakotta » Mon Mar 13, 2017 4:09 am

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.

Chang
Posts: 20
Joined: Sun Dec 04, 2016 1:03 am
Location: ocean university of china

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#7 Post by Chang » Mon Mar 13, 2017 9:56 am

my gcc version is 4.8.5, if it need a low version?

Chang
Posts: 20
Joined: Sun Dec 04, 2016 1:03 am
Location: ocean university of china

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#8 Post by Chang » Wed Mar 22, 2017 2:01 pm

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.

Chang
Posts: 20
Joined: Sun Dec 04, 2016 1:03 am
Location: ocean university of china

Re: Problem of " rnt_griddata" of MAIN_Grid.m in RNT

#9 Post by Chang » Wed Apr 05, 2017 7:19 am

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)

Post Reply