[1457] | 1 | MODULE trcwri |
---|
[3294] | 2 | !!====================================================================== |
---|
[1457] | 3 | !! *** MODULE trcwri *** |
---|
[1836] | 4 | !! TOP : Output of passive tracers |
---|
[3294] | 5 | !!====================================================================== |
---|
[1836] | 6 | !! History : 1.0 ! 2009-05 (C. Ethe) Original code |
---|
[1457] | 7 | !!---------------------------------------------------------------------- |
---|
[3294] | 8 | #if defined key_top && defined key_iomput |
---|
[1457] | 9 | !!---------------------------------------------------------------------- |
---|
[3294] | 10 | !! 'key_top' TOP models |
---|
[1457] | 11 | !!---------------------------------------------------------------------- |
---|
[1836] | 12 | !! trc_wri_trc : outputs of concentration fields |
---|
[1457] | 13 | !!---------------------------------------------------------------------- |
---|
[3294] | 14 | USE dom_oce ! ocean space and time domain variables |
---|
| 15 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
| 16 | USE trc ! passive tracers common variables |
---|
| 17 | USE iom ! I/O manager |
---|
| 18 | USE dianam ! Output file name |
---|
[3295] | 19 | USE trcwri_pisces |
---|
[3680] | 20 | USE trcwri_cfc |
---|
| 21 | USE trcwri_c14b |
---|
| 22 | USE trcwri_my_trc |
---|
[10156] | 23 | ! +++>>> FABM |
---|
| 24 | USE trcwri_fabm |
---|
| 25 | ! FABM <<<+++ |
---|
[1457] | 26 | |
---|
| 27 | IMPLICIT NONE |
---|
| 28 | PRIVATE |
---|
| 29 | |
---|
| 30 | PUBLIC trc_wri |
---|
| 31 | |
---|
| 32 | !! * Substitutions |
---|
| 33 | # include "top_substitute.h90" |
---|
| 34 | |
---|
| 35 | CONTAINS |
---|
| 36 | |
---|
[10156] | 37 | #if defined key_tracer_budget |
---|
| 38 | SUBROUTINE trc_wri( kt , fl) !slwa |
---|
| 39 | #else |
---|
[1836] | 40 | SUBROUTINE trc_wri( kt ) |
---|
[10156] | 41 | #endif |
---|
[1457] | 42 | !!--------------------------------------------------------------------- |
---|
| 43 | !! *** ROUTINE trc_wri *** |
---|
[1836] | 44 | !! |
---|
| 45 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
| 46 | !!--------------------------------------------------------------------- |
---|
[3750] | 47 | INTEGER, INTENT( in ) :: kt |
---|
[10156] | 48 | ! +++>>>FABM |
---|
| 49 | #if defined key_tracer_budget |
---|
| 50 | INTEGER, INTENT( in ), OPTIONAL :: fl ! slwa |
---|
| 51 | #endif |
---|
| 52 | ! FABM <<<+++ |
---|
[1836] | 53 | ! |
---|
[3294] | 54 | INTEGER :: jn |
---|
| 55 | CHARACTER (len=20) :: cltra |
---|
| 56 | CHARACTER (len=40) :: clhstnam |
---|
[1656] | 57 | INTEGER :: inum = 11 ! temporary logical unit |
---|
[1457] | 58 | !!--------------------------------------------------------------------- |
---|
[3750] | 59 | ! |
---|
| 60 | IF( nn_timing == 1 ) CALL timing_start('trc_wri') |
---|
| 61 | ! |
---|
[3294] | 62 | IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro |
---|
[2528] | 63 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
| 64 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
| 65 | WRITE(inum,*) clhstnam |
---|
| 66 | CLOSE(inum) |
---|
[1656] | 67 | ENDIF |
---|
[1457] | 68 | ! write the tracer concentrations in the file |
---|
| 69 | ! --------------------------------------- |
---|
[3680] | 70 | IF( lk_pisces ) CALL trc_wri_pisces ! PISCES |
---|
| 71 | IF( lk_cfc ) CALL trc_wri_cfc ! surface fluxes of CFC |
---|
| 72 | IF( lk_c14b ) CALL trc_wri_c14b ! surface fluxes of C14 |
---|
[10156] | 73 | ! +++>>>FABM |
---|
| 74 | #if defined key_tracer_budget |
---|
| 75 | IF( PRESENT(fl) ) THEN |
---|
| 76 | IF( lk_fabm ) CALL trc_wri_fabm (kt, fl) ! MY_TRC tracers for budget |
---|
| 77 | IF( lk_my_trc ) CALL trc_wri_my_trc (kt, fl) ! MY_TRC tracers for budget |
---|
| 78 | ELSE |
---|
| 79 | IF( lk_fabm ) CALL trc_wri_fabm (kt) ! FABM tracers for budget |
---|
| 80 | IF( lk_my_trc ) CALL trc_wri_my_trc (kt) ! MY_TRC tracers |
---|
| 81 | ENDIF |
---|
| 82 | #else |
---|
| 83 | IF( lk_fabm ) CALL trc_wri_fabm (kt) ! FABM tracers |
---|
| 84 | IF( lk_my_trc ) CALL trc_wri_my_trc(kt) ! MY_TRC tracers |
---|
| 85 | #endif |
---|
| 86 | ! FABM <<<+++ |
---|
[1457] | 87 | ! |
---|
[10156] | 88 | |
---|
[3750] | 89 | IF( nn_timing == 1 ) CALL timing_stop('trc_wri') |
---|
| 90 | ! |
---|
| 91 | END SUBROUTINE trc_wri |
---|
[1457] | 92 | |
---|
| 93 | #else |
---|
| 94 | !!---------------------------------------------------------------------- |
---|
| 95 | !! Dummy module : No passive tracer |
---|
| 96 | !!---------------------------------------------------------------------- |
---|
| 97 | PUBLIC trc_wri |
---|
| 98 | CONTAINS |
---|
| 99 | SUBROUTINE trc_wri( kt ) ! Empty routine |
---|
| 100 | INTEGER, INTENT(in) :: kt |
---|
| 101 | END SUBROUTINE trc_wri |
---|
| 102 | #endif |
---|
| 103 | |
---|
[2528] | 104 | !!---------------------------------------------------------------------- |
---|
| 105 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[8058] | 106 | !! $Id$ |
---|
[2528] | 107 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[1457] | 108 | !!====================================================================== |
---|
| 109 | END MODULE trcwri |
---|