62 |
_RL sfac(1-OLy:sNy+OLy) |
_RL sfac(1-OLy:sNy+OLy) |
63 |
_RL lit, atten |
_RL lit, atten |
64 |
_RL nutlimit |
_RL nutlimit |
65 |
|
_RL tmpfe, tmppo4 |
66 |
#ifdef AD_SAFE |
#ifdef AD_SAFE |
67 |
_RL thx, thy, theps |
_RL thx, thy, theps |
68 |
#endif |
#endif |
106 |
print*,'QQ lit', lit |
print*,'QQ lit', lit |
107 |
ENDIF |
ENDIF |
108 |
|
|
109 |
|
#ifdef DIC_NO_NEG |
110 |
|
tmppo4=max(0. _d 0, PTR_PO4(i,j,k)) |
111 |
|
lit=max(0. _d 0,lit) |
112 |
|
#else |
113 |
|
tmppo4=PTR_PO4(i,j,k) |
114 |
|
#endif |
115 |
|
|
116 |
#ifdef ALLOW_FE |
#ifdef ALLOW_FE |
117 |
|
#ifdef DIC_NO_NEG |
118 |
|
tmpfe=max(0. _d 0,PTR_FE(i,j,k)) |
119 |
|
#else |
120 |
|
tmpfe=PTR_FE(i,j,k) |
121 |
|
#endif |
122 |
#ifdef AD_SAFE |
#ifdef AD_SAFE |
123 |
thx = PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4) |
thx = tmppo4/(tmppo4+KPO4) |
124 |
thy = PTR_FE(i,j,k)/(PTR_FE(i,j,k)+KFE) |
thy = tmpfe/(tmpfe+KFE) |
125 |
|
c thx = PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4) |
126 |
|
c thy = PTR_FE(i,j,k)/(PTR_FE(i,j,k)+KFE) |
127 |
theps = 1. _d -6 |
theps = 1. _d -6 |
128 |
nutlimit= ( 1. _d 0 - tanh((thx-thy)/theps) ) * thx/2. _d 0 |
nutlimit= ( 1. _d 0 - tanh((thx-thy)/theps) ) * thx/2. _d 0 |
129 |
& +( 1. _d 0 + tanh((thx-thy)/theps) ) * thy/2. _d 0 |
& +( 1. _d 0 + tanh((thx-thy)/theps) ) * thy/2. _d 0 |
130 |
#else |
#else |
131 |
nutlimit= min(PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4), |
nutlimit= min(tmppo4/(tmppo4+KPO4), |
132 |
& PTR_FE(i,j,k)/(PTR_FE(i,j,k)+KFE) ) |
& tmpfe/(tmpfe+KFE) ) |
133 |
#endif |
#endif |
134 |
#else |
#else |
135 |
nutlimit= PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4) |
nutlimit= tmppo4/(tmppo4+KPO4) |
136 |
#endif |
#endif |
137 |
|
|
138 |
bioac(i,j,k)=alpha(i,j,bi,bj)* |
bioac(i,j,k)=alpha(i,j,bi,bj)* |