4f103efa6a813d13cb2d91ab710d4a3110198409
[MNH-git_open_source-lfs.git] / src / SURFEX / writesurf_sson.F90
1 !SURFEX_LIC Copyright 1994-2014 Meteo-France 
2 !SURFEX_LIC This is part of the SURFEX software governed by the CeCILL-C  licence
3 !SURFEX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SURFEX_LIC for details. version 1.
5 !     #########
6       SUBROUTINE WRITESURF_SSO_n(HPROGRAM)
7 !     #################################
8 !
9 !!****  *WRITESURF_SSO_n* - writes orographic fields
10 !!
11 !!    PURPOSE
12 !!    -------
13 !!       
14 !!
15 !!
16 !!**  METHOD
17 !!    ------
18 !!      
19 !!
20 !!    REFERENCE
21 !!    ---------
22 !!
23 !!
24 !!    AUTHOR
25 !!    ------
26 !!      V. Masson   *Meteo France*      
27 !!
28 !!    MODIFICATIONS
29 !!    -------------
30 !!      Original    01/2003
31 !-------------------------------------------------------------------------------
32 !
33 !*       0.    DECLARATIONS
34 !              ------------
35 !
36 USE MODD_SURF_ATM_SSO_n, ONLY : XAVG_ZS, XSSO_STDEV, XSIL_ZS,    &
37                                   XSSO_ANIS, XSSO_DIR, XSSO_SLOPE, &
38                                   XMIN_ZS, XMAX_ZS,                &
39                                   XAOSIP, XAOSIM, XAOSJP, XAOSJM,  &
40                                   XHO2IP, XHO2IM, XHO2JP, XHO2JM  
41 !
42 USE MODI_WRITE_SURF
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  CHARACTER(LEN=6),  INTENT(IN)  :: HPROGRAM ! program calling
54 !
55 !*       0.2   Declarations of local variables
56 !              -------------------------------
57 !
58 INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears
59  CHARACTER(LEN=12) :: YRECFM         ! Name of the article to be read
60  CHARACTER(LEN=100):: YCOMMENT       ! Comment string
61 REAL(KIND=JPRB) :: ZHOOK_HANDLE
62 !
63 !-------------------------------------------------------------------------------
64 !
65 !*       1.     Orography :
66 !               ---------
67 !
68 !
69 IF (LHOOK) CALL DR_HOOK('WRITESURF_SSO_N',0,ZHOOK_HANDLE)
70 YRECFM='AVG_ZS'
71 YCOMMENT='X_Y_AVG_ZS (M)'
72  CALL WRITE_SURF(HPROGRAM,YRECFM,XAVG_ZS(:),IRESP,HCOMMENT=YCOMMENT)
73 !
74 YRECFM='SIL_ZS'
75 YCOMMENT='X_Y_SIL_ZS (M)'
76  CALL WRITE_SURF(HPROGRAM,YRECFM,XSIL_ZS(:),IRESP,HCOMMENT=YCOMMENT)
77 !
78 !-------------------------------------------------------------------------------
79 !
80 !*       2.     Subgrid Orography :
81 !               -----------------
82 !
83 YRECFM='SSO_STDEV'
84 YCOMMENT='X_Y_SSO_STDEV (M)'
85  CALL WRITE_SURF(HPROGRAM,YRECFM,XSSO_STDEV(:),IRESP,HCOMMENT=YCOMMENT)
86 !
87 !
88 YRECFM='MIN_ZS'
89 YCOMMENT='X_Y_MIN_ZS (M)'
90  CALL WRITE_SURF(HPROGRAM,YRECFM,XMIN_ZS(:),IRESP,HCOMMENT=YCOMMENT)
91 !
92 YRECFM='MAX_ZS'
93 YCOMMENT='X_Y_MAX_ZS (M)'
94  CALL WRITE_SURF(HPROGRAM,YRECFM,XMAX_ZS(:),IRESP,HCOMMENT=YCOMMENT)
95 !
96 YRECFM='SSO_ANIS'
97 YCOMMENT='X_Y_SSO_ANIS (-)'
98  CALL WRITE_SURF(HPROGRAM,YRECFM,XSSO_ANIS(:),IRESP,HCOMMENT=YCOMMENT)
99 !
100 YRECFM='SSO_DIR'
101 YCOMMENT='X_Y_SSO_DIR (DEG)'
102  CALL WRITE_SURF(HPROGRAM,YRECFM,XSSO_DIR(:),IRESP,HCOMMENT=YCOMMENT)
103 !
104 YRECFM='SSO_SLOPE'
105 YCOMMENT='X_Y_SSO_SLOPE (-)'
106  CALL WRITE_SURF(HPROGRAM,YRECFM,XSSO_SLOPE(:),IRESP,HCOMMENT=YCOMMENT)
107 !
108 !-------------------------------------------------------------------------------
109 !
110 !*       3.     Subgrid Orography roughness:
111 !               ---------------------------
112 !
113 !
114 YRECFM='HO2IP'
115 YCOMMENT='X_Y_HO2IP (M)'
116  CALL WRITE_SURF(HPROGRAM,YRECFM,XHO2IP(:),IRESP,HCOMMENT=YCOMMENT)
117 !
118 YRECFM='HO2JP'
119 YCOMMENT='X_Y_HO2JP (M)'
120  CALL WRITE_SURF(HPROGRAM,YRECFM,XHO2JP(:),IRESP,HCOMMENT=YCOMMENT)
121 !
122 YRECFM='HO2IM'
123 YCOMMENT='X_Y_HO2IM (M)'
124  CALL WRITE_SURF(HPROGRAM,YRECFM,XHO2IM(:),IRESP,HCOMMENT=YCOMMENT)
125 !
126 YRECFM='HO2JM'
127 YCOMMENT='X_Y_HO2JM (M)'
128  CALL WRITE_SURF(HPROGRAM,YRECFM,XHO2JM(:),IRESP,HCOMMENT=YCOMMENT)
129 !
130 YRECFM='AOSIP'
131 YCOMMENT='X_Y_AOSIP (-)'
132  CALL WRITE_SURF(HPROGRAM,YRECFM,XAOSIP(:),IRESP,HCOMMENT=YCOMMENT)
133 !
134 YRECFM='AOSJP'
135 YCOMMENT='X_Y_AOSJP (-)'
136  CALL WRITE_SURF(HPROGRAM,YRECFM,XAOSJP(:),IRESP,HCOMMENT=YCOMMENT)
137 !
138 YRECFM='AOSIM'
139 YCOMMENT='X_Y_AOSIM (-)'
140  CALL WRITE_SURF(HPROGRAM,YRECFM,XAOSIM(:),IRESP,HCOMMENT=YCOMMENT)
141 !
142 YRECFM='AOSJM'
143 YCOMMENT='X_Y_AOSJM (-)'
144  CALL WRITE_SURF(HPROGRAM,YRECFM,XAOSJM(:),IRESP,HCOMMENT=YCOMMENT)
145 IF (LHOOK) CALL DR_HOOK('WRITESURF_SSO_N',1,ZHOOK_HANDLE)
146 !
147 !-------------------------------------------------------------------------------
148 !
149 END SUBROUTINE WRITESURF_SSO_n