SURFEX v8.1
General documentation of Surfex
write_diag_misc_seaicen.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_misc_seaice_n (DTCO, HSELECT, U, DGMSI, S, HPROGRAM)
7 ! #################################
8 !
9 !!**** *WRITE_DIAG_SEB_SEAICE_n* - write the seaice diagnostic fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! REFERENCE
19 !! ---------
20 !!
21 !!
22 !! AUTHOR
23 !! ------
24 !! S.Senesi *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 01/2014
29 !-------------------------------------------------------------------------------
30 !
31 !* 0. DECLARATIONS
32 ! ------------
33 !
34 !
36 USE modd_surf_atm_n, ONLY : surf_atm_t
38 USE modd_seaflux_n, ONLY : seaflux_t
39 !
40 USE modd_sfx_oasis, ONLY : lcpl_seaice
41 !
42 !
43 !
44 !
45 USE modi_init_io_surf_n
47 USE modi_end_io_surf_n
48 !
49 USE yomhook ,ONLY : lhook, dr_hook
50 USE parkind1 ,ONLY : jprb
51 !
52 IMPLICIT NONE
53 !
54 !* 0.1 Declarations of arguments
55 ! -------------------------
56 !
57 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
58  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
59 TYPE(surf_atm_t), INTENT(INOUT) :: U
60 TYPE(diag_misc_seaice_t), INTENT(INOUT) :: DGMSI
61 TYPE(seaflux_t), INTENT(INOUT) :: S
62 !
63  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
64 !
65 !* 0.2 Declarations of local variables
66 ! -------------------------------
67 !
68 INTEGER :: IRESP ! IRESP : return-code if a problem appears
69  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
70  CHARACTER(LEN=100):: YCOMMENT ! Comment string
71  CHARACTER(LEN=2) :: YNUM
72 INTEGER :: JSV, JSW
73 !
74 REAL(KIND=JPRB) :: ZHOOK_HANDLE
75 !
76 !-------------------------------------------------------------------------------
77 !
78 ! Initialisation for IO
79 !
80 IF (lhook) CALL dr_hook('WRITE_DIAG_MISC_SEAICE_N',0,zhook_handle)
81 !
82  CALL init_io_surf_n(dtco, u, hprogram,'SEA ','SEAFLX','WRITE','SEAFLUX_DIAGNOSTICS.OUT.nc')
83 !
84 IF(lcpl_seaice.OR.s%LHANDLE_SIC)THEN
85 !
86  ycomment='Sea-ice temperature (K)'
87  CALL write_surf(hselect,hprogram,'TSICE',s%XTICE(:),iresp,ycomment)
88 !
89  ycomment='Sea-ice albedo (-)'
90  CALL write_surf(hselect,hprogram,'IALB',s%XICE_ALB(:),iresp,ycomment)
91 !
92 ENDIF
93 !
94 IF (trim(s%CSEAICE_SCHEME) == 'GELATO') THEN
95  ycomment='Sea-ice thickness (m)'
96  CALL write_surf(hselect,hprogram,'SIT',dgmsi%XSIT(:),iresp,ycomment)
97  !
98  ycomment='Sea-ice snow depth (m)'
99  CALL write_surf(hselect,hprogram,'SND',dgmsi%XSND(:),iresp,ycomment)
100  !
101  ycomment='Sea mixed layer temp for Glt (K)'
102  CALL write_surf(hselect,hprogram,'SIMLT',dgmsi%XMLT(:),iresp,ycomment)
103  !
104 ENDIF
105 ! -------------
106 ! End of IO
107 !
108  CALL end_io_surf_n(hprogram)
109 
110 IF (lhook) CALL dr_hook('WRITE_DIAG_MISC_SEAICE_N',1,zhook_handle)
111 !
112 !
113 END SUBROUTINE write_diag_misc_seaice_n
static const char * trim(const char *name, int *n)
Definition: drhook.c:2383
integer, parameter jprb
Definition: parkind1.F90:32
subroutine write_diag_misc_seaice_n(DTCO, HSELECT, U, DGMSI, S, H
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:7
logical lhook
Definition: yomhook.F90:15
subroutine init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION