Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Initialization of tracers along the water column

Initialization of tracers along the water column 10 years 2 months ago #14269

  • Gaeta
  • Gaeta's Avatar
I found the problem in the fortran file, previously posted.
IF(NTRAC.GT.0) THEN
	DO ITRAC=1,NTRAC
!         CALL OS('X=C     ',X=TA%ADR(ITRAC)%P,C=TRAC0(ITRAC))
          DO IPLAN=1,NPLAN
            DO I=1,NPOIN2
              J=NPOIN2*(IPLAN-1)+I
               IF(IPLAN.GE.3) THEN   ! IPLAN=1: bed, IPLAN=NPLAN: surface
                   TA%ADR(ITRAC)%P%R(J) = 20.D0
               ELSE
                   TA%ADR(ITRAC)%P%R(J) = 10.D0
               ENDIF
            ENDDO
        ENDDO
	ENDDO

Now It runs! :whistle:

G
The administrator has disabled public write access.

Re: Initialization of tracers along the water column 7 years 3 weeks ago #28087

  • Tim Ruga
  • Tim Ruga's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hello Sébatsien,

Because the DO loop index is "I" shouldn't the third line below be "IF( I.EQ.1 ) THEN" ?

DO I=1,NTRAC
CALL OS( 'X=C ', X=TA%ADR(I)%P, C=TRAC0(I))
IF( ITRAC.EQ.1 ) THEN ! ITRAC=1: is your tracer

Thanks in advance,

- Tim
The administrator has disabled public write access.

Re: Initialization of tracers along the water column 7 years 3 weeks ago #28089

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Yes - in fact DO I=1,NTRAC should read DO ITRAC=1,NTRAC
...
Gaeta has the correct version.

Sébastien.
The administrator has disabled public write access.

Re: Initialization of tracers along the water column 7 years 1 week ago #28158

  • Schmirre
  • Schmirre's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 1
Pierre-Louis Ligier have a nice solution for this problem (in condim.f) that you might like to look into aswell.

I paste the code below. The vectors of course need to be introduced in the beginning as:

DOUBLE PRECISION TEMP_PLLI(13),SALT_PLLI(13)

Where the lenght of the vectors (13) correspond to the number of vertical layers. The temperature for each layer is then specified in the vectors (marked as bold text below)



!*************PLLI***********
IF(NTRAC.GT.0) THEN
!
! Vectors with TEMP(Plan1), TEMP(Plan2) etc, + SALT
TEMP_PLLI = (/5.8D0,5.8D0,6.3D0,6.5D0,8.D0,9.3D0,10.8D0,
& 12.D0,14.D0,14.2D0,14.5D0,14.5D0,14.5D0/)


!
SALINITY_PLLI = (/4.48D0,4.48D0,4.29D0,4.09D0,3.90D0,3.70D0,3.51D0,
& 3.31D0,3.12D0,2.92D0,2.73D0,2.73D0,2.73D0/)

!
DO IPLAN=1,NPLAN
DO I=1,NPOIN2
J=NPOIN2*(IPLAN-1)+I
TA%ADR(1)%P%R(J)=TEMP_PLLI(IPLAN) !TEMP
TA%ADR(2)%P%R(J)=SALINITY_PLLI(IPLAN) ! SALINITY
TA%ADR(3)%P%R(J)=0.D0 !AIR
ENDDO
ENDDO
WRITE (LU,*) 'STRATIFICATION PROFILES OK'
ENDIF
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.