SURFEX v8.1
General documentation of Surfex
writesurf_dummyn.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 writesurf_dummy_n (HSELECT, DUU, HPROGRAM)
7 ! ##########################################
8 !
9 !!**** *WRITESURF_DUMMY_n* - routine to write dummy surface fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! AUTHOR
15 !! ------
16 !! V. Masson *Meteo France*
17 !!
18 !! MODIFICATIONS
19 !! -------------
20 !! Original 03/2004
21 !! P.Tulet 2015 Bug depassement de tableau YRECFM
22 !-------------------------------------------------------------------------------
23 !
24 !* 0. DECLARATIONS
25 ! ------------
26 !
28 !
30 !
31 !
32 USE yomhook ,ONLY : lhook, dr_hook
33 USE parkind1 ,ONLY : jprb
34 !
35 IMPLICIT NONE
36 !
37 !* 0.1 Declarations of arguments
38 ! -------------------------
39 !
40 !
41  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
42 !
43 TYPE(dummy_surf_fields_t), INTENT(INOUT) :: DUU
44 !
45  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM !
46 !
47 !* 0.2 Declarations of local variables
48 ! -------------------------------
49 !
50 INTEGER :: JDUMMY ! loop counter
51 !
52  CHARACTER(LEN=20 ):: YSTRING20 ! string
53  CHARACTER(LEN=3 ):: YSTRING03 ! string
54 !
55 INTEGER :: IRESP ! IRESP : return-code if a problem appears
56  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
57  CHARACTER(LEN=100):: YCOMMENT ! Comment string
58 REAL(KIND=JPRB) :: ZHOOK_HANDLE
59 !
60 !-------------------------------------------------------------------------------
61 !
62 !* 1. Number of dummy fields :
63 ! ----------------------
64 !
65 IF (lhook) CALL dr_hook('WRITESURF_DUMMY_N',0,zhook_handle)
66 yrecfm='DUMMY_GR_NBR'
67 ycomment=' '
68 !
69  CALL write_surf(hselect, &
70  hprogram,yrecfm,duu%NDUMMY_NBR,iresp,hcomment=ycomment)
71 !
72 !-------------------------------------------------------------------------------
73 !
74 !* 2. Dummy fields :
75 ! ------------
76 !
77 DO jdummy=1,duu%NDUMMY_NBR
78  !
79  WRITE(yrecfm,'(A8,I3.3,A1)') 'DUMMY_GR',jdummy,' '
80  ystring20=duu%CDUMMY_NAME(jdummy)
81  ystring03=duu%CDUMMY_AREA(jdummy)
82  ycomment='X_Y_'//yrecfm//ystring20//ystring03// &
83  ' '
84  CALL write_surf(hselect, &
85  hprogram,yrecfm,duu%XDUMMY_FIELDS(:,jdummy),iresp,hcomment=ycomment)
86 END DO
87 IF (lhook) CALL dr_hook('WRITESURF_DUMMY_N',1,zhook_handle)
88 !
89 !-------------------------------------------------------------------------------
90 !
91 END SUBROUTINE writesurf_dummy_n
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine writesurf_dummy_n(HSELECT, DUU, HPROGRAM)