| [2] | 1 | SUBROUTINE cal_br_st(nx,im,jm,px,paire,pxav,pxst) |
|---|
| 2 | IMPLICIT NONE |
|---|
| 3 | |
|---|
| 4 | c======================================================================= |
|---|
| 5 | c |
|---|
| 6 | c Auteur: Frederic Hourdin 01/01/91 |
|---|
| 7 | c ------- |
|---|
| 8 | c |
|---|
| 9 | c Objet: Decomposition d'un champ meteorologique sous |
|---|
| 10 | c ------ x = < x > + x' |
|---|
| 11 | c ou < x > est la moyenne zonale du champ |
|---|
| 12 | c |
|---|
| 13 | c en fait pour un champ x(nlong,nlat) on n'effectue la |
|---|
| 14 | c moyenne que sur les nomg-1 premiere longitude |
|---|
| 15 | c |
|---|
| 16 | c Interface: |
|---|
| 17 | c ---------- |
|---|
| 18 | c |
|---|
| 19 | c Input: |
|---|
| 20 | c ------ |
|---|
| 21 | c |
|---|
| 22 | c nlong nombre de longitude |
|---|
| 23 | c nlat nombre de latitudes a decomposer |
|---|
| 24 | c px(nlong,nlat) champ d'entre |
|---|
| 25 | c |
|---|
| 26 | c Output: |
|---|
| 27 | c ------- |
|---|
| 28 | c |
|---|
| 29 | c pxav(nlong,nlat) champ moyen |
|---|
| 30 | c pxst(nlong,nlat) ecart a la moyenne |
|---|
| 31 | c |
|---|
| 32 | c======================================================================= |
|---|
| 33 | |
|---|
| 34 | c----------------------------------------------------------------------- |
|---|
| 35 | c 0.Declarations: |
|---|
| 36 | c --------------- |
|---|
| 37 | |
|---|
| 38 | c Arguments: |
|---|
| 39 | c ---------- |
|---|
| 40 | |
|---|
| 41 | #include "dimensions.h" |
|---|
| 42 | INTEGER im,jm,nx |
|---|
| 43 | REAL paire(im+1,jm) |
|---|
| 44 | REAL px(im+1,jm,nx),pxav(jm,nx),pxst(im+1,jm,nx) |
|---|
| 45 | |
|---|
| 46 | c Local: |
|---|
| 47 | c ------ |
|---|
| 48 | |
|---|
| 49 | REAL znorm(jjm+1) |
|---|
| 50 | INTEGER i,j,ix |
|---|
| 51 | EXTERNAL SSUM |
|---|
| 52 | REAL SSUM |
|---|
| 53 | |
|---|
| 54 | c----------------------------------------------------------------------- |
|---|
| 55 | c 1. Initialisations: |
|---|
| 56 | c ------------------- |
|---|
| 57 | |
|---|
| 58 | c----------------------------------------------------------------------- |
|---|
| 59 | c 2. Calcul du champ moyen: |
|---|
| 60 | c ------------------------- |
|---|
| 61 | |
|---|
| 62 | DO j=1,jm |
|---|
| 63 | znorm(j)=1./SSUM(iim,paire(1,j),1) |
|---|
| 64 | ENDDO |
|---|
| 65 | DO ix=1,nx |
|---|
| 66 | DO j=1,jm |
|---|
| 67 | pxav(j,ix)=0. |
|---|
| 68 | DO i=1,im |
|---|
| 69 | pxav(j,ix)=pxav(j,ix)+paire(i,j)*px(i,j,ix) |
|---|
| 70 | ENDDO |
|---|
| 71 | pxav(j,ix)=pxav(j,ix)*znorm(j) |
|---|
| 72 | ENDDO |
|---|
| 73 | ENDDO |
|---|
| 74 | |
|---|
| 75 | c----------------------------------------------------------------------- |
|---|
| 76 | c 3. Ecart a la moyenne: |
|---|
| 77 | c ---------------------- |
|---|
| 78 | |
|---|
| 79 | DO ix=1,nx |
|---|
| 80 | DO j=1,jm |
|---|
| 81 | DO i=1,im |
|---|
| 82 | pxst(i,j,ix)=px(i,j,ix)-pxav(j,ix) |
|---|
| 83 | ENDDO |
|---|
| 84 | ENDDO |
|---|
| 85 | ENDDO |
|---|
| 86 | |
|---|
| 87 | c----------------------------------------------------------------------- |
|---|
| 88 | |
|---|
| 89 | RETURN |
|---|
| 90 | END |
|---|