SURFEX v8.1
General documentation of Surfex
fmwritn2.F90
Go to the documentation of this file.
1 ! ######spl
2  SUBROUTINE fmwritn2(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 !!**** *FMWRITN2* - routine to write a integer 2D 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 !! Modification 15/10/97 (V.Masson) 1D and 2D cases
42 !----------------------------------------------------------------------------
43 !
44 !* 0. DECLARATIONS
45 ! ------------
46 !
47 IMPLICIT NONE
48 !
49 !* 0.1 Declarations of arguments
50 !
51 CHARACTER(LEN=*) ,INTENT(IN) ::HFILEM ! file name
52 CHARACTER(LEN=*) ,INTENT(IN) ::HRECFM ! name of the article to be written
53 
54 CHARACTER(LEN=*) ,INTENT(IN) ::HFIPRI ! file for prints in FM
55 
56 INTEGER, INTENT(IN) ::KLENG ! length of the data field
57 INTEGER, DIMENSION(:,:), &
58  INTENT(IN) ::KFIELD ! array containing the data field
59 INTEGER, INTENT(IN) ::KGRID ! C-grid indicator (u,v,w,T)
60 INTEGER, INTENT(IN) ::KLENCH ! length of comment string
61 
62 CHARACTER(LEN=*) ,INTENT(IN) ::HCOMMENT ! comment string
63 
64 INTEGER, INTENT(OUT)::KRESP ! return-code if problems araised
65 !
66 !* 0.2 Declarations of local variables
67 !
68 INTEGER(KIND=8), DIMENSION(SIZE(KFIELD,1),SIZE(KFIELD,2)) :: IFIELD
69 INTEGER :: ILENG
70 !-------------------------------------------------------------------------------
71 !
72 REAL(KIND=JPRB) :: ZHOOK_HANDLE
73 IF (lhook) CALL dr_hook('FMWRITN2',0,zhook_handle)
74 ifield(:,:)=kfield(:,:)
75 !
76 ileng=SIZE(kfield)
77 CALL FM_WRIT(HFILEM,HRECFM,HFIPRI,ILENG,IFIELD,KGRID,KLENCH,HCOMMENT,KRESP)
78 !-------------------------------------------------------------------------------
79 IF (lhook) CALL dr_hook('FMWRITN2',1,zhook_handle)
80 END SUBROUTINE fmwritn2
subroutine fmwritn2(HFILEM, HRECFM, HFIPRI, KLENG, KFIELD, KGRID, KLENCH, HCOMMENT, KRESP)
Definition: fmwritn2.F90:4
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15