1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "CTRL_CPPOPTIONS.h" |
#include "CTRL_CPPOPTIONS.h" |
5 |
|
|
11 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
12 |
c *================================================================= |
c *================================================================= |
13 |
c | SUBROUTINE ctrl_map_ini |
c | SUBROUTINE ctrl_map_ini |
14 |
c | Add the temperature, salinity, and diffusivity parts of the |
c | Add the temperature, salinity, and diffusivity parts of the |
15 |
c | control vector to the model state and update the tile halos. |
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". |
c | The control vector is defined in the header file "ctrl.h". |
17 |
c *================================================================= |
c *================================================================= |
18 |
C \ev |
C \ev |
32 |
#include "optim.h" |
#include "optim.h" |
33 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
34 |
# include "PTRACERS_SIZE.h" |
# include "PTRACERS_SIZE.h" |
35 |
# include "PTRACERS.h" |
c#include "PTRACERS_PARAMS.h" |
36 |
|
# include "PTRACERS_FIELDS.h" |
37 |
#endif |
#endif |
38 |
#ifdef ALLOW_ECCO |
#ifdef ALLOW_ECCO |
39 |
# include "ecco_cost.h" |
# include "ecco_cost.h" |
118 |
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) + |
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) + |
119 |
& fac*tmpfld3d(i,j,k,bi,bj) |
& fac*tmpfld3d(i,j,k,bi,bj) |
120 |
#endif |
#endif |
121 |
if(theta(i,j,k,bi,bj).lt.-2.0) |
#ifndef DISABLE_CTRL_THETA_LIMIT |
122 |
& theta(i,j,k,bi,bj)= -2.0 |
if(theta(i,j,k,bi,bj).lt.-2.0) |
123 |
|
& theta(i,j,k,bi,bj)= -2.0 |
124 |
|
#endif |
125 |
enddo |
enddo |
126 |
enddo |
enddo |
127 |
enddo |
enddo |
204 |
do j = jmin,jmax |
do j = jmin,jmax |
205 |
do i = imin,imax |
do i = imin,imax |
206 |
cph sst(i,j,bi,bj) = sst(i,j,bi,bj) + tmpfld2d(i,j,bi,bj) |
cph sst(i,j,bi,bj) = sst(i,j,bi,bj) + tmpfld2d(i,j,bi,bj) |
207 |
theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj) |
theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj) |
208 |
& + tmpfld2d(i,j,bi,bj) |
& + tmpfld2d(i,j,bi,bj) |
209 |
enddo |
enddo |
210 |
enddo |
enddo |
345 |
do bi = itlo,ithi |
do bi = itlo,ithi |
346 |
do j = jmin,jmax |
do j = jmin,jmax |
347 |
do i = imin,imax |
do i = imin,imax |
348 |
bottomdragfld(i,j,bi,bj) = bottomdragfld(i,j,bi,bj) |
bottomdragfld(i,j,bi,bj) = bottomdragfld(i,j,bi,bj) |
349 |
& + tmpfld2d(i,j,bi,bj) |
& + tmpfld2d(i,j,bi,bj) |
350 |
enddo |
enddo |
351 |
enddo |
enddo |
467 |
etaN(i,j,bi,bj) = etaN(i,j,bi,bj) + |
etaN(i,j,bi,bj) = etaN(i,j,bi,bj) + |
468 |
& fac*xx_etan(i,j,bi,bj) |
& fac*xx_etan(i,j,bi,bj) |
469 |
#else |
#else |
470 |
etaN(i,j,bi,bj) = etaN(i,j,bi,bj) + |
etaN(i,j,bi,bj) = etaN(i,j,bi,bj) + |
471 |
& fac*tmpfld2d(i,j,bi,bj) |
& fac*tmpfld2d(i,j,bi,bj) |
472 |
#endif |
#endif |
473 |
enddo |
enddo |
488 |
do bi = itlo,ithi |
do bi = itlo,ithi |
489 |
do j = jmin,jmax |
do j = jmin,jmax |
490 |
do i = imin,imax |
do i = imin,imax |
491 |
lambdaThetaClimRelax(i,j,bi,bj) = |
lambdaThetaClimRelax(i,j,bi,bj) = |
492 |
& lambdaThetaClimRelax(i,j,bi,bj) |
& lambdaThetaClimRelax(i,j,bi,bj) |
493 |
& + tmpfld2d(i,j,bi,bj) |
& + tmpfld2d(i,j,bi,bj) |
494 |
enddo |
enddo |
495 |
enddo |
enddo |
509 |
do bi = itlo,ithi |
do bi = itlo,ithi |
510 |
do j = jmin,jmax |
do j = jmin,jmax |
511 |
do i = imin,imax |
do i = imin,imax |
512 |
lambdaSaltClimRelax(i,j,bi,bj) = |
lambdaSaltClimRelax(i,j,bi,bj) = |
513 |
& lambdaSaltClimRelax(i,j,bi,bj) |
& lambdaSaltClimRelax(i,j,bi,bj) |
514 |
& + tmpfld2d(i,j,bi,bj) |
& + tmpfld2d(i,j,bi,bj) |
515 |
enddo |
enddo |
516 |
enddo |
enddo |
518 |
enddo |
enddo |
519 |
#endif |
#endif |
520 |
|
|
521 |
|
#ifdef ALLOW_SEAICE |
522 |
|
call seaice_ctrl_map_ini( mythid ) |
523 |
|
#endif |
524 |
|
|
525 |
c-- Update the tile edges. |
c-- Update the tile edges. |
526 |
|
|
527 |
#if (defined (ALLOW_THETA0_CONTROL) || defined (ALLOW_SST0_CONTROL)) |
#if (defined (ALLOW_THETA0_CONTROL) || defined (ALLOW_SST0_CONTROL)) |