/[MITgcm]/MITgcm/pkg/grdchk/grdchk_init.F
ViewVC logotype

Annotation of /MITgcm/pkg/grdchk/grdchk_init.F

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


Revision 1.4 - (hide annotations) (download)
Sat Jul 13 02:55:58 2002 UTC (21 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint46f_post, checkpoint48e_post, checkpoint46b_post, checkpoint46l_pre, checkpoint48b_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint46j_pre, checkpoint48h_post, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint48a_post, checkpoint47j_post, branch-exfmods-tag, checkpoint46e_pre, checkpoint48c_post, checkpoint46b_pre, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint46g_post, checkpoint47f_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint47, checkpoint48, checkpoint46h_post, checkpoint48g_post, checkpoint47h_post, checkpoint46d_post
Branch point for: branch-exfmods-curt
Changes since 1.3: +9 -1 lines
Merging from release1_p5
o added Eliassen Palm flux controls to gradient check package

1 heimbach 1.4 C $Header: /u/gcmpack/MITgcm/pkg/grdchk/grdchk_init.F,v 1.2.4.2 2002/07/11 15:00:29 heimbach Exp $
2 heimbach 1.2
3     #include "CTRL_CPPOPTIONS.h"
4    
5    
6     subroutine grdchk_init(
7     I mythid
8     & )
9    
10     c ==================================================================
11     c SUBROUTINE grdchk_init
12     c ==================================================================
13     c
14     c o Get the location of a given component of the control vector for
15     c the current process.
16     c
17     c started: Christian Eckert eckert@mit.edu 04-Apr-2000
18     c continued: heimbach@mit.edu: 13-Jun-2001
19     c
20     c ==================================================================
21     c SUBROUTINE grdchk_init
22     c ==================================================================
23    
24     implicit none
25    
26     c == global variables ==
27    
28     #include "EEPARAMS.h"
29     #include "SIZE.h"
30     #include "GRID.h"
31     #include "ctrl.h"
32     #include "grdchk.h"
33    
34     c == routine arguments ==
35    
36     integer mythid
37    
38     #ifdef ALLOW_GRADIENT_CHECK
39     c == local variables ==
40    
41     integer bi,bj
42     integer i,j,k
43     integer irec
44     integer itlo,ithi
45     integer jtlo,jthi
46     integer jmin,jmax
47     integer imin,imax
48    
49     integer itest
50     integer icomptest
51    
52     c == end of interface ==
53    
54     jtlo = 1
55     jthi = nsy
56     itlo = 1
57     ithi = nsx
58     jmin = 1
59     jmax = sny
60     imin = 1
61     imax = snx
62    
63     _BEGIN_MASTER( mythid )
64    
65     c-- Determine the number of components of the given
66     c-- control variable on the current tile.
67     if ( ncvargrd(grdchkvarindex) .eq. 'c' ) then
68     do bj = jtlo,jthi
69     do bi = itlo,ithi
70     do k = 1,ncvarnrmax(grdchkvarindex)
71     nwettile(bi,bj,k) = nwetctile(bi,bj,k)
72     enddo
73     enddo
74     enddo
75     else if ( ncvargrd(grdchkvarindex) .eq. 's' ) then
76     do bj = jtlo,jthi
77     do bi = itlo,ithi
78     do k = 1,ncvarnrmax(grdchkvarindex)
79     nwettile(bi,bj,k) = nwetstile(bi,bj,k)
80     enddo
81     enddo
82     enddo
83     else if ( ncvargrd(grdchkvarindex) .eq. 'w' ) then
84     do bj = jtlo,jthi
85     do bi = itlo,ithi
86     do k = 1,ncvarnrmax(grdchkvarindex)
87     nwettile(bi,bj,k) = nwetwtile(bi,bj,k)
88 heimbach 1.4 enddo
89     enddo
90     enddo
91     else if ( ncvargrd(grdchkvarindex) .eq. 'v' ) then
92     do bj = jtlo,jthi
93     do bi = itlo,ithi
94     do k = 1,ncvarnrmax(grdchkvarindex)
95     nwettile(bi,bj,k) = nwetvtile(bi,bj,k)
96 heimbach 1.2 enddo
97     enddo
98     enddo
99     else
100     ce --> wrong grid specification for the control variable.
101     endif
102    
103     c ----------------------------------------------------------------
104    
105     c-- Determine the actual and the maximum possible number of
106     c-- components of the given control variable.
107     ncvarcomp = 0
108     maxncvarcomps = 0
109     do bj = jtlo,jthi
110     do bi = itlo,ithi
111     do k = 1,ncvarnrmax(grdchkvarindex)
112     ncvarcomp = ncvarcomp + nwettile(bi,bj,k)
113     maxncvarcomps = maxncvarcomps + snx*sny
114     enddo
115     enddo
116     enddo
117     ncvarcomp = ncvarcomp*ncvarrecs(grdchkvarindex)
118     maxncvarcomps = maxncvarcomps*ncvarrecs(grdchkvarindex)
119    
120     _END_MASTER( mythid )
121    
122     _BARRIER
123    
124     #endif /* ALLOW_GRADIENT_CHECK */
125    
126     end
127    

  ViewVC Help
Powered by ViewVC 1.1.22