88 |
c set up ecosystem coefficients |
c set up ecosystem coefficients |
89 |
c |
c |
90 |
c seed randomization |
c seed randomization |
91 |
|
_BEGIN_MASTER( myThid ) |
92 |
|
|
93 |
CALL DARWIN_RANDOM_INIT(darwin_seed, myThid) |
CALL DARWIN_RANDOM_INIT(darwin_seed, myThid) |
94 |
|
|
95 |
c initialize total number of functional groups tried |
c initialize total number of functional groups tried |
102 |
#endif |
#endif |
103 |
end do |
end do |
104 |
|
|
105 |
|
_END_MASTER( myThid ) |
106 |
|
|
107 |
c reduce amount of diaz |
c reduce amount of diaz |
108 |
#ifdef ALLOW_DIAZ |
#ifdef ALLOW_DIAZ |
109 |
|
IF (nIter0.EQ.PTRACERS_Iter0) THEN |
110 |
do np = 1, npmax |
do np = 1, npmax |
111 |
if (diazotroph(np) .eq. 1. _d 0) then |
if (diazotroph(np) .eq. 1. _d 0) then |
112 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
123 |
ENDDO |
ENDDO |
124 |
endif |
endif |
125 |
enddo |
enddo |
126 |
|
ENDIF |
127 |
#endif |
#endif |
128 |
|
|
129 |
|
_BEGIN_MASTER( myThid ) |
130 |
|
|
131 |
c initialize zooplankton |
c initialize zooplankton |
132 |
call MONOD_GENERATE_ZOO(MyThid) |
call MONOD_GENERATE_ZOO(MyThid) |
133 |
|
|
171 |
#endif |
#endif |
172 |
#ifdef DYNAMIC_CHL |
#ifdef DYNAMIC_CHL |
173 |
c check Chl fields are reasonable |
c check Chl fields are reasonable |
174 |
|
#ifndef WAVEBANDS |
175 |
|
do np = 1,npmax |
176 |
|
c C:CHl minimum: chosen to be Chl:C at high light (2000uEin/m2/s) and |
177 |
|
c no temp/nutrient limitation |
178 |
|
chl2cmin(np)=chl2cmax(np)/ |
179 |
|
& (1+(chl2cmax(np)*alphachl(np)*2000. _d 0)/ |
180 |
|
& (2*pcmax(np))) |
181 |
|
chl2cmin(np)=0. _d 0 |
182 |
|
enddo |
183 |
|
#else |
184 |
do np=1,npmax |
do np=1,npmax |
185 |
chl2cmin(np)=chl2cmax(np)/ |
chl2cmin(np)=chl2cmax(np)/ |
186 |
& (1+(chl2cmax(np)* alpha_mean(np) *2000. _d 0)/ |
& (1+(chl2cmax(np)* alpha_mean(np) *2000. _d 0)/ |
187 |
& (2*pcmax(np))) |
& (2*pcmax(np))) |
188 |
enddo |
enddo |
|
call MONOD_CHECK_CHL(myThid) |
|
189 |
#endif |
#endif |
190 |
#endif |
#endif |
191 |
c ANNA endif |
#endif |
192 |
|
_END_MASTER( myThid ) |
193 |
|
|
194 |
|
#ifdef GEIDER |
195 |
|
C this initializes fields... |
196 |
|
call MONOD_CHECK_CHL(myThid) |
197 |
|
#endif |
198 |
|
|
199 |
_BEGIN_MASTER(myThid) |
IF ( myProcId.EQ.0 .AND. myThid.EQ.1 ) THEN |
200 |
c write out initial phyto characteristics |
c write out initial phyto characteristics |
201 |
#ifndef GEIDER |
#ifndef GEIDER |
202 |
CALL MDSFINDUNIT( IniUnit1, mythid ) |
CALL MDSFINDUNIT( IniUnit1, mythid ) |
291 |
close(IniUnit1) |
close(IniUnit1) |
292 |
110 format(3f4.0,f6.2,4f4.0,f5.1,4f7.3,2e11.2,2f9.4,f6.1,2i5) |
110 format(3f4.0,f6.2,4f4.0,f5.1,4f7.3,2e11.2,2f9.4,f6.1,2i5) |
293 |
111 format(3f4.0,f6.2,4f4.0,f5.1,4f7.3,2f6.1,2f9.4,f6.1,2i5) |
111 format(3f4.0,f6.2,4f4.0,f5.1,4f7.3,2f6.1,2f9.4,f6.1,2i5) |
294 |
|
c myProcId and myThid |
295 |
|
ENDIF |
296 |
|
|
297 |
CALL LEF_ZERO( fice,myThid ) |
CALL LEF_ZERO( fice,myThid ) |
298 |
CALL LEF_ZERO( inputFe,myThid ) |
CALL LEF_ZERO( inputFe,myThid ) |
325 |
ENDDO |
ENDDO |
326 |
ENDDO |
ENDDO |
327 |
ENDDO |
ENDDO |
328 |
|
#endif |
329 |
|
|
330 |
IF ( .NOT. ( startTime .EQ. baseTime .AND. nIter0 .EQ. 0 |
IF ( .NOT. ( startTime .EQ. baseTime .AND. nIter0 .EQ. 0 |
331 |
& .AND. pickupSuff .EQ. ' ') ) THEN |
& .AND. pickupSuff .EQ. ' ') ) THEN |
332 |
COJ should probably initialize from a file when nIter0 .EQ. 0 |
COJ should probably initialize from a file when nIter0 .EQ. 0 |
333 |
CALL DARWIN_READ_PICKUP( nIter0, myThid ) |
CALL DARWIN_READ_PICKUP( nIter0, myThid ) |
334 |
ENDIF |
ENDIF |
|
#endif |
|
335 |
c |
c |
336 |
#ifdef ALLOW_TIMEAVE |
#ifdef ALLOW_TIMEAVE |
337 |
c set arrays to zero if first timestep |
c set arrays to zero if first timestep |
342 |
CALL TIMEAVE_RESET(Chlave, Nr, bi, bj, myThid) |
CALL TIMEAVE_RESET(Chlave, Nr, bi, bj, myThid) |
343 |
CALL TIMEAVE_RESET(Nfixave, Nr, bi, bj, myThid) |
CALL TIMEAVE_RESET(Nfixave, Nr, bi, bj, myThid) |
344 |
CALL TIMEAVE_RESET(Denitave, Nr, bi, bj, myThid) |
CALL TIMEAVE_RESET(Denitave, Nr, bi, bj, myThid) |
345 |
|
#ifdef DAR_DIAG_PARW |
346 |
|
do i=1,tlam |
347 |
|
CALL TIMEAVE_RESET(PARwave(1-OLx,1-OLy,1,1,1,i), |
348 |
|
& Nr,bi,bj,myThid) |
349 |
|
enddo |
350 |
|
do np=1,npmax |
351 |
|
CALL TIMEAVE_RESET(chl2cave(1-OLx,1-OLy,1,1,1,np), |
352 |
|
& Nr,bi,bj,myThid) |
353 |
|
enddo |
354 |
|
#endif |
355 |
#ifdef DAR_DIAG_ACDOM |
#ifdef DAR_DIAG_ACDOM |
356 |
CALL TIMEAVE_RESET(aCDOMave, Nr, bi, bj, myThid) |
CALL TIMEAVE_RESET(aCDOMave, Nr, bi, bj, myThid) |
357 |
#endif |
#endif |
363 |
& Nr,bi,bj,myThid) |
& Nr,bi,bj,myThid) |
364 |
CALL TIMEAVE_RESET(Euave(1-OLx,1-OLy,1,1,1,i), |
CALL TIMEAVE_RESET(Euave(1-OLx,1-OLy,1,1,1,i), |
365 |
& Nr,bi,bj,myThid) |
& Nr,bi,bj,myThid) |
366 |
|
CALL TIMEAVE_RESET(Estave(1-OLx,1-OLy,1,1,1,i), |
367 |
|
& Nr,bi,bj,myThid) |
368 |
CALL TIMEAVE_RESET(Eutave(1-OLx,1-OLy,1,1,1,i), |
CALL TIMEAVE_RESET(Eutave(1-OLx,1-OLy,1,1,1,i), |
369 |
& Nr,bi,bj,myThid) |
& Nr,bi,bj,myThid) |
370 |
enddo |
enddo |
371 |
#endif |
#endif |
372 |
|
#ifdef DAR_DIAG_IRR_AMPS |
373 |
|
do i=1,tlam |
374 |
|
CALL TIMEAVE_RESET(amp1ave(1-OLx,1-OLy,1,1,1,i), |
375 |
|
& Nr,bi,bj,myThid) |
376 |
|
CALL TIMEAVE_RESET(amp2ave(1-OLx,1-OLy,1,1,1,i), |
377 |
|
& Nr,bi,bj,myThid) |
378 |
|
enddo |
379 |
|
#endif |
380 |
#ifdef DAR_DIAG_ABSORP |
#ifdef DAR_DIAG_ABSORP |
381 |
do i=1,tlam |
do i=1,tlam |
382 |
CALL TIMEAVE_RESET(aave(1-OLx,1-OLy,1,1,1,i), |
CALL TIMEAVE_RESET(aave(1-OLx,1-OLy,1,1,1,i), |
401 |
& Nr,bi,bj,myThid) |
& Nr,bi,bj,myThid) |
402 |
enddo |
enddo |
403 |
#endif |
#endif |
404 |
|
#ifdef DAR_RADTRANS |
405 |
|
CALL TIMEAVE_RESET(rmudave(1-OLx,1-OLy,1,1), |
406 |
|
& 1,bi,bj,myThid) |
407 |
|
#endif |
408 |
c ANNA_TAVE |
c ANNA_TAVE |
409 |
#ifdef WAVES_DIAG_PCHL |
#ifdef WAVES_DIAG_PCHL |
410 |
do np=1,npmax |
do np=1,npmax |
413 |
enddo |
enddo |
414 |
#endif |
#endif |
415 |
c ANNA end TAVE |
c ANNA end TAVE |
416 |
|
#ifdef DAR_DIAG_EK |
417 |
|
do np=1,npmax |
418 |
|
CALL TIMEAVE_RESET(Ekave(1-OLx,1-OLy,1,1,1,np), |
419 |
|
& Nr,bi,bj,myThid) |
420 |
|
CALL TIMEAVE_RESET(EkoverEave(1-OLx,1-OLy,1,1,1,np), |
421 |
|
& Nr,bi,bj,myThid) |
422 |
|
do i=1,tlam |
423 |
|
CALL TIMEAVE_RESET(Ek_nlave(1-OLx,1-OLy,1,1,1,np,i), |
424 |
|
& Nr,bi,bj,myThid) |
425 |
|
CALL TIMEAVE_RESET(EkoverE_nlave(1-OLx,1-OLy,1,1,1,np,i), |
426 |
|
& Nr,bi,bj,myThid) |
427 |
|
enddo |
428 |
|
enddo |
429 |
|
#endif |
430 |
#ifdef DAR_DIAG_RSTAR |
#ifdef DAR_DIAG_RSTAR |
431 |
do np=1,npmax |
do np=1,npmax |
432 |
CALL TIMEAVE_RESET(Rstarave(1-OLx,1-OLy,1,1,1,np), |
CALL TIMEAVE_RESET(Rstarave(1-OLx,1-OLy,1,1,1,np), |
463 |
#endif /* ALLOW_TIMEAVE */ |
#endif /* ALLOW_TIMEAVE */ |
464 |
|
|
465 |
#ifdef CHECK_CONS |
#ifdef CHECK_CONS |
466 |
|
IF ( myProcId.EQ.0 .AND. myThid.EQ.1 ) THEN |
467 |
coj find unused units for darwin_cons output |
coj find unused units for darwin_cons output |
468 |
CALL MDSFINDUNIT( DAR_cons_unit1, mythid ) |
CALL MDSFINDUNIT( DAR_cons_unit1, mythid ) |
469 |
open(DAR_cons_unit1,file='darwin_cons_P.txt',status='unknown') |
open(DAR_cons_unit1,file='darwin_cons_P.txt',status='unknown') |
481 |
CALL MDSFINDUNIT( DAR_cons_unit7, mythid ) |
CALL MDSFINDUNIT( DAR_cons_unit7, mythid ) |
482 |
open(DAR_cons_unit7,file='darwin_cons_O.txt',status='unknown') |
open(DAR_cons_unit7,file='darwin_cons_O.txt',status='unknown') |
483 |
#endif |
#endif |
484 |
|
c myProcId and myThid |
485 |
|
ENDIF |
486 |
#endif |
#endif |
|
_END_MASTER(myThid) |
|
487 |
|
|
488 |
c test.................... |
c test.................... |
489 |
c write(6,*)'finishing darwin_init_vari ' |
c write(6,*)'finishing darwin_init_vari ' |