1 |
|
2 |
#include "COST_CPPOPTIONS.h" |
3 |
|
4 |
subroutine cost_state_final( myThid ) |
5 |
C /==========================================================\ |
6 |
C | subroutine cost_state_final | |
7 |
C | o This routine assigns final T,S to cost function | |
8 |
C \==========================================================/ |
9 |
implicit none |
10 |
|
11 |
C == Global variables === |
12 |
#include "SIZE.h" |
13 |
#include "EEPARAMS.h" |
14 |
#include "PARAMS.h" |
15 |
#include "GRID.h" |
16 |
#include "DYNVARS.h" |
17 |
|
18 |
#include "cost.h" |
19 |
|
20 |
C ======== Routine arguments ====================== |
21 |
C myThid - Thread number for this instance of the routine. |
22 |
integer myThid |
23 |
|
24 |
#ifdef ALLOW_COST_STATE_FINAL |
25 |
C ========= Local variables ========================= |
26 |
integer i, j, k |
27 |
integer bi, bj |
28 |
|
29 |
DO bj=myByLo(myThid),myByHi(myThid) |
30 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
31 |
DO j=1,sNy |
32 |
DO i=1,sNx |
33 |
DO k=1,nr |
34 |
objf_state_final(i,j,bi,bj,0*Nr+k) = theta(i,j,k,bi,bj) |
35 |
objf_state_final(i,j,bi,bj,1*Nr+k) = salt(i,j,k,bi,bj) |
36 |
objf_state_final(i,j,bi,bj,2*Nr+k) = uvel(i,j,k,bi,bj) |
37 |
objf_state_final(i,j,bi,bj,3*Nr+k) = vvel(i,j,k,bi,bj) |
38 |
END DO |
39 |
objf_state_final(i,j,bi,bj,4*Nr+1) = etan(i,j,bi,bj) |
40 |
END DO |
41 |
END DO |
42 |
END DO |
43 |
END DO |
44 |
|
45 |
cph fc = objf_state_final(45,4,1,1,1) |
46 |
cph _GLOBAL_SUM_R8( fc , myThid ) |
47 |
cph print *, 'fc for admtlm test at 83,33 : ', fc |
48 |
|
49 |
#endif |
50 |
|
51 |
end |