[Mitgcm-support] Re: Held & Saurez random numbers

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:46:29 EDT 2003


Think the easiest thing is to seed with
just a +0.001 degree anomaly in each 
hemisphere.

Thats what I am doing at the mom.
It procudes perfectly symmetric results
for first 3 or so months as expected
and then doesn't have any multi-proc. problems
or introduce hemipsheric biases.
e.g.
 
C--    Initialise temperature field to Held & Saurez equilibrium theta
       DO bj = myByLo(myThid), myByHi(myThid)
        DO bi = myBxLo(myThid), myBxHi(myThid)
         DO K=1,Nr
          Ro_SeaLevel=1.E5
          thKappa = 2./7.
          thetaLim = 200. / ((rC(K)/Ro_SeaLevel)**thKappa)
          DO J=1,sNy
           term1=60.*(sin(yC(1,J,bi,bj)*deg2rad)**2)
           term2=10.*log((rC(K)/Ro_SeaLevel))
     &              *(cos(yC(1,J,bi,bj)*deg2rad)**2)
           thetaEq=315.-term1-term2
           DO I=1,sNx
            theta(I,J,K,bi,bj) = MAX( thetaLim, thetaEq )
c    &                          + 0.01*(RAND()-0.5)
C    &                          + 0.01*(PORT_RAND()-0.5)
C           Symmetric perturbation for seeding eddies
C           Need to fix-up port_rand() for threads and MP.
C           Under multi-cpu threading port_rand() has problems
C           because it uses SAVE.
            jG = myYGlobalLo+(bj-1)*sNy+J-1
            IF ( I .EQ. 64 .AND. JG .EQ. Ny/4      ) THEN
             theta(I,J,K,bi,bj) =
     &       theta(I,J,K,bi,bj) + 0.01
            ENDIF
            IF ( I .EQ. 64 .AND. JG .EQ. Ny-Ny/4+1 ) THEN
             theta(I,J,K,bi,bj) =
     &       theta(I,J,K,bi,bj) + 0.01
            ENDIF
C           theta(I,J,K,bi,bj) = tRef(K)
           ENDDO
          ENDDO
         ENDDO
        ENDDO
       ENDDO

Chris



Alistair Adcroft wrote:
> 
> J-M/C,
> 
> I thought we had made hs94.128x64x5 reproducable between
> single and multiple processors but the latest pre38
> isn't?
> 
> A



More information about the MITgcm-support mailing list