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

Contents of /MITgcm/pkg/zonal_filt/zonal_filt_init.F

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


Revision 1.4.2.1 - (show annotations) (download)
Tue Feb 26 16:04:50 2002 UTC (23 years ago) by adcroft
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_chkpt44d_post, release1_p12, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.4: +10 -7 lines
Merging changes on MAIN between checkpoint43 and checkpoint43a-release1mods
Command: cvs -q update -jcheckpoint43 -jcheckpoint43a-release1mods -d -P

These changes are most of the changes between c43 and c44 except those
that occured after "12:45 11 Jan 2002". As far as I can tell it is
checkpoint43 with the following mods:

  o fix bug in mom_vi_del2uv
  o select when filters are applied ; add options to zonal_filter (data.zonfilt)  o gmredi: fix Pb in the adiabatic form ; add options (.e.g. Bolus advection)
  o update AIM experiments (NCEP input files)
  o improve and extend diagnostics (Monitor, TimeAve with NonLin-FrSurf)
  o added some stuff for AD
  o Jamar wet-points

This update does not contain the following mods that are in checkpoint44

  o bug fix in pkg/generic_advdiff/
    - thread related bug, bi,bj arguments in vertical advection routines
  o some changes to pkg/autodiff, pkg/cost, pkg/exf, pkg/ecco,
    verification/carbon and model/src/ related to adjoint
  o some new Matlab scripts for diagnosing model density
    - utils/matlab/dens_poly3.m and ini_poly3.m

The list of exclusions is accurate based on a "cvs diff". The list of
inclusions is based on the record in doc/tag-index which may not be complete.

1 C $Header: /u/gcmpack/MITgcm/pkg/zonal_filt/zonal_filt_init.F,v 1.5 2001/12/11 14:50:14 jmc Exp $
2 C $Name: $
3
4 #include "ZONAL_FILT_OPTIONS.h"
5
6 SUBROUTINE ZONAL_FILT_INIT(myThid)
7
8 C /==========================================================\
9 C | S/R ZONAL_FILT_INIT |
10 C | o Initialise FFT filter for latitude circle. |
11 C |==========================================================|
12 C | The details of particular FFT libraries may differ. |
13 C | Changing to a different library may entail modifying the |
14 C | code here. However, the broad process is usually the |
15 C | same. |
16 C | Note - Fourier modes for sNx and sNx+1 are damped in the |
17 C | same way. This is because we have not implemented |
18 C | a scheme that sets the damping factor for the |
19 C | highest wave number for odd sNx. Instead the |
20 C | highest wave number for odd sNx. Instead only |
21 C | wave numbers 1:INT(sNx/2) are partially damped. |
22 C | Wave number sNx/2 (if it exists) is removed |
23 C | altogether. |
24 C \==========================================================/
25 IMPLICIT NONE
26
27 C == Global data ==
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "GRID.h"
32 #include "ZONAL_FILT.h"
33 #include "FFTPACK.h"
34
35 C == Routine arguments ==
36 C myThid - Thread number of this instance of FILTER_LATCIRC_FFT_INIT
37 INTEGER myThid
38
39 #ifdef ALLOW_ZONAL_FILT
40
41 C == Local variables ==
42 C alpha - Used to evaluate frequency and latitude dependent
43 C amplitude damping factor.
44 C wvNum - Wave number
45 C lat - Temporary holding latitude
46 C nWv - No. of waves that fit on grid.
47 _RL alpha, wvNum, lat
48 INTEGER I, J, bi, bj, nPoints, nWv
49 _RL one
50 PARAMETER( one = 1.0 )
51 _RS ampfact,Y
52 ampfact(Y,I) = min( one,
53 & ( cos( abs(Y)*deg2rad )
54 & /cos( zonal_filt_lat*deg2rad ) )**zonal_filt_cospow
55 & /(sin( PI*float(I)/float(Nx) ) )**zonal_filt_sinpow
56 & )
57
58 _BEGIN_MASTER(myThid)
59 C o Initialise specific library FFT package
60 DO bj=1,nSy
61 C CALL R8FFTI( Nx, FFTPACKWS(1,bj) )
62 CALL R8FFTI1( Nx, FFTPACKWS2(1,bj), FFTPACKWS3(1,bj) )
63 ENDDO
64
65 C o Set amplitude scale factor as function of latitude and mode number
66 DO bj=1,nSy
67 DO bi=1,nSx
68 DO j=1-oLy,sNy+Oly
69 ampFactor(1,J,bi,bj) = one
70 ampFactorV(1,J,bi,bj) = one
71 DO i=1,Nx/2-1
72 ampFactor(2*I,J,bi,bj) = ampfact( yC(1,J,bi,bj) , I )
73 C IF (ampFactor(2*I,J,bi,bj).LE..9) ampFactor(2*I,J,bi,bj)=0.
74 ampFactor(2*I+1,J,bi,bj) = ampFactor(2*I,J,bi,bj)
75 ampFactorV(2*I,J,bi,bj) = ampfact( yG(1,J,bi,bj) , I )
76 C IF (ampFactorV(2*I,J,bi,bj).LE..9) ampFactorV(2*I,J,bi,bj)=0.
77 ampFactorV(2*I+1,J,bi,bj) = ampFactorV(2*I,J,bi,bj)
78 ENDDO
79
80 I=Nx/2
81 IF ( zonal_filt_mode2dx.EQ.0 ) THEN
82 ampFactor(Nx,J,bi,bj) = ampfact( yC(1,J,bi,bj) , I )
83 ampFactorV(Nx,J,bi,bj) = ampfact( yG(1,J,bi,bj) , I )
84 ELSE
85 ampFactor(Nx,J,bi,bj) = 0.
86 ampFactorV(Nx,J,bi,bj) = 0.
87 ENDIF
88
89 ENDDO
90 ENDDO
91 ENDDO
92 _END_MASTER(myThid)
93 CALL BAR2(myThid)
94
95 CALL WRITE_REC_XY_RL( 'ampFactor', ampFactor, 1, 0, myThid )
96
97 #endif /* ALLOW_ZONAL_FILT */
98
99 RETURN
100 END

  ViewVC Help
Powered by ViewVC 1.1.22