SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
prep_grid_extern.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 prep_grid_extern (&
7  hfiletype,kluout,hgridtype,hinterp_type,kni)
8 ! ##########################################################################
9 !
10 !!**** *PREP_GRID_EXTERN* - reads EXTERNALIZED Surface grid.
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !!
32 !! V. Masson
33 !!
34 !! MODIFICATIONS
35 !! -------------
36 !! Original 06/2003
37 !-------------------------------------------------------------------------------
38 !
39 !* 0. DECLARATIONS
40 ! ------------
41 !
42 !
43 !
44 !
46 USE modi_prep_grid_conf_proj
47 USE modi_prep_grid_cartesian
48 USE modi_prep_grid_gauss
49 USE modi_prep_grid_lonlat_reg
50 !
51 USE yomhook ,ONLY : lhook, dr_hook
52 USE parkind1 ,ONLY : jprb
53 !
54 USE modi_abor1_sfx
55 !
56 IMPLICIT NONE
57 !
58 !* 0.1. Declaration of arguments
59 ! ------------------------
60 !
61 !
62 !
63  CHARACTER(LEN=6), INTENT(IN) :: hfiletype ! file type
64 INTEGER, INTENT(IN) :: kluout ! logical unit of output listing
65  CHARACTER(LEN=10), INTENT(OUT) :: hgridtype ! Grid type
66  CHARACTER(LEN=6), INTENT(OUT) :: hinterp_type ! Grid type
67 INTEGER, INTENT(OUT) :: kni ! number of points
68 !
69 !* 0.2 Declaration of local variables
70 ! ------------------------------
71 !
72 INTEGER :: iresp
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 !-----------------------------------------------------------------------
76 !
77 !* 1 Type of grid
78 ! ------------
79 !
80 IF (lhook) CALL dr_hook('PREP_GRID_EXTERN',0,zhook_handle)
81  CALL read_surf(&
82  hfiletype,'GRID_TYPE',hgridtype,iresp)
83 !
84 !-----------------------------------------------------------------------
85 !
86 !* 2 Reading of grid
87 ! ---------------
88 !
89 IF (hgridtype=='CONF PROJ ') THEN
90  CALL prep_grid_conf_proj(&
91  hfiletype,hinterp_type,kni)
92 ELSE IF (hgridtype=='CARTESIAN ') THEN
93  CALL prep_grid_cartesian(&
94  hfiletype,hinterp_type,kni)
95 ELSE IF (hgridtype=='GAUSS ') THEN
96  CALL prep_grid_gauss(&
97  hfiletype,hinterp_type,kni)
98 ELSE IF (hgridtype=='LONLAT REG') THEN
99  hgridtype = 'LATLON '
100  CALL prep_grid_lonlat_reg(&
101  hfiletype,hinterp_type,kni)
102 ELSE
103  WRITE(kluout,*) 'GRIDTYPE "',hgridtype,'" NOT ACCEPTED AS INPUT FILE FOR FIELD PREPARATION'
104  CALL abor1_sfx('GRIDTYPE NOT ACCEPTED AS INPUT FILE FOR FIELD PREPARATION, '//hgridtype)
105 END IF
106 IF (lhook) CALL dr_hook('PREP_GRID_EXTERN',1,zhook_handle)
107 !
108 !-----------------------------------------------------------------------
109 !
110 END SUBROUTINE prep_grid_extern
subroutine prep_grid_cartesian(HFILETYPE, HINTERP_TYPE, KNI)
subroutine prep_grid_lonlat_reg(HFILETYPE, HINTERP_TYPE, KNI)
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6
subroutine prep_grid_conf_proj(HFILETYPE, HINTERP_TYPE, KNI)
subroutine prep_grid_gauss(HFILETYPE, HINTERP_TYPE, KNI)
subroutine prep_grid_extern(HFILETYPE, KLUOUT, HGRIDTYPE, HINTERP_TYPE, KNI)