Opened 5 years ago

Closed 5 years ago

#808 closed bug (Fixed)

VERY IMPORTANT: Corrected parallel bug in regrid.F and bulk_flux.F

Reported by: arango Owned by:
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description

Correct couple parallel bugs:

  • regrid.F: In src:ticket:803, I introduced the processing of EAST longitude.s A parallel was reported for a specific partition. The problem was in the range of the J- and I-loops. We need to have instead:
         IF (EastLon) THEN
           DO j=LBj,UBj
             DO i=LBi,UBi
               MyXout(i,j)=MODULO(Xout(i,j), 360.0_r8)   ! range [0 360]
               IF ((MyXout(i,j).eq.0.0_r8).and.                            &
        &          (Xout(i,j).gt.0.0_r8)) MyXout(i,j)=360.0_r8
             END DO
           END DO
         ELSE
           DO j=LBj,UBj
             DO i=LBi,UBi
               MyXout(i,j)=Xout(i,j)                     ! range [-180 180]
             END DO
           END DO
         END IF
    
    instead of the Imin:Imax and Jmin:Jmax ranges. This was only correct for parallel I/O. In serial I/O these ranges are the global values for the domain. We need to use instead LBi:UBi and LBj:UBj. Many thanks to Ivica Janekovic for reporting this problem and providing good clues. Also, many thanks to John Warner reminding me about the global values.
  • bulk_flux.F: Corrected a parallel bug when activating WIND_MINUS_CURRENT. We need to have instead:
    #ifdef WIND_MINUS_CURRENT
    !
    !  Modify near-surface (2m or 10m) effective winds by subtracting the
    !  ocean surface current (J Wilkin). See:
    !
    !  Bye, J.A.T. and J.-O. Wolff, 1999: Atmosphere-ocean momentum exchange
    !     in general circulation models. J. Phys. Oceanogr. 29, 671-691.
    !
          DO j=Jstr-1,Jend+1
            DO i=Istr-1,MIN(Iend+1,Lm(ng))
              Uair(i,j)=Uwind(i,j)-                                         &
         &              0.5_r8*(u(i,j,N(ng),nrhs)+u(i+1,j,N(ng),nrhs))
            END DO
            IF (DOMAIN(ng)%Eastern_Edge(tile)) THEN
              Uair(Iend+1,j)=Uwind(Iend+1,j)-u(Iend,j,N(ng),nrhs)
            END IF
          END DO
          DO i=Istr-1,Iend+1
            DO j=Jstr-1,MIN(Jend+1,Mm(ng))
              Vair(i,j)=Vwind(i,j)-                                         &
         &              0.5_r8*(v(i,j,N(ng),nrhs)+v(i,j+1,N(ng),nrhs))
            END DO
            IF (DOMAIN(ng)%Northern_Edge(tile)) THEN
              Vair(i,Jend+1)=Vwind(i,Jend+1)-v(i,Jend,N(ng),nrhs)
            END IF
          END DO
    #else
    !
    !  Load wind components to local arrays.
    !
          DO j=Jstr-1,Jend+1
            DO i=Istr-1,Iend+1
              Uair(i,j)=Uwind(i,j)
              Vair(i,j)=Vwind(i,j)
            END DO
          END DO
    #endif
    
  • globaldefs.h: Add logic for runnin WET_DRY applications in single precision:
    /*
    ** Single intrinsic Fortran functions.
    */
    
    #ifdef SINGLE_PRECISION
    # define DSIGN SIGN
    #endif
    
    since there is not a generic Fortran function to do SIGN regardless of the floating-point precision. Many thanks to Ivica Janekovic for bqringing it to my attention.

Change History (1)

comment:1 by arango, 5 years ago

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.