/[MITgcm]/MITgcm/pkg/seaice/seaice_ctrl_map_ini.F
ViewVC logotype

Contents of /MITgcm/pkg/seaice/seaice_ctrl_map_ini.F

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


Revision 1.5 - (show annotations) (download)
Wed Jun 24 08:25:22 2009 UTC (14 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +7 -7 lines
third step of cleaning up the 3-time levels of UICE,VICE,HEFF,AREA:
ad-related change

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ctrl_map_ini.F,v 1.4 2009/04/28 18:20:02 jmc Exp $
2 C $Name: $
3
4 #include "SEAICE_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: seaice_ctrl_map_ini
8 C !INTERFACE:
9 subroutine seaice_ctrl_map_ini( mythid )
10
11 C !DESCRIPTION: \bv
12 c *=================================================================
13 c | SUBROUTINE seaice_ctrl_map_ini
14 c | Add the temperature, salinity, and diffusivity parts of the
15 c | control vector to the model state and update the tile halos.
16 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 "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28 #include "DYNVARS.h"
29 #include "FFIELDS.h"
30 #include "SEAICE.h"
31 #ifdef ALLOW_CTRL
32 # include "ctrl.h"
33 # include "ctrl_dummy.h"
34 # include "optim.h"
35 #endif
36
37 C !INPUT/OUTPUT PARAMETERS:
38 c == routine arguments ==
39 integer mythid
40
41 #ifdef ALLOW_CTRL
42 C !LOCAL VARIABLES:
43 c == local variables ==
44
45 integer bi,bj
46 integer i,j,k
47 integer itlo,ithi
48 integer jtlo,jthi
49 integer jmin,jmax
50 integer imin,imax
51 integer il
52
53 logical equal
54 logical doglobalread
55 logical ladinit
56
57 character*( 80) fnamegeneric
58
59 _RL fac
60 _RL tmptest
61
62 c == external ==
63 integer ilnblnk
64 external ilnblnk
65
66 c == end of interface ==
67 CEOP
68
69 jtlo = mybylo(mythid)
70 jthi = mybyhi(mythid)
71 itlo = mybxlo(mythid)
72 ithi = mybxhi(mythid)
73 jmin = 1
74 jmax = sny
75 imin = 1
76 imax = snx
77
78 doglobalread = .false.
79 ladinit = .false.
80
81 equal = .true.
82
83 if ( equal ) then
84 fac = 1. _d 0
85 else
86 fac = 0. _d 0
87 endif
88
89 #ifdef ALLOW_SIAREA_CONTROL
90 c-- siarea.
91 il=ilnblnk( xx_siarea_file )
92 write(fnamegeneric(1:80),'(2a,i10.10)')
93 & xx_siarea_file(1:il),'.',optimcycle
94 call active_read_xy( fnamegeneric, tmpfld2d, 1,
95 & doglobalread, ladinit, optimcycle,
96 & mythid, xx_siarea_dummy )
97 do bj = jtlo,jthi
98 do bi = itlo,ithi
99 do j = jmin,jmax
100 do i = imin,imax
101 area(i,j,bi,bj) = area(i,j,bi,bj) +
102 & tmpfld2d(i,j,bi,bj)
103 enddo
104 enddo
105 enddo
106 enddo
107 #endif
108
109 #ifdef ALLOW_SIHEFF_CONTROL
110 c-- siheff.
111 il=ilnblnk( xx_siheff_file )
112 write(fnamegeneric(1:80),'(2a,i10.10)')
113 & xx_siheff_file(1:il),'.',optimcycle
114 call active_read_xy( fnamegeneric, tmpfld2d, 1,
115 & doglobalread, ladinit, optimcycle,
116 & mythid, xx_siheff_dummy )
117 do bj = jtlo,jthi
118 do bi = itlo,ithi
119 do j = jmin,jmax
120 do i = imin,imax
121 heff(i,j,bi,bj) = heff(i,j,bi,bj) +
122 & tmpfld2d(i,j,bi,bj)
123 enddo
124 enddo
125 enddo
126 enddo
127 #endif
128
129 #ifdef ALLOW_SIHSNOW_CONTROL
130 c-- sihsnow.
131 il=ilnblnk( xx_sihsnow_file )
132 write(fnamegeneric(1:80),'(2a,i10.10)')
133 & xx_sihsnow_file(1:il),'.',optimcycle
134 call active_read_xy( fnamegeneric, tmpfld2d, 1,
135 & doglobalread, ladinit, optimcycle,
136 & mythid, xx_sihsnow_dummy )
137 do bj = jtlo,jthi
138 do bi = itlo,ithi
139 do j = jmin,jmax
140 do i = imin,imax
141 hsnow(i,j,bi,bj) = hsnow(i,j,bi,bj) +
142 & tmpfld2d(i,j,bi,bj)
143 enddo
144 enddo
145 enddo
146 enddo
147 #endif
148
149 c-- Update the tile edges.
150
151 #ifdef ALLOW_SIAREA_CONTROL
152 _EXCH_XY_RL( area, mythid )
153 #endif
154
155 #ifdef ALLOW_SIHEFF_CONTROL
156 _EXCH_XY_RL( heff, mythid )
157 #endif
158
159 #ifdef ALLOW_SIHSNOW_CONTROL
160 _EXCH_XY_RL( hsnow, mythid )
161 #endif
162
163 #endif /* ALLOW_CTRL */
164
165 return
166 end
167

  ViewVC Help
Powered by ViewVC 1.1.22