Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Fri Nov 24, 2017 1:49 am




Post new topic Reply to topic  [ 9 posts ] 

All times are UTC

Author Message
 Post subject: Compiling error
PostPosted: Mon Mar 23, 2015 9:30 am 
Offline

Joined: Fri Mar 06, 2015 7:40 pm
Posts: 2
Location: Oceanographic Research Institute
Hi, can anyone help me work out what this error means? I am completely new to ROMS and I am using cygwin to run

In file uv_rotate.f90:260

Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
In file uv_rotate.f90:274

Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
ROMS/Utility/Module.mk:15: recipe for target 'Build/uv_rotate.o' failed
make: *** [Build/uv_rotate.o] Error 1


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Mon Mar 23, 2015 4:32 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3254
Location: IMS/UAF, USA
It's saying you have a rank mis-match for Vout. Looking at uv_rotate.F, there's a routine in which Vout is 2-D, then a routine in which Vout is 3-D. Did your uv_rotate.f90 somehow get garbled? Perhaps try deleting the uv_rotate.f90 and let the build process recreate it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Jan 12, 2016 1:48 pm 
Offline

Joined: Tue Dec 15, 2015 1:30 pm
Posts: 1
Location: University of Edinburgh
HI was there ever any solution to this problem. I have tried many many times to install ROMS at this point and this error keeps coming up. Even after I did the suggested delete of the uv_rotate.f90


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Jan 12, 2016 6:15 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3254
Location: IMS/UAF, USA
Did you compare uv_rotate.F to uv_rotate.f90? We edit the former while the compiler sees the latter. One gets from the first to the second using "cpp --traditional". The C preprocessor should do the right thing... and does for most of us.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Feb 21, 2017 2:18 pm 
Offline

Joined: Mon Jan 16, 2017 1:02 am
Posts: 11
Location: DSS
when i am trying to compile roms, uv_rotate.F has failed to build with this error.
uv_rotate.f90:268.18:

Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:268.30:

Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.18:

Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.30:

Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:284.18:

Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.18:

Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.30:

Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)



I am using gcc 4.9.2 and gfortran 4.9.2. my Linux_gfortran.mk file has
FC := gfortran
FFLAGS := -frepack-arrays
CPP := /usr/bin/cpp
CPPFLAGS := -P
MDEPFLAGS := --cpp --fext=f90 --file=- --objdir=$(SCRATCH_DIR)

I noticed that the error appears when SOLVE3D is defined. It is trying to do both 2d and 3d in uv_rotate.F

Any help would be appreciated.


Last edited by roopakotta on Tue Feb 21, 2017 5:53 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Feb 21, 2017 5:42 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3254
Location: IMS/UAF, USA
Again, you need to look at the uv_rotate.f90 file to see what's what there with Vout. The problem is either with the cpp step or with the compile step and we can't tell from here. Maybe if you attach your uv_rotate.f90?


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Feb 21, 2017 5:57 pm 
Offline

Joined: Mon Jan 16, 2017 1:02 am
Posts: 11
Location: DSS
Thank you for your reply.
I defined SOLVE3d in my cppdefs.h

Attached is my uv_rotate.f90


Attachments:
uv_rotate.f90 [13.08 KiB]
Downloaded 13 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Tue Feb 21, 2017 6:11 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3254
Location: IMS/UAF, USA
There's a problem here:
Code:
Vout(LBi:UBi,LBj:UBj,LBk,UBk)
which should be:
Code:
Vout(LBi:UBi,LBj:UBj,LBk:UBk)
I haven't run into this problem because I have ASSUMED_SHAPE turned on and this is in the "else" case.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling error
PostPosted: Wed Feb 22, 2017 4:14 am 
Offline

Joined: Mon Jan 16, 2017 1:02 am
Posts: 11
Location: DSS
Thank you so much kate.
It is working now.


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 1 guest


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