/[MITgcm]/MITgcm_contrib/gael/pkg/smooth/smooth_ensemble3D.F
ViewVC logotype

Annotation of /MITgcm_contrib/gael/pkg/smooth/smooth_ensemble3D.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Oct 16 03:36:34 2009 UTC (15 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
bring pkg/smooth up to date

1 gforget 1.1 #include "CPP_OPTIONS.h"
2    
3     subroutine smooth_ensemble3D (mythid)
4    
5    
6     IMPLICIT NONE
7     #include "SIZE.h"
8     #include "EEPARAMS.h"
9     #include "GRID.h"
10     #include "PARAMS.h"
11     c#include "tamc.h"
12     #include "smooth.h"
13    
14    
15     _RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
16     _RL fld_mean(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
17     _RL fld_meansq(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
18     _RL fld_norm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
19     character*( 80) fnamegeneric
20     integer i,j,k,bi,bj
21     integer itlo,ithi
22     integer jtlo,jthi
23     integer myThid
24     _RL port_rand, port_rand_norm
25     integer iii,ii,nbRand
26    
27     jtlo = mybylo(mythid)
28     jthi = mybyhi(mythid)
29     itlo = mybxlo(mythid)
30     ithi = mybxhi(mythid)
31    
32    
33    
34     C initialize the random number generator:
35     fld_in(1,1,1,1,1)=port_rand(1)
36     nbRand=1000
37    
38     C main loop:
39     DO ii=1,nbRand
40     WRITE(standardMessageUnit,'(A,I4)')
41     & 'smooth_ensemble3D ii: ',ii
42    
43     C define a perturbation:
44     DO bj=jtlo,jthi
45     DO bi=itlo,ithi
46     DO k=1,Nr
47     DO j=1-OLy,sNy+OLy
48     DO i=1-OLx,sNx+OLx
49     fld_in(i,j,k,bi,bj)=0.
50     if (maskC(i,j,k,bi,bj).NE.0) then
51     fld_in(i,j,k,bi,bj)=port_rand_norm()
52     endif
53     ENDDO
54     ENDDO
55     ENDDO
56     ENDDO
57     ENDDO
58 gforget 1.2 _EXCH_XYZ_RL ( fld_in, myThid )
59 gforget 1.1
60     C the smoothing itself:
61     call smooth_correl3D(fld_in,1,mythid)
62    
63     write(fnamegeneric(1:80),'(1a,i3.3)')
64     & 'wc01_3Densemble.',ii
65     call mdswritefield(fnamegeneric,32,.false.,'RL',
66     & nR,fld_in,1,1,mythid)
67    
68     ENDDO
69    
70    
71     end

  ViewVC Help
Powered by ViewVC 1.1.22