Some questions encountered reading the code

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jerry19890126
Posts: 13
Joined: Wed Jul 27, 2011 3:35 am
Location: IOCAS

Some questions encountered reading the code

#1 Unread post by jerry19890126 »

Hello,
When I was reading the ana_initial.h,there were some variables defined I didn't understand.I am fresh on ROMS, with poor English.I do hope someone can help me with these problems which seems not worthy mentioning.I really appreciate that.

Here are the variables:

Code: Select all

      integer, intent(in) :: ng, tile, model
      integer, intent(in) :: LBi, UBi, LBj, UBj
      integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
      integer :: Iless, Iplus, itrc
Plus,here are some code I can't make clear:

Code: Select all

        DO j=Jstr,JendR
          DO i=IstrR,IendR
            v(i,j,k,1)=0.0_r8
          END DO
        END DO
Why,'j=Jstr,JendR'is used,instead of 'j=JstrR,JendR'.What's the difference between Jstr and JstrR.

In the end, I am looking foward to any advice and suggestions on running ROMS,or any related websites,articles and so on.I express my greatest gratitude.

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Some questions encountered reading the code

#2 Unread post by linzhenhua »

You can get the meaning of these variables in the file ROMS/Utility/get_bounds.F, see below:

!=======================================================================
! !
! This routine computes the starting and ending horizontal indices !
! for each sub-domain partition or tile. !
! !
! On Input: !
! !
! ng Nested grid number (integer). !
! tile Sub-domain partition. !
! !
! On Output: !
! !
! Itile I-tile coordinate (a value from 0 to NtileI(ng)). !
! Jtile J-tile coordinate (a value from 0 to NtileJ(ng)). !
! Istr Starting tile index in the I-direction. !
! Iend Ending tile index in the I-direction. !
! Jstr Starting tile index in the J-direction. !
! Jend Ending tile index in the J-direction. !
! !
! IstrR Starting tile index in the I-direction (RHO-points). !
! IstrT Starting nest tile in the I-direction (RHO-points). !
! IstrU Starting tile index in the I-direction (U-points). !
! IendR Ending tile index in the I-direction (RHO_points). !
! IendT Ending nest tile in the I-direction (RHO_points). !
! !
! JstrR Starting tile index in the J-direction (RHO-points). !
! JstrT Starting nest tile in the J-direction (RHO-points). !
! JstrV Starting tile index in the J-direction (V-points). !
! JendR Ending tile index in the J-direction (RHO_points). !
! JendT Ending nest tile in the J-direction (RHO-points). !
! !
!======================================================================!

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Some questions encountered reading the code

#3 Unread post by kate »

Perhaps some of the figures here would help out. The variables are staggered on an Arakawa C-grid, so v is treated differently from the rest.

Post Reply