SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_diag_seafluxn.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 SUBROUTINE write_diag_seaflux_n (DTCO, DGU, U, SM, &
7  hprogram,hwrite)
8 ! ###############################################################################
9 !
10 !!**** *WRITE_DIAG_SEAFLUX_n * - diagnostics for SEAFLUX
11 !!
12 !! PURPOSE
13 !! -------
14 !
15 !!** METHOD
16 !! ------
17 !!
18 !! REFERENCE
19 !! ---------
20 !!
21 !!
22 !! AUTHOR
23 !! ------
24 !! V. Masson
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 01/2004
29 !! Modified 09/2013 : S. Senesi : call WRITE_DIAG_SEB_SEAICE_n
30 !!------------------------------------------------------------------
31 !
34 USE modd_surf_atm_n, ONLY : surf_atm_t
35 !
37 !
38 USE modd_surf_par, ONLY : xundef
39 !
40 USE modi_write_diag_seb_seaflux_n
41 USE modi_write_diag_seb_ocean_n
42 USE modi_write_diag_seb_seaice_n
43 !
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 IMPLICIT NONE
49 !
50 !* 0.1 declarations of arguments
51 !
52 !
53 TYPE(data_cover_t), INTENT(INOUT) :: dtco
54 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
55 TYPE(surf_atm_t), INTENT(INOUT) :: u
56 TYPE(seaflux_model_t), INTENT(INOUT) :: sm
57 !
58  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
59  CHARACTER(LEN=3), INTENT(IN) :: hwrite ! 'PGD' : only physiographic fields are written
60 REAL(KIND=JPRB) :: zhook_handle
61 ! ! 'ALL' : all fields are written
62 !
63 !* 0.2 declarations of local variables
64 !
65 !-------------------------------------------------------------------------------------
66 !
67 IF (lhook) CALL dr_hook('WRITE_DIAG_SEAFLUX_N',0,zhook_handle)
68 IF (hwrite/='PGD') THEN
69 !
70  IF (sm%DGS%XDIAG_TSTEP==xundef .OR. &
71  abs(nint(sm%S%TTIME%TIME/sm%DGS%XDIAG_TSTEP)*sm%DGS%XDIAG_TSTEP-sm%S%TTIME%TIME)<1.e-3 ) THEN
72  CALL write_diag_seb_seaflux_n(dtco, dgu, u, sm%CHS, sm%DGS, sm%S, &
73  hprogram)
74  IF (sm%DGO%LDIAG_OCEAN) CALL write_diag_seb_ocean_n(dtco, dgu, u, sm%DGO, &
75  hprogram)
76  IF (sm%DGSI%LDIAG_SEAICE) CALL write_diag_seb_seaice_n(dtco, dgu, u, sm%DGS, sm%DGSI, sm%S, &
77  hprogram)
78  END IF
79 !
80 ENDIF
81 IF (lhook) CALL dr_hook('WRITE_DIAG_SEAFLUX_N',1,zhook_handle)
82 !-------------------------------------------------------------------------------------
83 !
84 END SUBROUTINE write_diag_seaflux_n
subroutine write_diag_seb_ocean_n(DTCO, DGU, U, DGO, HPROGRAM)
subroutine write_diag_seaflux_n(DTCO, DGU, U, SM, HPROGRAM, HWRITE)
subroutine write_diag_seb_seaflux_n(DTCO, DGU, U, CHS, DGS, S, HPROGRAM)
subroutine write_diag_seb_seaice_n(DTCO, DGU, U, DGS, DGSI, S, HPROGRAM)