1 | MODULE trcini_age |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcini_age *** |
---|
4 | !! TOP : initialisation of the AGE tracer |
---|
5 | !!====================================================================== |
---|
6 | !! History : 2.0 ! 2007-12 (G. Nurser, G. Madec, C. Ethe ) Original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | !! trc_ini_age : MY_TRC model initialisation |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | USE oce_trc |
---|
11 | USE trc |
---|
12 | USE trcsms_age |
---|
13 | |
---|
14 | IMPLICIT NONE |
---|
15 | PRIVATE |
---|
16 | |
---|
17 | PUBLIC trc_ini_age ! called by trcini.F90 module |
---|
18 | |
---|
19 | !!---------------------------------------------------------------------- |
---|
20 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
21 | !! $Id$ |
---|
22 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
23 | !!---------------------------------------------------------------------- |
---|
24 | CONTAINS |
---|
25 | |
---|
26 | SUBROUTINE trc_ini_age |
---|
27 | !!---------------------------------------------------------------------- |
---|
28 | !! *** trc_ini_age *** |
---|
29 | !! |
---|
30 | !! ** Purpose : initialization for AGE model |
---|
31 | !! |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | INTEGER :: jn |
---|
34 | CHARACTER(len = 20) :: cltra |
---|
35 | |
---|
36 | |
---|
37 | IF(lwp) WRITE(numout,*) |
---|
38 | IF(lwp) WRITE(numout,*) ' trc_ini_age: passive tracer age' |
---|
39 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' |
---|
40 | |
---|
41 | jp_age = 1 |
---|
42 | DO jn = 1, jptra |
---|
43 | cltra = ctrcnm(jn) |
---|
44 | IF( cltra == 'AGE' .OR. cltra == 'Age' .OR. cltra == 'age' ) jp_age0 = jn |
---|
45 | ENDDO |
---|
46 | |
---|
47 | IF( lwp ) THEN |
---|
48 | WRITE(numout,*) '' |
---|
49 | WRITE(numout,*) ' Index of age tracer in the passive tracer array jp_age0 = ', jp_age0 |
---|
50 | WRITE(numout,*) |
---|
51 | ENDIF |
---|
52 | |
---|
53 | |
---|
54 | rryear = 1._wp / ( nyear_len(1) * rday ) ! recip number of seconds in one year |
---|
55 | |
---|
56 | !! BUG in s-coordinate this does not work! |
---|
57 | nlb_age = MINLOC( gdepw_1d, mask = gdepw_1d > rn_age_depth, dim = 1 ) ! shallowest W level Below age_depth |
---|
58 | ! = shallowest T level wholly below age_depth |
---|
59 | nl_age = nlb_age - 1 ! deepest W level Above age_depth |
---|
60 | ! = T level surrounding age_depth |
---|
61 | |
---|
62 | nla_age = nl_age - 1 ! deepest T level wholly above age_depth |
---|
63 | |
---|
64 | frac_kill_age = ( rn_age_depth - gdepw_1d(nl_age) ) / e3t_1d(nl_age) ! fraction of level nl_age above age_depth |
---|
65 | frac_add_age = 1._wp - frac_kill_age ! fraction of level nl_age below age_depth |
---|
66 | |
---|
67 | |
---|
68 | IF( .NOT. ln_rsttr ) trn(:,:,:,jp_age0) = 0. |
---|
69 | ! |
---|
70 | END SUBROUTINE trc_ini_age |
---|
71 | |
---|
72 | !!====================================================================== |
---|
73 | END MODULE trcini_age |
---|