Opened 14 years ago

Last modified 14 years ago

#469 closed bug

IMPORTANT: Corrected parallel bug in ini_fields.F and friends — at Initial Version

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

Description

  • In src:ticket:178, Kate reported a shared-memory and serial with partition parallel bug in ini_fields.F when computing the vertically-integrated velocities (ubar, vbar). We needed to have the computation of Hz via set_depth in a different parallel region. In that ticket, I introduced a new routine ini_zeta which initialize Zt_avg1 to the initial conditions for zeta. The values of Zt_avg1 (time-averaged/filtered zeta) are the ones that actually used in set_depth.F. Well, all of this is fine but I forgot to move the call to set_depth from ini_fields.F. It is embarrassing... This needs to be done in a different parallel region in main3d.F:
    !
    !  Initialize free-surface and compute initial level thicknesses and
    !  depths.
    !
    !$OMP PARALLEL DO PRIVATE(thread,subs,tile) SHARED(ng,numthreads)
            DO thread=0,numthreads-1
              subs=NtileX(ng)*NtileE(ng)/numthreads
              DO tile=subs*thread,subs*(thread+1)-1,+1
                CALL ini_zeta (ng, TILE, iNLM)
                CALL set_depth (ng, TILE)
              END DO
            END DO
    !$OMP END PARALLEL DO
    !
    !  Initialize other state variables.
    !
    !$OMP PARALLEL DO PRIVATE(thread,subs,tile) SHARED(ng,numthreads)
            DO thread=0,numthreads-1
              subs=NtileX(ng)*NtileE(ng)/numthreads
              DO tile=subs*(thread+1)-1,subs*thread,-1
                CALL ini_fields (ng, TILE, iNLM)
              END DO
            END DO
    !$OMP END PARALLEL DO
    
  • The stratigraphic contributions to the bathymetry (h) are moved to ini_zeta since they are needed in set_depth when SEDIMENT and SED_MORPH are activated.
  • The routine ini_fields.F was cleaned and reorganized. This included the TLM, RPM, and ADM versions.
  • Corrected a distributed-memory I/O bug in periodic application for the radiation stress variables Sxx_bar, Sxy_bar, Syy_bar, Sxx, Sxy, Syy, Szx, and Szy. These are all ouput variables and not used in ROMS kernel. A mp_exchange2 and mp_exchange3 is needed for these variables.
  • By the way, the only way to apply periodic boundary conditions in a ROMS distributed-memory (MPI) application with more that one partition in the periodic direction is by a call to any of the mp_exchange routines since the array elements to be exchanged reside in a different node.
  • Re-organized routine radiation_stress.F to include new file nearshore_mellor05.h. It turns out the there are various formulations for radiation stresses in the literature. The formulation of Mellor (2005) has some fundamental problems which were addressed in Mellor (2008) reformulation. In the future, we plan to have other formulations available in ROMS. This is a very active topic in the literature nowadays. Be aware that the formulation currently distributed in ROMS is the one described by Mellor (2005) which has been replaced in Mellor (2008). This new formulation is still under testing and not available. John Warner is working on other formulations nowadays.
  • To facilitate future developments, the option NEARSHORE_MELLOR is renamed to NEARSHORE_MELLOR05.
  • The driver routine radiation_stress.F will be renamed in the future to a more generic name since it will include other types of wave forcing.

Change History (0)

Note: See TracTickets for help on using tickets.