SURFEX v8.1
General documentation of Surfex
read_nam_prep_surfn.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 read_nam_prep_surf_n(HPROGRAM)
7 ! #######################################################
8 !
9 !---------------------------------------
10 !
11 USE modd_surf_par, ONLY : xundef, nundef
13 !
15 USE modi_get_luout
16 USE modi_open_namelist
17 USE modi_close_namelist
18 USE mode_pos_surf
19 !
20 !
21 USE yomhook ,ONLY : lhook, dr_hook
22 USE parkind1 ,ONLY : jprb
23 !
24 IMPLICIT NONE
25 !
26  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
27 !
28 INTEGER :: ILUNAM ! logical unit of namelist file
29 INTEGER :: ILUOUT
30 LOGICAL :: GFOUND ! Return code when searching namelist
31 REAL(KIND=JPRB) :: ZHOOK_HANDLE
32 !
33 !---------------------------------------
34 !
35 IF (lhook) CALL dr_hook('READ_NAM_PREP_SURF_N',0,zhook_handle)
36 !
37 nhalo_prep = 0
38 !
43 cfile = ' '
44 cfiletype = ' '
45 cfilepgd = ' '
46 cfilepgdtype = ' '
47 lwrite_extern = .false.
48 !
49  CALL get_luout(hprogram,iluout)
50 !
51 !
52  CALL open_namelist(hprogram,ilunam)
53  CALL posnam(ilunam,'NAM_PREP_SURF_ATM',gfound,iluout)
54 IF (gfound) READ(unit=ilunam,nml=nam_prep_surf_atm)
55  CALL close_namelist(hprogram,ilunam)
56 !
57  CALL test_nam_var_surf(iluout,'CFILETYPE', cfiletype, ' ','GRIB ','MESONH','ASCII ','LFI ',&
58  'FA ','NC ')
59  CALL test_nam_var_surf(iluout,'CFILEPGDTYPE', cfilepgdtype, ' ','GRIB ','MESONH','ASCII ',&
60  'LFI ','FA ','NC ')
61 IF (lhook) CALL dr_hook('READ_NAM_PREP_SURF_N',1,zhook_handle)
62 !
63 END SUBROUTINE read_nam_prep_surf_n
character(len=28) cfile
character(len=6) cfilepgdtype
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
character(len=28) cfilepgd
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
integer, parameter nundef
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15
character(len=6) cfiletype
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)
subroutine read_nam_prep_surf_n(HPROGRAM)