/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_u3_adv_r.F
ViewVC logotype

Annotation of /MITgcm/pkg/generic_advdiff/gad_u3_adv_r.F

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


Revision 1.3.2.1 - (hide annotations) (download)
Tue Feb 26 16:04:48 2002 UTC (22 years, 2 months 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_p11, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.3: +6 -14 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 adcroft 1.3.2.1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_u3_adv_r.F,v 1.4 2002/01/08 21:43:24 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "GAD_OPTIONS.h"
5    
6 adcroft 1.3 CBOP
7     C !ROUTINE: GAD_U3_ADV_R
8    
9     C !INTERFACE: ==========================================================
10 jmc 1.1 SUBROUTINE GAD_U3_ADV_R(
11     I bi,bj,k,
12     I rTrans,
13     I tracer,
14     O wT,
15     I myThid )
16 adcroft 1.3
17     C !DESCRIPTION:
18     C Calculates the area integrated vertical flux due to advection of a tracer
19     C using upwind biased third-order interpolation (or the $\kappa=1/3$ scheme):
20     C \begin{equation*}
21     C F^r_{adv} = W \overline{ \theta - \frac{1}{6} \delta_{kk} \theta }^k
22     C + \frac{1}{12} |W| \delta_{kkk} \theta
23     C \end{equation*}
24 adcroft 1.3.2.1 C Near boundaries, mask all the gradients ==> still 3rd O.
25 adcroft 1.3
26     C !USES: ===============================================================
27 jmc 1.1 IMPLICIT NONE
28     #include "SIZE.h"
29     #include "GRID.h"
30     #include "GAD.h"
31    
32 adcroft 1.3 C !INPUT PARAMETERS: ===================================================
33     C bi,bj :: tile indices
34     C k :: vertical level
35     C rTrans :: vertical volume transport
36     C tracer :: tracer field
37     C myThid :: thread number
38 jmc 1.1 INTEGER bi,bj,k
39     _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40     _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
41 adcroft 1.3 INTEGER myThid
42    
43     C !OUTPUT PARAMETERS: ==================================================
44     C wT :: vertical advective flux
45 jmc 1.1 _RL wT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46    
47 adcroft 1.3 C !LOCAL VARIABLES: ====================================================
48     C i,j :: loop indices
49     C kp1 :: =min( k+1 , Nr )
50     C km1 :: =max( k-1 , 1 )
51     C km2 :: =max( k-2 , 1 )
52     C Rjm,Rj,Rjp :: differences at i-1,i,i+1
53     C Rjjm,Rjjp :: second differences at i-1,i
54 jmc 1.1 INTEGER i,j,kp1,km1,km2
55 jmc 1.2 _RL Rjm,Rj,Rjp,Rjjm,Rjjp
56 adcroft 1.3 CEOP
57 jmc 1.1
58     km2=MAX(1,k-2)
59     km1=MAX(1,k-1)
60     kp1=MIN(Nr,k+1)
61    
62     IF ( k.EQ.1 .OR. k.GT.Nr ) THEN
63     DO j=1-Oly,sNy+Oly
64     DO i=1-Olx,sNx+Olx
65     wT(i,j) = 0.
66     ENDDO
67     ENDDO
68     ELSE
69     DO j=1-Oly,sNy+Oly
70     DO i=1-Olx,sNx+Olx
71     Rjp=(tracer(i,j,kp1,bi,bj)-tracer(i,j,k,bi,bj))
72 adcroft 1.3.2.1 & *maskC(i,j,kp1,bi,bj)
73 jmc 1.1 Rj=(tracer(i,j,k,bi,bj)-tracer(i,j,km1,bi,bj))
74     Rjm=(tracer(i,j,km1,bi,bj)-tracer(i,j,km2,bi,bj))
75 adcroft 1.3.2.1 & *maskC(i,j,km2,bi,bj)
76     Rjjp=Rjp-Rj
77     Rjjm=Rj-Rjm
78 jmc 1.1 wT(i,j) = maskC(i,j,km1,bi,bj)*(
79     & rTrans(i,j)*(
80     & (Tracer(i,j,k,bi,bj)+Tracer(i,j,km1,bi,bj))*0.5 _d 0
81     & -oneSixth*(Rjjm+Rjjp)*0.5 _d 0 )
82     & +ABS(rTrans(i,j))*
83     & oneSixth*(Rjjm-Rjjp)*0.5 _d 0
84     & )
85     ENDDO
86     ENDDO
87     ENDIF
88    
89     RETURN
90     END

  ViewVC Help
Powered by ViewVC 1.1.22