[1457] | 1 | MODULE trcstp |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcstp *** |
---|
| 4 | !! Time-stepping : time loop of opa for passive tracer |
---|
| 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : 1.0 ! 2004-03 (C. Ethe) Original |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
[1457] | 8 | #if defined key_top |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! trc_stp : passive tracer system time-stepping |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
[2798] | 13 | #if ! defined key_bfm |
---|
[2528] | 14 | USE trc |
---|
[1457] | 15 | USE trctrp ! passive tracers transport |
---|
| 16 | USE trcsms ! passive tracers sources and sinks |
---|
| 17 | USE prtctl_trc ! Print control for debbuging |
---|
| 18 | USE trcdia |
---|
| 19 | USE trcwri |
---|
| 20 | USE trcrst |
---|
[2528] | 21 | USE trdmod_trc_oce |
---|
[1457] | 22 | USE trdmld_trc |
---|
[2798] | 23 | #else |
---|
| 24 | USE api_bfm, ONLY: bio_calc |
---|
| 25 | USE par_bfm |
---|
| 26 | #ifdef key_obc |
---|
| 27 | USE trcobcdta_bfm |
---|
| 28 | #endif |
---|
| 29 | #endif |
---|
[1457] | 30 | USE iom |
---|
| 31 | USE in_out_manager |
---|
| 32 | |
---|
| 33 | IMPLICIT NONE |
---|
| 34 | PRIVATE |
---|
| 35 | |
---|
[2528] | 36 | PUBLIC trc_stp ! called by step |
---|
| 37 | |
---|
[1457] | 38 | !!---------------------------------------------------------------------- |
---|
[2528] | 39 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 40 | !! $Id$ |
---|
| 41 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[1457] | 42 | !!---------------------------------------------------------------------- |
---|
| 43 | CONTAINS |
---|
| 44 | |
---|
| 45 | SUBROUTINE trc_stp( kt ) |
---|
| 46 | !!------------------------------------------------------------------- |
---|
| 47 | !! *** ROUTINE trc_stp *** |
---|
| 48 | !! |
---|
| 49 | !! ** Purpose : Time loop of opa for passive tracer |
---|
| 50 | !! |
---|
| 51 | !! ** Method : |
---|
| 52 | !! Compute the passive tracers trends |
---|
| 53 | !! Update the passive tracers |
---|
| 54 | !!------------------------------------------------------------------- |
---|
| 55 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 56 | CHARACTER (len=25) :: charout |
---|
[2528] | 57 | !!------------------------------------------------------------------- |
---|
[1457] | 58 | |
---|
[2798] | 59 | #if defined key_bfm |
---|
| 60 | !--------------------------------------------- |
---|
| 61 | ! Check the main BFM flag |
---|
| 62 | !--------------------------------------------- |
---|
| 63 | IF (bio_calc) THEN |
---|
| 64 | |
---|
| 65 | CALL trc_bfm( kt ) ! main call to BFM |
---|
| 66 | |
---|
| 67 | CALL trc_trp_bfm( kt ) ! transport of BFM tracers |
---|
| 68 | |
---|
| 69 | CALL trc_dia_bfm( kt ) ! diagnostic output for BFM |
---|
| 70 | END IF |
---|
| 71 | #else |
---|
| 72 | |
---|
[2528] | 73 | IF( MOD( kt - 1 , nn_dttrc ) == 0 ) THEN ! only every nn_dttrc time step |
---|
| 74 | ! |
---|
| 75 | IF(ln_ctl) THEN |
---|
| 76 | WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear |
---|
| 77 | CALL prt_ctl_trc_info(charout) |
---|
| 78 | ENDIF |
---|
| 79 | ! |
---|
| 80 | tra(:,:,:,:) = 0.e0 |
---|
| 81 | ! |
---|
| 82 | IF( kt == nit000 .AND. lk_trdmld_trc ) & |
---|
| 83 | & CALL trd_mld_trc_init ! trends: Mixed-layer |
---|
| 84 | CALL trc_rst_opn( kt ) ! Open tracer restart file |
---|
| 85 | IF( lk_iomput ) THEN ; CALL trc_wri( kt ) ! output of passive tracers |
---|
| 86 | ELSE ; CALL trc_dia( kt ) |
---|
| 87 | ENDIF |
---|
| 88 | CALL trc_sms( kt ) ! tracers: sink and source |
---|
| 89 | CALL trc_trp( kt ) ! transport of passive tracers |
---|
| 90 | IF( kt == nit000 ) CALL iom_close( numrtr ) ! close input passive tracers restart file |
---|
| 91 | IF( lrst_trc ) CALL trc_rst_wri( kt ) ! write tracer restart file |
---|
| 92 | IF( lk_trdmld_trc ) CALL trd_mld_trc( kt ) ! trends: Mixed-layer |
---|
| 93 | ! |
---|
[1457] | 94 | ENDIF |
---|
[2798] | 95 | #endif |
---|
[1457] | 96 | |
---|
| 97 | END SUBROUTINE trc_stp |
---|
| 98 | |
---|
| 99 | #else |
---|
| 100 | !!---------------------------------------------------------------------- |
---|
| 101 | !! Default key NO passive tracers |
---|
| 102 | !!---------------------------------------------------------------------- |
---|
| 103 | CONTAINS |
---|
| 104 | SUBROUTINE trc_stp( kt ) ! Empty routine |
---|
| 105 | WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt |
---|
| 106 | END SUBROUTINE trc_stp |
---|
| 107 | #endif |
---|
| 108 | |
---|
| 109 | !!====================================================================== |
---|
| 110 | END MODULE trcstp |
---|