Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Aug 25, 2019 2:38 am




Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Author Message
PostPosted: Mon Nov 07, 2011 9:55 am 
Offline

Joined: Mon Mar 07, 2011 5:37 pm
Posts: 52
Location: HYDRATEC
Hi roms users!

I want to know if it is possible to define a passive tracer as a function of depth. I try to define z_r as in ana_initial, but I obtain the following error:

analytical.f90:709.29:

& GRID(ng) % z_r, &
1
Error: Rank mismatch in argument 't' at (1) (5 and 3)
make: *** [/home/AMarie/roms/Projects/richardmenil/Build/analytical.o] Error 1


Can someone help me please?

Thanks in advance,

Antoine


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 07, 2011 5:58 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3646
Location: IMS/UAF, USA
You don't show us the full code, but the error message is clear. You are mixing a rank 3 matrix (z_r) with a rank 5 matrix (t). If you look at how things are done in ROMS, it is largely within do loops specifying the exact range over which to perform some computation - each statement is operating on one element of a matrix at a time. You are using matrix notation without specifying the right subset of the t matrix - the 5 indices are for i,j,k,timelevel,tracer. Your passive tracer is going to be just part of t if you have the usual temperature and salt as well. Look at some examples like:
Code:
! Linear background
      DO k=1,N(ng)
        DO j=JstrR,JendR
          DO i=IstrR,IendR
            t(i,j,k,1,itemp)=20.+ 0.02*z_r(i,j,k)
            t(i,j,k,1,isalt)=0.2*j
          END DO
        END DO
      END DO


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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