[6715] | 1 | MODULE trcsms_age |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcsms_age *** |
---|
| 4 | !! TOP : Main module of the AGE tracers |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | #if defined key_age |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! 'key_age' AGE tracer |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! trc_sms_age : AGE model main routine |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | USE oce_trc ! Ocean variables |
---|
| 15 | USE trc ! TOP variables |
---|
| 16 | USE trd_oce |
---|
| 17 | USE trdtrc |
---|
| 18 | |
---|
| 19 | IMPLICIT NONE |
---|
| 20 | PRIVATE |
---|
| 21 | |
---|
| 22 | PUBLIC trc_sms_age ! called by trcsms.F90 module |
---|
| 23 | |
---|
| 24 | INTEGER , PUBLIC :: nl_age ! T level surrounding age_depth |
---|
| 25 | INTEGER , PUBLIC :: nla_age ! T level wholly above age_depth |
---|
| 26 | INTEGER , PUBLIC :: nlb_age ! T level wholly below age_depth |
---|
| 27 | |
---|
| 28 | REAL(wp), PUBLIC :: rn_age_depth ! = 10 depth over which age tracer reset to zero |
---|
| 29 | REAL(wp), PUBLIC :: rn_age_kill_rate ! = -1./7200 recip of relaxation timescale (s) for age tracer shallower than age_depth |
---|
| 30 | |
---|
| 31 | REAL(wp), PUBLIC :: rryear !: recip number of seconds in one year |
---|
| 32 | REAL(wp), PUBLIC :: frac_kill_age !: fraction of level nl_age above age_depth where it is relaxed towards zero |
---|
| 33 | REAL(wp), PUBLIC :: frac_add_age !: fraction of level nl_age below age_depth where it is incremented |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | !!---------------------------------------------------------------------- |
---|
| 37 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 38 | !! $Id$ |
---|
| 39 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 40 | !!---------------------------------------------------------------------- |
---|
| 41 | CONTAINS |
---|
| 42 | |
---|
| 43 | SUBROUTINE trc_sms_age( kt ) |
---|
| 44 | !!---------------------------------------------------------------------- |
---|
| 45 | !! *** trc_sms_age *** |
---|
| 46 | !! |
---|
| 47 | !! ** Purpose : main routine of AGE model |
---|
| 48 | !! |
---|
| 49 | !! ** Method : - |
---|
| 50 | !!---------------------------------------------------------------------- |
---|
| 51 | ! |
---|
| 52 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
| 53 | INTEGER :: jn, jk ! dummy loop index |
---|
| 54 | REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrage |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
| 56 | ! |
---|
| 57 | IF( nn_timing == 1 ) CALL timing_start('trc_sms_age') |
---|
| 58 | ! |
---|
[8442] | 59 | IF( kt == nittrc000 ) THEN |
---|
| 60 | IF(lwp) WRITE(numout,*) |
---|
| 61 | IF(lwp) WRITE(numout,*) ' trc_sms_age: AGE model' |
---|
| 62 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' |
---|
| 63 | ENDIF |
---|
[6715] | 64 | |
---|
| 65 | IF( l_trdtrc ) CALL wrk_alloc( jpi, jpj, jpk, ztrage ) |
---|
| 66 | |
---|
| 67 | DO jk = 1, nla_age |
---|
| 68 | tra(:,:,jk,jpage1) = rn_age_kill_rate * trb(:,:,jk,jpage1) |
---|
| 69 | ENDDO |
---|
| 70 | ! |
---|
| 71 | tra(:,:,nl_age,jpage1) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jpage1) & |
---|
| 72 | & + frac_add_age * rryear * tmask(:,:,nl_age) |
---|
| 73 | ! |
---|
| 74 | DO jk = nlb_age, jpk |
---|
| 75 | tra(:,:,jk,jpage1) = tmask(:,:,jk) * rryear |
---|
| 76 | ENDDO |
---|
| 77 | ! |
---|
| 78 | IF( l_trdtrc ) THEN ! Save the trends in the mixed layer |
---|
| 79 | DO jn = jp_age0, jp_age1 |
---|
| 80 | ztrage(:,:,:) = tra(:,:,:,jn) |
---|
| 81 | CALL trd_trc( ztrage, jn, jptra_sms, kt ) ! save trends |
---|
| 82 | END DO |
---|
| 83 | CALL wrk_dealloc( jpi, jpj, jpk, ztrage ) |
---|
| 84 | END IF |
---|
| 85 | ! |
---|
| 86 | IF( nn_timing == 1 ) CALL timing_stop('trc_sms_age') |
---|
| 87 | ! |
---|
| 88 | END SUBROUTINE trc_sms_age |
---|
| 89 | |
---|
| 90 | #else |
---|
| 91 | !!---------------------------------------------------------------------- |
---|
| 92 | !! Dummy module No AGE model |
---|
| 93 | !!---------------------------------------------------------------------- |
---|
| 94 | CONTAINS |
---|
| 95 | SUBROUTINE trc_sms_age( kt ) ! Empty routine |
---|
| 96 | INTEGER, INTENT( in ) :: kt |
---|
| 97 | WRITE(*,*) 'trc_sms_age: You should not have seen this print! error?', kt |
---|
| 98 | END SUBROUTINE trc_sms_age |
---|
| 99 | #endif |
---|
| 100 | |
---|
| 101 | !!====================================================================== |
---|
| 102 | END MODULE trcsms_age |
---|