TreeMig Code
Loading...
Searching...
No Matches
OpenAndWriteHeader.f90
Go to the documentation of this file.
1
!==============================================================================
2
!
3
! Name : OpenAndWriteHeader
4
!
5
! Remarks: contains the SUBROUTINES
6
!
7
! OpenAndWriteHeader, OpenAndWriteHeaderLight
8
!
9
!==============================================================================
10
! design : H. Lischke, N. Zimmermann
11
! author(s) : H. Lischke, N. Zimmermann
12
! implementation : H. Lischke, N. Zimmermann
13
! cleaner : T.J. Loeffler
14
! copyright : (c) 1999, 03 by H. Lischke
15
!==============================================================================
16
!==============================================================================
37
!==============================================================================
38
39
SUBROUTINE
openandwriteheader
(theFile, nspc)
40
use
filehandlingmodule
,
only
:
file
,
openfilew
41
use
loggermodule
42
use
all_par
,
only
:
tabsepoutput
,
spec
43
44
IMPLICIT NONE
45
46
! Passed variables>--------------------------------------------------------------------------------
47
INTEGER
,
INTENT(in)
:: nspc
48
TYPE
(
file
),
INTENT(in)
:: theFile
49
! Local variables>---------------------------------------------------------------------------------
50
INTEGER
:: ispec, err
51
Character*1
:: tab
52
53
! ere the SUBROUTINE starts>**********************************************************************
54
if
(
tabsepoutput
)
then
55
tab = char(9)
56
else
57
tab =
','
58
end if
59
call
openfilew
(thefile, err)
60
if
(err /= 0)
then
61
call
logerror
(
"Could not create file: "
//thefile%path)
62
end if
63
write
(thefile%unit, 100)
"lat"
, tab,
"lon"
, tab,
"year"
, tab, &
64
((
spec
(ispec)%nl), tab, ispec=1, nspc),
"all_species"
65
100
FORMAT
(a3,
a1
, a3,
a1
, a4,
a1
, 58(a,
a1
))
66
end SUBROUTINE
openandwriteheader
67
68
!==============================================================================
86
!==============================================================================
87
SUBROUTINE
openandwriteheaderlight
(theFile)
88
use
filehandlingmodule
,
only
:
file
,
openfilew
89
use
loggermodule
,
only
:
logerror
90
! CALL modules for TYPE definitions and +- fixed variables>---------------------------------------------------------------
91
use
all_par
,
only
:
tabsepoutput
,
maxlc
92
93
IMPLICIT NONE
94
95
! Passed variables>--------------------------------------------------------------------------------
96
97
TYPE
(
file
),
INTENT(in)
:: theFile
98
! Local variables>---------------------------------------------------------------------------------
99
INTEGER
:: err, ilc
100
Character*1
:: tab
101
character*2
:: lclcharvec (maxlc)
102
103
104
! Here the SUBROUTINE starts>**********************************************************************
105
if
(
tabsepoutput
)
then
106
tab = char(9)
107
else
108
tab =
','
109
end if
110
call
openfilew
(thefile, err)
111
if
(err /= 0)
then
112
call
logerror
(
"Could not create file: "
//thefile%path)
113
end if
114
do
ilc = 1,maxlc
115
write
(lclcharvec(ilc),
"(I2.2)"
) ilc
116
end do
117
118
write
(thefile%unit, 100)
"lat"
, tab,
"lon"
, tab,
"year"
, tab,
"h_cl"
, tab,&
119
(
"l_cl"
//lclcharvec(ilc), tab, ilc=1, maxlc)
120
100
FORMAT
(a3,
a1
, a3,
a1
, a4,
a1
, a4,
a1
, 40(a,
a1
))
121
end SUBROUTINE
openandwriteheaderlight
122
123
!done
openandwriteheaderlight
subroutine openandwriteheaderlight(thefile)
OpenAndWriteHeaderLight
Definition
OpenAndWriteHeader.f90:88
openandwriteheader
subroutine openandwriteheader(thefile, nspc)
OpenAndWriteHeader
Definition
OpenAndWriteHeader.f90:40
all_par
Definition
All_par.f90:20
all_par::spec
type(specproperties), dimension(maxspc) spec
Definition
All_par.f90:345
all_par::maxlc
integer, parameter maxlc
Definition
All_par.f90:100
all_par::a1
real, dimension(5) a1
Definition
All_par.f90:130
all_par::tabsepoutput
logical tabsepoutput
Definition
All_par.f90:89
filehandlingmodule
Definition
FileHandlingModule.f90:10
filehandlingmodule::openfilew
subroutine openfilew(thefile, err)
openFileW
Definition
FileHandlingModule.f90:73
loggermodule
LoggerModule.
Definition
LoggerModule.f90:9
loggermodule::logerror
subroutine logerror(msg)
LogError
Definition
LoggerModule.f90:83
filehandlingmodule::file
Definition
FileHandlingModule.f90:17
sourceTMFFT
OpenAndWriteHeader.f90
Generated on Wed Mar 27 2024 13:24:05 for TreeMig Code by
1.10.0