PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_posnam_phy.F90
Go to the documentation of this file.
2IMPLICIT NONE
3PRIVATE
4PUBLIC :: posnam_phy
5CONTAINS
6SUBROUTINE posnam_phy(TFILENAM, CDNAML, LDNEEDNAM, LDFOUND)
7!Wrapper to call fiat-compatible version of posname or the mesonh routine
8
10USE mode_msg, ONLY: print_msg
11#ifdef PHYEX_MESONH
12USE mode_pos, ONLY: posnam
13#else
14USE namelist_mod, ONLY: posname
15#endif
16
17IMPLICIT NONE
18
19TYPE(tfiledata), INTENT(IN) :: tfilenam !< Namelist file
20CHARACTER(LEN=*), INTENT(IN) :: cdnaml !< Namelist name
21LOGICAL, INTENT(IN) :: ldneednam !< True to abort if namelist is absent
22LOGICAL, INTENT(OUT) :: ldfound !< True if namelist has been found
23
24INTEGER :: istat
25CHARACTER(LEN=LEN(CDNAML)+20) :: ctemp
26
27#ifdef PHYEX_MESONH
28CALL posnam(tfilenam, cdnaml, ldfound)
29#else
30CALL posname(tfilenam%NLU, cdnaml, istat)
31ldfound=istat==0
32#endif
33IF(ldneednam .AND. .NOT. ldfound) THEN
34 ctemp='CANNOT LOCATE '//cdnaml
35 CALL print_msg(nverb_fatal, 'GEN', 'POSNAM_PHY', ctemp)
36ENDIF
37
38END SUBROUTINE posnam_phy
39END MODULE mode_posnam_phy
integer, parameter nverb_fatal
Definition modd_io.F90:6
subroutine, public posnam_phy(tfilenam, cdnaml, ldneednam, ldfound)