/[MITgcm]/MITgcm/pkg/zonal_filt/zonal_filt_postsmooth.F
ViewVC logotype

Annotation of /MITgcm/pkg/zonal_filt/zonal_filt_postsmooth.F

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


Revision 1.2 - (hide annotations) (download)
Fri Feb 2 21:36:30 2001 UTC (23 years, 4 months ago) by adcroft
Branch: MAIN
Changes since 1.1: +57 -0 lines
Merged changes from branch "branch-atmos-merge" into MAIN (checkpoint34)
 - substantial modifications to algorithm sequence (dynamics.F)
 - packaged OBCS, Shapiro filter, Zonal filter, Atmospheric Physics

1 adcroft 1.2 C $Header: /u/gcmpack/models/MITgcmUV/pkg/zonal_filt/Attic/zonal_filt_postsmooth.F,v 1.1.2.1 2001/01/24 16:56:07 adcroft Exp $
2    
3     #include "ZONAL_FILT_OPTIONS.h"
4    
5     SUBROUTINE ZONAL_FILT_POSTSMOOTH(
6     I holeMask,
7     U field,
8     O avgField,
9     I lField,
10     I myThid )
11     C /==========================================================\
12     C | S/R ZONAL_FILT_POSTSMOOTH |
13     C | o After FFT filtering processing. |
14     C |==========================================================|
15     C | Restore the mean value that was removed prior to FFT. |
16     C \==========================================================/
17     IMPLICIT NONE
18    
19     C == Global data ==
20     #include "SIZE.h"
21     #include "EEPARAMS.h"
22     #include "PARAMS.h"
23     #include "GRID.h"
24    
25     C == Routine arguments ==
26     C holeMask - Array with 0 for holes and != 0 for valid data.
27     C lField - Length of field to smooth (assumed periodic)
28     C field - Field smoothed.
29     C avgField - Mean value of the field.
30     C myThid - Thread number of this instance of FFT_PRESMOOTH_IN_X
31     INTEGER lField
32     Real*8 holeMask(lField)
33     Real*8 field(lField)
34     Real*8 avgField
35     INTEGER myThid
36    
37     #ifdef ALLOW_ZONAL_FILT
38    
39     C == Local variables ====
40     C I - Loop counter
41     C
42     INTEGER I
43    
44     C
45     C Add fields mean value back in.
46     DO I=1,lField
47     IF ( holeMask(I) .NE. 0. ) THEN
48     field(I) = field(I) + avgField
49     ELSE
50     field(I) = 0.
51     ENDIF
52     ENDDO
53    
54     #endif /* ALLOW_ZONAL_FILT */
55    
56     RETURN
57     END

  ViewVC Help
Powered by ViewVC 1.1.22