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

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

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


Revision 1.1 - (hide annotations) (download)
Thu Jun 21 04:06:21 2007 UTC (16 years, 11 months ago) by heimbach
Branch: MAIN
Adding AREA, HEFF, HSNOW as control variables.

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

  ViewVC Help
Powered by ViewVC 1.1.22