ana_diag.F mpi

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Post Reply
Message
Author
aurelieponte
Posts: 2
Joined: Mon Jun 13, 2005 3:57 pm
Location: SCRIPPS

ana_diag.F mpi

#1 Unread post by aurelieponte »

Hi all,

I am currently trying to output diagnostics of kinetic energy, potential energy, work done by the wind ... within an mpi run and using ana_diag.h.

Looking at /Nonlinear/diag.F (where energetical diagnostics are computed) and /Functionals/ana_diag.h, I got confused about how I should sum the diagnostics variables over the domain.

In /Nonlinear/diag.F for example, diagnostics seemed to be summed over each tiles first:
DO j=Jstr,Jend
DO k=N(ng),1,-1
DO i=Istr,Iend
u2v2=u(i ,j,k,nstp)*u(i ,j,k,nstp)+ &
...
and then in between tile:
IF (tile_count.eq.0) THEN
...
CALL mp_reduce (ng, iNLM, Nreduce, buffer, op_handle)
...

In /Functionals/ana_diag.h, there is however:
DO k=1,N(ng)
DO j=0,Mm(ng)+1
DO i=1,Lm(ng)+1
umax=MAX(umax,u(i,j,k,nnew(ng)))
...
which seems to indicate that a sum over the whole domain is possible (?)

What the difference between both approaches ?
Is it that one is parallel and the other one not ?

Thanks

Aurelien

Post Reply