SURFEX v8.1
General documentation of Surfex
fmwritn1.F90
Go to the documentation of this file.
1 ! ######spl
2  SUBROUTINE fmwritn1(HFILEM,HRECFM,HFIPRI,KLENG,KFIELD,KGRID,&
3  KLENCH,HCOMMENT,KRESP)
4  USE parkind1, ONLY : jprb
5  USE yomhook , ONLY : lhook, dr_hook
6 ! #############################################################
7 !
8 !!**** *FMWRITN1* - routine to write a integer 1D array into a "FM"-file
9 !!
10 !! PURPOSE
11 !! -------
12 !
13 ! The purpose of FMWRITN1 is to convert the integer into integer(kind=8)
14 ! by calling FM_WRIT without interface module
15 !
16 !!** METHOD
17 !! ------
18 !!
19 !! EXTERNAL
20 !! --------
21 !!
22 !! FM_WRIT
23 !!
24 !! IMPLICIT ARGUMENTS
25 !! ------------------
26 !!
27 !!
28 !! REFERENCE
29 !! ---------
30 !!
31 !!
32 !! AUTHOR
33 !! ------
34 !!
35 !! V. MASSON *METEO-FRANCE*
36 !!
37 !! MODIFICATIONS
38 !! -------------
39 !!
40 !! original 06/08/97
41 !----------------------------------------------------------------------------
42 !
43 !* 0. DECLARATIONS
44 ! ------------
45 !
46 IMPLICIT NONE
47 !
48 !* 0.1 Declarations of arguments
49 !
50 CHARACTER(LEN=*) ,INTENT(IN) ::HFILEM ! file name
51 CHARACTER(LEN=*) ,INTENT(IN) ::HRECFM ! name of the article to be written
52 
53 CHARACTER(LEN=*) ,INTENT(IN) ::HFIPRI ! file for prints in FM
54 
55 INTEGER, INTENT(IN) ::KLENG ! length of the data field
56 INTEGER, DIMENSION(:), &
57  INTENT(IN) ::KFIELD ! array containing the data field
58 INTEGER, INTENT(IN) ::KGRID ! C-grid indicator (u,v,w,T)
59 INTEGER, INTENT(IN) ::KLENCH ! length of comment string
60 
61 CHARACTER(LEN=*) ,INTENT(IN) ::HCOMMENT ! comment string
62 
63 INTEGER, INTENT(OUT)::KRESP ! return-code if problems araised
64 !
65 !* 0.2 Declarations of local variables
66 !
67 INTEGER(KIND=8), DIMENSION(SIZE(KFIELD)) :: IFIELD
68 INTEGER :: ILENG
69 !-------------------------------------------------------------------------------
70 !
71 REAL(KIND=JPRB) :: ZHOOK_HANDLE
72 IF (lhook) CALL dr_hook('FMWRITN1',0,zhook_handle)
73 ileng=SIZE(kfield)
74 ifield(:)=kfield(:)
75 CALL FM_WRIT(HFILEM,HRECFM,HFIPRI,ILENG,IFIELD,KGRID,KLENCH,HCOMMENT,KRESP)
76 !-------------------------------------------------------------------------------
77 IF (lhook) CALL dr_hook('FMWRITN1',1,zhook_handle)
78 END SUBROUTINE fmwritn1
subroutine fmwritn1(HFILEM, HRECFM, HFIPRI, KLENG, KFIELD, KGRID, KLENCH, HCOMMENT, KRESP)
Definition: fmwritn1.F90:4
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15