21 |
#include "PARAMS.h" |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
#include "GRID.h" |
23 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
24 |
#ifdef USE_QSW |
c for Qsw and/or surfaceForcingT |
25 |
|
c choice which field to take pCO2 from for pCO2limit |
26 |
|
c this assumes we use Ttendency from offline |
27 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
|
#endif |
|
28 |
#ifdef ALLOW_LONGSTEP |
#ifdef ALLOW_LONGSTEP |
29 |
#include "LONGSTEP.h" |
#include "LONGSTEP.h" |
30 |
#endif |
#endif |
44 |
#include "WAVEBANDS_PARAMS.h" |
#include "WAVEBANDS_PARAMS.h" |
45 |
#endif |
#endif |
46 |
|
|
47 |
|
|
48 |
C === Global variables === |
C === Global variables === |
49 |
c tracers |
c tracers |
50 |
_RL Ptr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nDarwin) |
_RL Ptr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nDarwin) |
98 |
_RL Edz(tlam,Nr),Esz(tlam,Nr),Euz(tlam,Nr),Eutop(tlam,Nr) |
_RL Edz(tlam,Nr),Esz(tlam,Nr),Euz(tlam,Nr),Eutop(tlam,Nr) |
99 |
_RL tirrq(nr) |
_RL tirrq(nr) |
100 |
_RL tirrwq(tlam,nr) |
_RL tirrwq(tlam,nr) |
101 |
|
_RL c1(tlam,nr), c2(tlam,nr) |
102 |
_RL solz |
_RL solz |
103 |
_RL rmud |
_RL rmud |
104 |
_RL actot,bctot,bbctot |
_RL actot,bctot,bbctot |
197 |
_RL PSiupl |
_RL PSiupl |
198 |
_RL Tlocal |
_RL Tlocal |
199 |
_RL Slocal |
_RL Slocal |
200 |
|
_RL pCO2local |
201 |
_RL Qswlocal |
_RL Qswlocal |
202 |
_RL NH4l |
_RL NH4l |
203 |
_RL NO2l |
_RL NO2l |
634 |
I darwin_radtrans_kmax,darwin_radtrans_niter, |
I darwin_radtrans_kmax,darwin_radtrans_niter, |
635 |
O Edz,Esz,Euz,Eutop, |
O Edz,Esz,Euz,Eutop, |
636 |
O tirrq,tirrwq, |
O tirrq,tirrwq, |
637 |
|
O c1,c2, |
638 |
I myThid) |
I myThid) |
639 |
#else |
#else |
640 |
c dzlocal ????? |
c dzlocal ????? |
815 |
Slocal = salt(i,j,k,bi,bj) |
Slocal = salt(i,j,k,bi,bj) |
816 |
#endif |
#endif |
817 |
|
|
818 |
|
c choice where to get pCO2 from |
819 |
|
c taking from igsm dic run - fed through Tflux array |
820 |
|
c pCO2local=surfaceForcingT(i,j,bi,bj) |
821 |
|
c or from darwin carbon module |
822 |
|
#ifdef ALLOW_CARBON |
823 |
|
pCO2local=pCO2(i,j,bi,bj) |
824 |
|
#else |
825 |
|
pCO2local=280. _d -6 |
826 |
|
#endif |
827 |
|
|
828 |
freefu = max(freefe(i,j,k),0. _d 0) |
freefu = max(freefe(i,j,k),0. _d 0) |
829 |
if (k.eq.1) then |
if (k.eq.1) then |
830 |
inputFel = inputFe(i,j,bi,bj) |
inputFel = inputFe(i,j,bi,bj) |
941 |
I pofeupl, psiupl, |
I pofeupl, psiupl, |
942 |
I PARl, |
I PARl, |
943 |
I Tlocal, Slocal, |
I Tlocal, Slocal, |
944 |
|
I pCO2local, |
945 |
I freefu, inputFel, |
I freefu, inputFel, |
946 |
I bottom, dzlocal, |
I bottom, dzlocal, |
947 |
O Rstarl, RNstarl, |
O Rstarl, RNstarl, |
1341 |
& Eutop(ilam,k)*dtplankton |
& Eutop(ilam,k)*dtplankton |
1342 |
enddo |
enddo |
1343 |
#endif |
#endif |
1344 |
|
#ifdef DAR_DIAG_IRR_AMPS |
1345 |
|
do ilam = 1,tlam |
1346 |
|
c1ave(i,j,k,bi,bj,ilam)=c1ave(i,j,k,bi,bj,ilam)+ |
1347 |
|
& c1(ilam,k)*dtplankton |
1348 |
|
c2ave(i,j,k,bi,bj,ilam)=c2ave(i,j,k,bi,bj,ilam)+ |
1349 |
|
& c2(ilam,k)*dtplankton |
1350 |
|
enddo |
1351 |
|
#endif |
1352 |
#ifdef DAR_DIAG_ABSORP |
#ifdef DAR_DIAG_ABSORP |
1353 |
do ilam = 1,tlam |
do ilam = 1,tlam |
1354 |
aave(i,j,k,bi,bj,ilam)=aave(i,j,k,bi,bj,ilam)+ |
aave(i,j,k,bi,bj,ilam)=aave(i,j,k,bi,bj,ilam)+ |
1373 |
& bbpart_k(k,ilam)*dtplankton |
& bbpart_k(k,ilam)*dtplankton |
1374 |
enddo |
enddo |
1375 |
#endif |
#endif |
1376 |
|
#ifdef DAR_RADTRANS |
1377 |
|
if (k.eq.1) then |
1378 |
|
rmudave(i,j,bi,bj)=rmudave(i,j,bi,bj)+ |
1379 |
|
& rmud*dtplankton |
1380 |
|
endif |
1381 |
|
#endif |
1382 |
#ifdef DAR_DIAG_RSTAR |
#ifdef DAR_DIAG_RSTAR |
1383 |
do np=1,npmax |
do np=1,npmax |
1384 |
Rstarave(i,j,k,bi,bj,np)=Rstarave(i,j,k,bi,bj,np)+ |
Rstarave(i,j,k,bi,bj,np)=Rstarave(i,j,k,bi,bj,np)+ |