SURFEX v8.1
General documentation of Surfex
fmwritx3.F90
Go to the documentation of this file.
1 ! ######spl
2  SUBROUTINE fmwritx3(HFILEM,HRECFM,HFIPRI,KLENG,PFIELD,KGRID,&
3  KLENCH,HCOMMENT,KRESP)
4  USE parkind1, ONLY : jprb
5  USE yomhook , ONLY : lhook, dr_hook
6 ! #############################################################
7 !
8 !!**** *FMWRITX1* - routine to write a real 3D array into a "FM"-file
9 !!
10 !! PURPOSE
11 !! -------
12 !
13 ! The purpose of FMWRITX0 is to convert the real 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 REAL, DIMENSION(:,:,:), &
58  INTENT(IN) ::PFIELD ! 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 :: ILENG
69 REAL(KIND=8), DIMENSION(SIZE(PFIELD,1),SIZE(PFIELD,2),SIZE(PFIELD,3)) :: ZFIELD
70 !-------------------------------------------------------------------------------
71 !
72 REAL(KIND=JPRB) :: ZHOOK_HANDLE
73 IF (lhook) CALL dr_hook('FMWRITX3',0,zhook_handle)
74 zfield=pfield
75 ileng=SIZE(pfield)
76 CALL FM_WRIT(HFILEM,HRECFM,HFIPRI,ILENG,ZFIELD,KGRID,KLENCH,HCOMMENT,KRESP)
77 !-------------------------------------------------------------------------------
78 IF (lhook) CALL dr_hook('FMWRITX3',1,zhook_handle)
79 END SUBROUTINE fmwritx3
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine fmwritx3(HFILEM, HRECFM, HFIPRI, KLENG, PFIELD, KGRID, KLENCH, HCOMMENT, KRESP)
Definition: fmwritx3.F90:4