Custom Query (964 matches)
Results (592 - 594 of 964)
Ticket | Owner | Reporter | Resolution | Summary |
---|---|---|---|---|
#552 | Done | IMPORTANT: OpenMP shared-memory directives Revisited | ||
Description |
This update includes a full revision of ROMS shared-memory pragma directives using OpenMP standard. This is a very important and delicate update that requires expertise. Luckly, I doubth that will affect your customized code. All the parallel loops of ROMS are modified to simpler directives. For example, the old strategy: !$OMP PARALLEL DO PRIVATE(thread,subs,tile) SHARED(numthreads) DO thread=0,numthreads-1 subs=NtileX(ng)*NtileE(ng)/numthreads DO tile=subs*thread,subs*(thread+1)-1,+1 ... END DO END DO !$OMP END PARALLEL DO is replaced with: DO tile=first_tile(ng),last_tile(ng),+1 ... END DO !$OMP BARRIER In shared-memory, the parallel threads are spawn in the higher calling routines (drivers). For example, we now have: !$OMP PARALLEL CALL main3d (RunInterval) !$OMP END PARALLEL This directive is less restrictive and allows MASTER, BARRIER, and other useful OpenMP pragmas inside the parallel regions. If you are interested, please see the following discussion in the Forum. This change cleans the code and facilitates parallelization of tricky algorithms for nesting, MPDATA, random number generation, point-sources, etc using the shared-memory paradigm. WARNINGS:
Many thanks to Sasha shchepetkin for suggesting this strategy. Also many thanks to Mark Hadfield for his persistence and testing. |
|||
#553 | Done | Added biological behavior to Langrangian Drifters: Oyster Model | ||
Description |
A new option FLOAT_OYSTER has been added to model the swimming, sinking, and settlement of planktonic oyster larvae. This development includes the infrastructure to add different behaviors to the Lagrangian drifters (FLOATS). The design is similar to that of the ecosystem models in ROMS and includes several header files, as described below. This option is under the umbrella of internal C-preprocessing flag FLOAT_BIOLOGY, which is defined in globaldefs.h. The biological behavior for the floats is achieved by interpolating additional variables using interp_floats in step_floats.F and then calling biology_floats in the predictor and corrector steps: # ifdef FLOAT_BIOLOGY ! !----------------------------------------------------------------------- ! Compute biological float behavior, corrector step. !----------------------------------------------------------------------- ! CALL biology_floats (ng, Lstr, Lend, .FALSE., my_thread) # endif The planktonic behavior is based on the model of Dekshenieks et al. (1993; 1996; 1997). It calculates the size (length) and development of oyster larvae. This model was implement in ROMS with the help of Diego Narvaez as part of his Ph.D. dissertation. Many thanks to John Klinck for his suggestions about the numerical implementation using the predictor/corrector scheme of the floats. Results about this oyster model can be found in Narvaez et al. 2012 a,b (J. Mar. Res., in review). This model includes the following files:
NOTES:
This capability illustrates how the biological behavior kernel can be implemented in ROMS floats. It is up to the user to validate and test their own customized behavior models. Good luck... |
|||
#554 | Done | Added capability for partial lateral boundaries | ||
Description |
Updated the lateral boundary conditions routines to allow partial boundary conditions in nesting applications. The switch LBC_apply is introduced to specify which boundary point is set in the lateral boundary routines. It is declared in mod_boundary.F: TYPE T_APPLY logical, pointer :: west(:) logical, pointer :: east(:) logical, pointer :: south(:) logical, pointer :: north(:) END TYPE TYPE (T_APPLY), allocatable :: LBC_apply(:) These switches are set to TRUE by default. However in composite grids, the points processed by nesting are set to FALSE to allow mixed boundary conditions along the grid edges. For example, in zetabc.F, we now have: ! ! Western edge, gradient boundary condition. ! ELSE IF (LBC(iwest,isFsur,ng)%gradient) THEN DO j=Jstr,Jend IF (LBC_apply(ng)%west(j)) THEN zeta(Istr-1,j,kout)=zeta(Istr,j,kout) #ifdef MASKING zeta(Istr-1,j,kout)=zeta(Istr-1,j,kout)* & & GRID(ng)%rmask(Istr-1,j) #endif END IF END DO Updated distribute.F to allow mp_collect to process integer data. Now we have the following interface: INTERFACE mp_collect MODULE PROCEDURE mp_collect_f MODULE PROCEDURE mp_collect_i END INTERFACE mp_collect where mp_collect_f is for floating-point data and mp_collect_i is for integer data. However, we still use mp_collect globally. The interface selects the appropriate internal routine according to the dummy arguments. I reorganized the indices of the code profiling regions in mp_exchange.F to include the regions for nesting computations. See mod_strings.F for details. Notice that the documentation in mod_strings.F was improved to easily see the profiling regions numbers and associated text. |