source: LMDZ.3.3/trunk/libf/dyn3d/moy2.F @ 5306

Last change on this file since 5306 was 2, checked in by lmdz, 25 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 546 bytes
Line 
1      SUBROUTINE moy2(np,px,py,pwx,pwy,pz)
2
3c=======================================================================
4c
5c   calcul de la moyenne ponderee de deux champs
6c   z (i) = [ wx*x(i) + wy*y(i) ] / [ wx + wy ]
7c
8c=======================================================================
9
10      IMPLICIT NONE
11      INTEGER np
12      REAL px(np),py(np),pz(np)
13      REAL pwx,pwy
14
15      REAL zwx,zwy
16      INTEGER i
17
18      zwx=pwx/(pwx+pwy)
19      zwy=pwy/(pwx+pwy)
20
21      DO i=1,np
22         pz(i)=px(i)*zwx+py(i)*zwy
23      ENDDO
24
25      RETURN
26      END
Note: See TracBrowser for help on using the repository browser.