/[MITgcm]/MITgcm/model/src/ini_cg2d.F
ViewVC logotype

Diff of /MITgcm/model/src/ini_cg2d.F

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

revision 1.30 by jmc, Tue Feb 20 15:06:21 2001 UTC revision 1.31 by jmc, Tue Mar 6 16:51:02 2001 UTC
# Line 20  C     === Global variables === Line 20  C     === Global variables ===
20  #include "PARAMS.h"  #include "PARAMS.h"
21  #include "GRID.h"  #include "GRID.h"
22  #include "DYNVARS.h"  #include "DYNVARS.h"
23  #include "CG2D.h"  #include "SURFACE.h"
24    #include "CG2D_INTERNAL.h"
25  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
26  #include "OBCS.h"  #include "OBCS.h"
27  #endif  #endif
# Line 45  C     myNorm - Work variable used in clc Line 46  C     myNorm - Work variable used in clc
46        _RS     myNorm        _RS     myNorm
47        _RL     aC, aCw, aCs        _RL     aC, aCw, aCs
48    
49    C-- Initialise -Boyancy at surface level : Bo_surf
50    C   Bo_surf is defined as d/dr(Phi_surf) and set to g/rtoz (linear free surface)
51    C     with rtoz = conversion factor from r-unit to z-unit  (=horiVertRatio)
52    C   an acurate formulation will include P_surf and T,S_surf effects on rho_surf:
53    C    z-ocean (rtoz=1) : Bo_surf = - Boyancy = gravity * rho_surf/rho_0
54    C    p-atmos (rtoz=rho_c*g) : Bo_surf = (1/rho)_surf
55    C--
56          IF ( buoyancyRelation .EQ. 'ATMOSPHERIC' ) THEN
57            DO bj=myByLo(myThid),myByHi(myThid)
58             DO bi=myBxLo(myThid),myBxHi(myThid)
59              DO J=1-Oly,sNy+Oly
60               DO I=1-Olx,sNx+Olx
61                 Bo_surf(I,J,bi,bj) = recip_rhoConst
62                 recip_Bo(I,J,bi,bj) = rhoConst
63               ENDDO
64              ENDDO
65             ENDDO
66            ENDDO
67          ELSE
68            DO bj=myByLo(myThid),myByHi(myThid)
69             DO bi=myBxLo(myThid),myBxHi(myThid)
70              DO J=1-Oly,sNy+Oly
71               DO I=1-Olx,sNx+Olx
72                 Bo_surf(I,J,bi,bj) = gravity
73                 recip_Bo(I,J,bi,bj) = recip_Gravity
74               ENDDO
75              ENDDO
76             ENDDO
77            ENDDO
78          ENDIF
79    
80    C--   Update overlap regions
81          _EXCH_XY_R8(Bo_surf, myThid)
82          _EXCH_XY_R8(recip_Bo, myThid)
83    
84  C--   Initialise laplace operator  C--   Initialise laplace operator
85  C     aW2d: integral in Z Ax/dX  C     aW2d: integral in Z Ax/dX
86  C     aS2d: integral in Z Ay/dY  C     aS2d: integral in Z Ay/dY
# Line 207  C     CALL PLOT_FIELD_XYRS( pW, 'pW   IN Line 243  C     CALL PLOT_FIELD_XYRS( pW, 'pW   IN
243  C     CALL PLOT_FIELD_XYRS( pS, 'pS   INI_CG2D.2' , 1, myThid )  C     CALL PLOT_FIELD_XYRS( pS, 'pS   INI_CG2D.2' , 1, myThid )
244  CcnhDebugEnds  CcnhDebugEnds
245    
 C--   Set default values for initial guess and RHS  
       IF ( startTime .EQ. 0 ) THEN  
        DO bj=myByLo(myThid),myByHi(myThid)  
         DO bi=myBxLo(myThid),myBxHi(myThid)  
          DO J=1,sNy  
           DO I=1,sNx  
            cg2d_x(I,J,bi,bj) = 0. _d 0  
            cg2d_b(I,J,bi,bj) = 0. _d 0  
 #ifdef INCLUDE_CD_CODE  
            cg2d_xNM1(I,J,bi,bj) = 0. _d 0  
 #endif  
           ENDDO  
          ENDDO  
         ENDDO  
        ENDDO  
 C--    Update overlap regions  
        _EXCH_XY_R8(cg2d_x, myThid)  
        _EXCH_XY_R8(cg2d_b, myThid)  
 #ifdef INCLUDE_CD_CODE  
        _EXCH_XY_R8(cg2d_xNM1, myThid)  
 #endif  
       ENDIF  
   
246        RETURN        RETURN
247        END        END

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.22