- Timestamp:
- Sep 1, 2015, 9:31:33 AM (9 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- f55fdce
- Parents:
- cda0919
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/concoutput.f90
r5f9d14a r478e9e6 97 97 real,parameter :: weightair=28.97 98 98 logical :: sp_zer 99 LOGICAL,save :: init=.true. 99 100 character :: adate*8,atime*6 100 101 character(len=3) :: anspec 101 102 integer :: mind 102 103 ! mind eso:added to ensure identical results between 2&3-fields versions 103 104 CHARACTER(LEN=8),save :: file_stat='REPLACE' 104 105 105 106 ! Determine current calendar date, needed for the file name … … 110 111 write(adate,'(i8.8)') jjjjmmdd 111 112 write(atime,'(i6.6)') ihmmss 112 open(unitdates,file=path(2)(1:length(2))//'dates', ACCESS='APPEND')113 OPEN(unitdates,file=path(2)(1:length(2))//'dates', ACCESS='APPEND', STATUS=file_stat) 113 114 write(unitdates,'(a)') adate//atime 114 115 close(unitdates) 116 117 ! Overwrite existing dates file on first call, later append to it 118 ! This fixes a bug where the dates file kept growing across multiple runs 119 ! TODO check if the 'always APPEND'-behaviour is useful in other scenarioes 120 ! e.g. (restart?) 121 IF (init) THEN 122 file_stat='OLD' 123 init=.false. 124 END IF 125 126 115 127 116 128 ! For forward simulations, output fields have dimension MAXSPEC, -
src/concoutput_mpi.f90
r5f9d14a r478e9e6 102 102 real,parameter :: weightair=28.97 103 103 logical :: sp_zer 104 LOGICAL,save :: init=.true. 104 105 character :: adate*8,atime*6 105 106 character(len=3) :: anspec 106 107 integer :: mind 107 108 ! mind eso:added to ensure identical results between 2&3-fields versions 109 CHARACTER(LEN=8),save :: file_stat='REPLACE' 108 110 109 111 ! Measure execution time … … 118 120 write(adate,'(i8.8)') jjjjmmdd 119 121 write(atime,'(i6.6)') ihmmss 120 open(unitdates,file=path(2)(1:length(2))//'dates', ACCESS='APPEND')122 OPEN(unitdates,file=path(2)(1:length(2))//'dates', ACCESS='APPEND', STATUS=file_stat) 121 123 write(unitdates,'(a)') adate//atime 122 124 close(unitdates) 125 126 ! Overwrite existing dates file on first call, later append to it 127 ! This fixes a bug where the dates file kept growing across multiple runs 128 ! TODO check if the 'always APPEND'-behaviour is useful in other scenarioes 129 ! e.g. (restart?) 130 IF (init) THEN 131 file_stat='OLD' 132 init=.false. 133 END IF 134 123 135 124 136 ! For forward simulations, output fields have dimension MAXSPEC,
Note: See TracChangeset
for help on using the changeset viewer.