1 | MODULE trcwri_fabm |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcwri_fabm *** |
---|
4 | !! fabm : Output of FABM tracers |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2009-05 (C. Ethe) Original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | #if defined key_top && key_fabm && defined key_iomput |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! 'key_fabm' FABM model |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! trc_wri_fabm : outputs of concentration fields |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | USE trc ! passive tracers common variables |
---|
15 | USE iom ! I/O manager |
---|
16 | USE trcsms_fabm, only: trc_sms_fabm_check_mass |
---|
17 | USE par_fabm |
---|
18 | USE st2d_fabm |
---|
19 | USE fabm, only: fabm_get_bulk_diagnostic_data, fabm_get_horizontal_diagnostic_data |
---|
20 | |
---|
21 | IMPLICIT NONE |
---|
22 | PRIVATE |
---|
23 | |
---|
24 | PUBLIC trc_wri_fabm |
---|
25 | |
---|
26 | # include "top_substitute.h90" |
---|
27 | CONTAINS |
---|
28 | |
---|
29 | SUBROUTINE trc_wri_fabm |
---|
30 | !!--------------------------------------------------------------------- |
---|
31 | !! *** ROUTINE trc_wri_trc *** |
---|
32 | !! |
---|
33 | !! ** Purpose : output passive tracers fields |
---|
34 | !!--------------------------------------------------------------------- |
---|
35 | INTEGER :: jn |
---|
36 | !!--------------------------------------------------------------------- |
---|
37 | |
---|
38 | ! write the tracer concentrations in the file |
---|
39 | ! --------------------------------------- |
---|
40 | DO jn = 1, jp_fabm |
---|
41 | CALL iom_put( model%state_variables(jn)%name, trn(:,:,:,jp_fabm0+jn-1) ) |
---|
42 | END DO |
---|
43 | DO jn = 1, jp_fabm_surface |
---|
44 | CALL iom_put( model%surface_state_variables(jn)%name, fabm_st2dn(:,:,jn) ) |
---|
45 | END DO |
---|
46 | DO jn = 1, jp_fabm_bottom |
---|
47 | CALL iom_put( model%bottom_state_variables(jn)%name, fabm_st2dn(:,:,jp_fabm_surface+jn) ) |
---|
48 | END DO |
---|
49 | |
---|
50 | |
---|
51 | ! write 3D diagnostics in the file |
---|
52 | ! --------------------------------------- |
---|
53 | DO jn = 1, size(model%diagnostic_variables) |
---|
54 | IF (model%diagnostic_variables(jn)%save) & |
---|
55 | CALL iom_put( model%diagnostic_variables(jn)%name, fabm_get_bulk_diagnostic_data(model,jn)) |
---|
56 | END DO |
---|
57 | |
---|
58 | ! write 2D diagnostics in the file |
---|
59 | ! --------------------------------------- |
---|
60 | DO jn = 1, size(model%horizontal_diagnostic_variables) |
---|
61 | IF (model%horizontal_diagnostic_variables(jn)%save) & |
---|
62 | CALL iom_put( model%horizontal_diagnostic_variables(jn)%name, fabm_get_horizontal_diagnostic_data(model,jn)) |
---|
63 | END DO |
---|
64 | ! |
---|
65 | |
---|
66 | CALL trc_sms_fabm_check_mass |
---|
67 | END SUBROUTINE trc_wri_fabm |
---|
68 | |
---|
69 | #else |
---|
70 | !!---------------------------------------------------------------------- |
---|
71 | !! Dummy module : No passive tracer |
---|
72 | !!---------------------------------------------------------------------- |
---|
73 | PUBLIC trc_wri_fabm |
---|
74 | CONTAINS |
---|
75 | SUBROUTINE trc_wri_fabm ! Empty routine |
---|
76 | END SUBROUTINE trc_wri_fabm |
---|
77 | #endif |
---|
78 | |
---|
79 | !!---------------------------------------------------------------------- |
---|
80 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
81 | !! $Id$ |
---|
82 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
83 | !!====================================================================== |
---|
84 | END MODULE trcwri_fabm |
---|