/[MITgcm]/MITgcm/pkg/ctrl/ctrl_depth_ini.F
ViewVC logotype

Annotation of /MITgcm/pkg/ctrl/ctrl_depth_ini.F

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


Revision 1.6 - (hide annotations) (download)
Fri Aug 10 19:38:57 2012 UTC (11 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63r, checkpoint63s, checkpoint64, checkpoint65, checkpoint65h, checkpoint65i, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.5: +9 -9 lines
rename CTRL_CPPOPTIONS.h to CTRL_OPTIONS.h

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_depth_ini.F,v 1.5 2012/07/31 16:05:56 heimbach Exp $
2 heimbach 1.2 C $Name: $
3 heimbach 1.1
4 jmc 1.6 #include "CTRL_OPTIONS.h"
5 heimbach 1.1
6     CBOP
7     C !ROUTINE: ctrl_depth_ini
8     C !INTERFACE:
9     subroutine ctrl_depth_ini( mythid )
10    
11     C !DESCRIPTION: \bv
12     c *=================================================================
13 jmc 1.6 c | SUBROUTINE ctrl_depth_ini
14 heimbach 1.1 c | Add the depth part of the control vector to the model state
15 jmc 1.6 c | and update the tile halos.
16 heimbach 1.1 c | The control vector is defined in the header file "ctrl.h".
17     c *=================================================================
18     C \ev
19    
20     C !USES:
21     implicit none
22    
23     c == global variables ==
24     #include "EEPARAMS.h"
25     #include "SIZE.h"
26     #include "GRID.h"
27 heimbach 1.5 #include "CTRL_SIZE.h"
28 heimbach 1.1 #include "ctrl.h"
29     #include "ctrl_dummy.h"
30     #include "optim.h"
31    
32     C !INPUT/OUTPUT PARAMETERS:
33     c == routine arguments ==
34     integer mythid
35    
36     #ifdef ALLOW_DEPTH_CONTROL
37     C !LOCAL VARIABLES:
38     c == local variables ==
39    
40     integer bi,bj
41     integer i,j,k
42     integer itlo,ithi
43     integer jtlo,jthi
44     integer jmin,jmax
45     integer imin,imax
46     integer il
47    
48     logical equal
49     logical doglobalread
50     logical ladinit
51    
52     character*( 80) fnamedepth
53     character*(max_len_mbuf) msgbuf
54    
55     _RL fac
56    
57     c == external ==
58     integer ilnblnk
59     external ilnblnk
60    
61     c == end of interface ==
62     CEOP
63    
64     jtlo = mybylo(mythid)
65     jthi = mybyhi(mythid)
66     itlo = mybxlo(mythid)
67     ithi = mybxhi(mythid)
68     jmin = 1-oly
69     jmax = sny+oly
70     imin = 1-olx
71     imax = snx+olx
72    
73     doglobalread = .false.
74     ladinit = .false.
75    
76     equal = .true.
77    
78     if ( equal ) then
79     fac = 1. _d 0
80     else
81     fac = 0. _d 0
82     endif
83    
84 jmc 1.6 write(standardmessageunit,'(21x,a)')
85 heimbach 1.1 & 'ctrl_depth_ini: ctrl update R_low,'
86 jmc 1.6 write(standardmessageunit,'(21x,a)')
87 heimbach 1.1 & ' adding the control vector.'
88    
89     C Re-initialize hFacC, so that TAMC/TAF can see it
90     C Once hFacC is the control variable, and not its anomaly
91     C this will be no longer necessary
92     do bj = jtlo,jthi
93     do bi = itlo,ithi
94     do j = jmin,jmax
95     do i = imin,imax
96     tmpfld2d(i,j,bi,bj) = 0. _d 0
97     enddo
98     enddo
99     enddo
100     enddo
101    
102 jmc 1.6 C--
103 heimbach 1.1 do bj = jtlo,jthi
104     do bi = itlo,ithi
105     do j = jmin,jmax
106     do i = imin,imax
107 jmc 1.6 xx_r_low(i,j,bi,bj) = 0. _d 0
108 heimbach 1.1 enddo
109     enddo
110     enddo
111     enddo
112    
113     il=ilnblnk( xx_depth_file )
114     write(fnamedepth(1:80),'(2a,i10.10)')
115     & xx_depth_file(1:il),'.',optimcycle
116 heimbach 1.2 call active_read_xy( fnamedepth, tmpfld2d, 1,
117 heimbach 1.1 & doglobalread, ladinit, optimcycle,
118     & mythid, xx_depth_dummy )
119     do bj = jtlo,jthi
120     do bi = itlo,ithi
121     do j = jmin,jmax
122     do i = imin,imax
123 jmc 1.6 xx_r_low(i,j,bi,bj) = r_low(i,j,bi,bj)
124 heimbach 1.1 & + fac*tmpfld2d(i,j,bi,bj)
125     enddo
126     enddo
127     enddo
128     enddo
129    
130     c-- Update the tile edges.
131    
132 jmc 1.4 _EXCH_XY_RL( xx_r_low, myThid )
133 heimbach 1.1
134     #endif /* ALLOW_DEPTH_CONTROL */
135    
136     return
137     end
138    

  ViewVC Help
Powered by ViewVC 1.1.22