SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
old_name.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 old_name (&
7  hprogram,hrecin,hrecout)
8 ! #######################################################
9 !
10 !!**** *OLD_NAME* - get the old name of a field for reading in an old SURFEX file
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 08/2011
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 !
43 !
44 !
45 !
46 USE yomhook ,ONLY : lhook, dr_hook
47 USE parkind1 ,ONLY : jprb
48 !
50 !
51 IMPLICIT NONE
52 !
53 !* 0.1 Declarations of arguments
54 ! -------------------------
55 !
56 !
57 !
58  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! main program
59  CHARACTER(LEN=12), INTENT(IN) :: hrecin ! name of field to be read
60  CHARACTER(LEN=12), INTENT(OUT) :: hrecout ! name of field to be read is old file
61 !
62 !
63 !* 0.2 Declarations of local variables
64 ! -------------------------------
65 !
66 INTEGER :: iversion ! version of the old file
67 INTEGER :: ibugfix ! bugfix of the old file
68 !
69 INTEGER :: iresp
70 REAL(KIND=JPRB) :: zhook_handle
71 !-------------------------------------------------------------------------------
72 !
73 IF (lhook) CALL dr_hook('OLD_NAME',0,zhook_handle)
74 !
75 hrecout = hrecin
76 IF (hrecin=='COVER_LIST') THEN
77  CALL read_surf(&
78  hprogram,'VERSION',iversion,iresp)
79  CALL read_surf(&
80  hprogram,'BUG', ibugfix ,iresp)
81  IF (iversion<7 .OR. (iversion==7 .AND. ibugfix==0)) hrecout='COVER'
82 END IF
83 !
84 IF (lhook) CALL dr_hook('OLD_NAME',1,zhook_handle)
85 !-------------------------------------------------------------------------------
86 END SUBROUTINE old_name
subroutine old_name(HPROGRAM, HRECIN, HRECOUT)
Definition: old_name.F90:6