| 2 |
|
|
| 3 |
#include "CTRL_CPPOPTIONS.h" |
#include "CTRL_CPPOPTIONS.h" |
| 4 |
|
|
| 5 |
|
CBOP |
| 6 |
|
C !ROUTINE: ctrl_map_ini |
| 7 |
|
C !INTERFACE: |
| 8 |
|
subroutine ctrl_map_ini( mythid ) |
| 9 |
|
|
| 10 |
|
C !DESCRIPTION: \bv |
| 11 |
|
c *================================================================= |
| 12 |
|
c | SUBROUTINE 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 |
subroutine ctrl_map_ini( |
C !USES: |
|
I mythid |
|
|
& ) |
|
|
|
|
|
c ================================================================== |
|
|
c SUBROUTINE ctrl_map_ini |
|
|
c ================================================================== |
|
|
c |
|
|
c o Add the temperature and salinity parts of the control vector to |
|
|
c the model state and update the tile edges. The control vector is |
|
|
c defined in the header file "ctrl.h". |
|
|
c |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
|
|
c |
|
|
c changed: Christian Eckert eckert@mit.edu 23-Feb-2000 |
|
|
c |
|
|
c - Restructured the code in order to create a package |
|
|
c for the MITgcmUV. |
|
|
c |
|
|
c ================================================================== |
|
|
c SUBROUTINE ctrl_map_ini |
|
|
c ================================================================== |
|
|
|
|
| 20 |
implicit none |
implicit none |
| 21 |
|
|
| 22 |
c == global variables == |
c == global variables == |
|
|
|
| 23 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
| 24 |
#include "SIZE.h" |
#include "SIZE.h" |
| 25 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
| 26 |
#include "TR1.h" |
#include "TR1.h" |
|
|
|
| 27 |
#include "ctrl.h" |
#include "ctrl.h" |
| 28 |
#include "ctrl_dummy.h" |
#include "ctrl_dummy.h" |
| 29 |
#include "optim.h" |
#include "optim.h" |
| 30 |
|
|
| 31 |
|
C !INPUT/OUTPUT PARAMETERS: |
| 32 |
c == routine arguments == |
c == routine arguments == |
|
|
|
| 33 |
integer mythid |
integer mythid |
| 34 |
|
|
| 35 |
|
C !LOCAL VARIABLES: |
| 36 |
c == local variables == |
c == local variables == |
| 37 |
|
|
|
_RL fac |
|
| 38 |
integer bi,bj |
integer bi,bj |
| 39 |
integer i,j,k |
integer i,j,k |
| 40 |
integer itlo,ithi |
integer itlo,ithi |
| 53 |
character*( 80) fnamediffkr |
character*( 80) fnamediffkr |
| 54 |
character*( 80) fnamekapgm |
character*( 80) fnamekapgm |
| 55 |
|
|
| 56 |
c == external == |
_RL fac |
| 57 |
|
|
| 58 |
|
c == external == |
| 59 |
integer ilnblnk |
integer ilnblnk |
| 60 |
external ilnblnk |
external ilnblnk |
| 61 |
|
|
| 62 |
c == end of interface == |
c == end of interface == |
| 63 |
|
CEOP |
| 64 |
|
|
| 65 |
jtlo = mybylo(mythid) |
jtlo = mybylo(mythid) |
| 66 |
jthi = mybyhi(mythid) |
jthi = mybyhi(mythid) |
| 98 |
do i = imin,imax |
do i = imin,imax |
| 99 |
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) + |
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) + |
| 100 |
& fac*tmpfld3d(i,j,k,bi,bj) |
& fac*tmpfld3d(i,j,k,bi,bj) |
| 101 |
gtNm1(i,j,k,bi,bj) = gtNm1(i,j,k,bi,bj) + |
cph gtNm1(i,j,k,bi,bj) = gtNm1(i,j,k,bi,bj) + |
| 102 |
& fac*tmpfld3d(i,j,k,bi,bj) |
cph & fac*tmpfld3d(i,j,k,bi,bj) |
| 103 |
enddo |
enddo |
| 104 |
enddo |
enddo |
| 105 |
enddo |
enddo |
| 123 |
do i = imin,imax |
do i = imin,imax |
| 124 |
salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj) + |
salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj) + |
| 125 |
& fac*tmpfld3d(i,j,k,bi,bj) |
& fac*tmpfld3d(i,j,k,bi,bj) |
| 126 |
gsNm1(i,j,k,bi,bj) = gsNm1(i,j,k,bi,bj) + |
cph gsNm1(i,j,k,bi,bj) = gsNm1(i,j,k,bi,bj) + |
| 127 |
& fac*tmpfld3d(i,j,k,bi,bj) |
cph & fac*tmpfld3d(i,j,k,bi,bj) |
| 128 |
enddo |
enddo |
| 129 |
enddo |
enddo |
| 130 |
enddo |
enddo |
| 148 |
do i = imin,imax |
do i = imin,imax |
| 149 |
tr1(i,j,k,bi,bj) = tr1(i,j,k,bi,bj) + |
tr1(i,j,k,bi,bj) = tr1(i,j,k,bi,bj) + |
| 150 |
& fac*tmpfld3d(i,j,k,bi,bj) |
& fac*tmpfld3d(i,j,k,bi,bj) |
| 151 |
gsNm1(i,j,k,bi,bj) = gsNm1(i,j,k,bi,bj) + |
cph gtr1Nm1(i,j,k,bi,bj) = gtr1Nm1(i,j,k,bi,bj) + |
| 152 |
& fac*tmpfld3d(i,j,k,bi,bj) |
cph & fac*tmpfld3d(i,j,k,bi,bj) |
| 153 |
enddo |
enddo |
| 154 |
enddo |
enddo |
| 155 |
enddo |
enddo |