[186] | 1 | MODULE trcstp |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcstp *** |
---|
| 4 | !! Time-stepping : time loop of opa for passive tracer |
---|
| 5 | !!====================================================================== |
---|
| 6 | #if defined key_passivetrc |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! trc_stp : passive tracer system time-stepping |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! * Modules used |
---|
[202] | 11 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
| 12 | USE trc ! ocean passive tracers variables |
---|
| 13 | USE trctrp ! passive tracers transport |
---|
[261] | 14 | USE trcsms ! passive tracers sources and sinks |
---|
[433] | 15 | USE prtctl_trc ! Print control for debbuging |
---|
[334] | 16 | USE trcdia |
---|
[433] | 17 | USE trcdit |
---|
[334] | 18 | USE trcrst |
---|
[202] | 19 | |
---|
[186] | 20 | IMPLICIT NONE |
---|
| 21 | PRIVATE |
---|
| 22 | |
---|
| 23 | !! * Routine accessibility |
---|
| 24 | PUBLIC trc_stp ! called by step |
---|
| 25 | !!---------------------------------------------------------------------- |
---|
[349] | 26 | !! TOP 1.0 , LOCEAN-IPSL (2005) |
---|
[342] | 27 | !! $Header$ |
---|
| 28 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
[186] | 29 | !!---------------------------------------------------------------------- |
---|
| 30 | |
---|
| 31 | CONTAINS |
---|
| 32 | |
---|
[334] | 33 | SUBROUTINE trc_stp( kt, kindic ) |
---|
[186] | 34 | !!------------------------------------------------------------------- |
---|
| 35 | !! *** ROUTINE trc_stp *** |
---|
| 36 | !! |
---|
| 37 | !! ** Purpose : Time loop of opa for passive tracer |
---|
| 38 | !! |
---|
| 39 | !! ** Method : |
---|
| 40 | !! Compute the passive tracers trends |
---|
| 41 | !! Update the passive tracers |
---|
| 42 | !! |
---|
| 43 | !! History : |
---|
| 44 | !! 9.0 ! 04-03 (C. Ethe) Original |
---|
| 45 | !!------------------------------------------------------------------- |
---|
| 46 | !! * Arguments |
---|
| 47 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
[334] | 48 | INTEGER, INTENT( in ) :: kindic |
---|
| 49 | CHARACTER (len=25) :: charout |
---|
[186] | 50 | |
---|
[334] | 51 | ! this ROUTINE is called only every ndttrc time step |
---|
| 52 | IF( MOD( kt , ndttrc ) /= 0 ) RETURN |
---|
[186] | 53 | |
---|
[334] | 54 | ! tracers: sink and source |
---|
| 55 | IF(ln_ctl) THEN |
---|
| 56 | WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear |
---|
| 57 | CALL prt_ctl_trc_info(charout) |
---|
| 58 | ENDIF |
---|
[186] | 59 | |
---|
| 60 | |
---|
[334] | 61 | CALL trc_sms( kt ) |
---|
[261] | 62 | |
---|
[334] | 63 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
[433] | 64 | WRITE(charout, FMT="('SMS')") |
---|
[334] | 65 | CALL prt_ctl_trc_info(charout) |
---|
| 66 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
| 67 | ENDIF |
---|
[186] | 68 | |
---|
[334] | 69 | ! transport of passive tracers |
---|
[439] | 70 | CALL trc_trp( kt ) |
---|
[186] | 71 | |
---|
[433] | 72 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
| 73 | WRITE(charout, FMT="('TRP')") |
---|
| 74 | CALL prt_ctl_trc_info(charout) |
---|
| 75 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
| 76 | ENDIF |
---|
| 77 | |
---|
[334] | 78 | CALL trc_wri( kt ) ! outputs |
---|
[186] | 79 | |
---|
[334] | 80 | CALL trc_dia( kt, kindic ) ! diagnostics |
---|
[261] | 81 | |
---|
| 82 | |
---|
[186] | 83 | END SUBROUTINE trc_stp |
---|
| 84 | |
---|
| 85 | #else |
---|
| 86 | !!---------------------------------------------------------------------- |
---|
[202] | 87 | !! Default key NO passive tracers |
---|
[186] | 88 | !!---------------------------------------------------------------------- |
---|
| 89 | CONTAINS |
---|
| 90 | SUBROUTINE trc_stp( kt ) ! Empty routine |
---|
| 91 | INTEGER, INTENT(in) :: kt |
---|
| 92 | WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt |
---|
| 93 | END SUBROUTINE trc_stp |
---|
| 94 | #endif |
---|
| 95 | |
---|
| 96 | !!====================================================================== |
---|
| 97 | END MODULE trcstp |
---|