1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "DIC_OPTIONS.h" |
5 |
|
6 |
cphc$taf common DIC_XX adname = addic_xx |
7 |
cphc$taf common DIC_COST_CTRL adname = ADDIC_COST_CTRL |
8 |
|
9 |
|
10 |
C !INTERFACE: ========================================================== |
11 |
subroutine dic_set_control( myThid ) |
12 |
|
13 |
C !DESCRIPTION: |
14 |
|
15 |
C !USES: =============================================================== |
16 |
implicit none |
17 |
|
18 |
C == GLobal variables == |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#ifdef DIC_BIOTIC |
23 |
# include "DIC_VARS.h" |
24 |
# include "DIC_DIAGS.h" |
25 |
# include "DIC_CTRL.h" |
26 |
#endif |
27 |
#include "ctrl.h" |
28 |
#include "ctrl_dummy.h" |
29 |
#include "optim.h" |
30 |
C == Routine arguments == |
31 |
_RL fac |
32 |
INTEGER myThid |
33 |
|
34 |
cph#ifdef DIC_BIOTIC |
35 |
C == Local arguments == |
36 |
INTEGER bi, bj |
37 |
INTEGER i, j |
38 |
integer il |
39 |
logical doglobalread |
40 |
logical ladinit |
41 |
logical equal |
42 |
character*( 80) fnamegen2d |
43 |
c == external == |
44 |
integer ilnblnk |
45 |
external ilnblnk |
46 |
|
47 |
c == end of interface == |
48 |
CEOP |
49 |
|
50 |
doglobalread = .false. |
51 |
ladinit = .false. |
52 |
|
53 |
equal = .true. |
54 |
|
55 |
if ( equal ) then |
56 |
fac = 1. _d 0 |
57 |
c fac = 1.d-3 |
58 |
else |
59 |
fac = 0. _d 0 |
60 |
endif |
61 |
|
62 |
print*,'QQ alpha before', alpha(20,10,1,1) |
63 |
|
64 |
il=ilnblnk( xx_gen_2d_file ) |
65 |
write(fnamegen2d(1:80),'(2a,i10.10)') |
66 |
& xx_gen_2d_file(1:il),'.',optimcycle |
67 |
call active_read_xy_loc( fnamegen2d, tmpfld2d, 1, |
68 |
& doglobalread, ladinit, optimcycle, |
69 |
& mythid, xx_gen_2d_dummy ) |
70 |
|
71 |
DO bj=myByLo(myThid),myByHi(myThid) |
72 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
73 |
do i = 1, sNx |
74 |
do j = 1, sNy |
75 |
c alpha (i,j,bi,bj) = alpha(i,j,bi,bj)*(1.+xx_dic(1)) |
76 |
feload(i,j,bi,bj) = feload(i,j,bi,bj) + |
77 |
& fac*tmpfld2d(i,j,bi,bj) |
78 |
cswd -- QQ limits! |
79 |
cph if (alpha(i,j,bi,bj).gt.alphamax) then |
80 |
cph alpha(i,j,bi,bj)=alphamax |
81 |
cph endif |
82 |
cph if (alpha(i,j,bi,bj).lt.alphamin) then |
83 |
cph alpha(i,j,bi,bj)=alphamin |
84 |
cph endif |
85 |
cswd -- QQ limits |
86 |
rain_ratio(i,j,bi,bj) = |
87 |
& rain_ratio(i,j,bi,bj) + |
88 |
& rain_ratio(i,j,bi,bj) * xx_dic(2) |
89 |
end do |
90 |
end do |
91 |
end do |
92 |
end do |
93 |
|
94 |
_EXCH_XY_RL( alpha, mythid ) |
95 |
_EXCH_XY_RL( rain_ratio, mythid ) |
96 |
_EXCH_XY_RL( alpfe, mythid ) |
97 |
_EXCH_XY_RL( feload, mythid ) |
98 |
|
99 |
|
100 |
KScav = KScav * (1.+1.e+6*xx_dic(3)) |
101 |
ligand_stab = ligand_stab * (1.+1.e+6*xx_dic(4)) |
102 |
ligand_tot = ligand_tot * (1.+1.e+6*xx_dic(5)) |
103 |
|
104 |
print*,'QQ - preturb alpha', alpha(20,10,1,1), |
105 |
& tmpfld2d(20,10,1,1) |
106 |
print *,'COST KScav = ', KScav |
107 |
print *,'COST ligand_stab = ', ligand_stab |
108 |
print *,'COST ligand_tot = ', ligand_tot |
109 |
|
110 |
cph#endif /* DIC_BIOTIC */ |
111 |
|
112 |
end |