SURFEX v8.1
General documentation of Surfex
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, DUO, U, SM, HPROGRAM,HWRITE)
7 ! ###############################################################################
8 !
9 !!**** *WRITE_DIAG_SEAFLUX_n * - diagnostics for SEAFLUX
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! V. Masson
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 01/2004
28 !! Modified 09/2013 : S. Senesi : call WRITE_DIAG_SEB_SEAICE_n
29 !!------------------------------------------------------------------
30 !
31 USE modd_sfx_oasis, ONLY : lcpl_seaice
32 !
34 USE modd_diag_n, ONLY : diag_options_t
35 USE modd_surf_atm_n, ONLY : surf_atm_t
36 !
38 !
39 USE modd_surf_par, ONLY : xundef
40 !
41 USE modi_write_diag_seb_seaflux_n
42 USE modi_write_diag_seb_ocean_n
43 USE modi_write_diag_seb_seaice_n
44 USE modi_write_diag_misc_seaice_n
45 !
46 USE yomhook ,ONLY : lhook, dr_hook
47 USE parkind1 ,ONLY : jprb
48 !
49 IMPLICIT NONE
50 !
51 !* 0.1 declarations of arguments
52 !
53 !
54 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
55 TYPE(diag_options_t), INTENT(INOUT) :: DUO
56 TYPE(surf_atm_t), INTENT(INOUT) :: U
57 TYPE(seaflux_model_t), INTENT(INOUT) :: SM
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
60  CHARACTER(LEN=3), INTENT(IN) :: HWRITE ! 'PGD' : only physiographic fields are written
61 REAL(KIND=JPRB) :: ZHOOK_HANDLE
62 ! ! 'ALL' : all fields are written
63 !
64 !* 0.2 declarations of local variables
65 !
66 !-------------------------------------------------------------------------------------
67 !
68 IF (lhook) CALL dr_hook('WRITE_DIAG_SEAFLUX_N',0,zhook_handle)
69 IF (hwrite/='PGD') THEN
70 !
71  IF (sm%SD%O%XDIAG_TSTEP==xundef .OR. &
72  abs(nint(sm%S%TTIME%TIME/sm%SD%O%XDIAG_TSTEP)*sm%SD%O%XDIAG_TSTEP-sm%S%TTIME%TIME)<1.e-3 ) THEN
73  CALL write_diag_seb_seaflux_n(dtco, duo, u, sm%CHS, sm%SD%O, sm%SD%D, sm%SD%DC, &
74  sm%S%LHANDLE_SIC, hprogram)
75  IF (sm%SD%GO%LDIAG_OCEAN) CALL write_diag_seb_ocean_n(dtco, duo%CSELECT, u, sm%SD%GO, hprogram)
76  IF (sm%S%LHANDLE_SIC.OR.lcpl_seaice) CALL write_diag_seb_seaice_n(dtco, duo, u, sm%SD%O, &
77  sm%SD%DI, sm%SD%DIC, hprogram)
78  IF (sm%SD%DMI%LDIAG_MISC_SEAICE) &
79  CALL write_diag_misc_seaice_n(dtco, duo%CSELECT, u, sm%SD%DMI, sm%S, hprogram)
80  END IF
81 !
82 ENDIF
83 IF (lhook) CALL dr_hook('WRITE_DIAG_SEAFLUX_N',1,zhook_handle)
84 !-------------------------------------------------------------------------------------
85 !
86 END SUBROUTINE write_diag_seaflux_n
subroutine write_diag_seb_seaice_n(DTCO, DUO, U, DSO, DI, DIC, HP
subroutine write_diag_seb_ocean_n(DTCO, HSELECT, U, DGO, HPROGRAM
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
subroutine write_diag_misc_seaice_n(DTCO, HSELECT, U, DGMSI, S, H
subroutine write_diag_seb_seaflux_n(DTCO, DUO, U, CHS, DSO, D, DC
subroutine write_diag_seaflux_n(DTCO, DUO, U, SM, HPROGRAM, HWRITE)
logical lhook
Definition: yomhook.F90:15