1 |
heimbach |
1.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 |
|
|
c DO k=1,nr |
32 |
|
|
DO j=1,sNy |
33 |
|
|
DO i=1,sNx |
34 |
|
|
objf_state_final(i,j,bi,bj) = theta(i,j,1,bi,bj) |
35 |
|
|
cph objf_state_final(i,j,k,bi,bj,1) = theta(i,j,k,bi,bj) |
36 |
|
|
cph objf_state_final(i,j,k,bi,bj,2) = salt(i,j,k,bi,bj) |
37 |
|
|
END DO |
38 |
|
|
END DO |
39 |
|
|
c END DO |
40 |
|
|
END DO |
41 |
|
|
END DO |
42 |
|
|
|
43 |
heimbach |
1.2 |
cph fc = objf_state_final(45,4,1,1) |
44 |
|
|
cph _GLOBAL_SUM_R8( fc , myThid ) |
45 |
|
|
cph print *, 'fc for admtlm test at 83,33 : ', fc |
46 |
heimbach |
1.1 |
|
47 |
|
|
#endif |
48 |
|
|
|
49 |
|
|
end |