Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
flexpart
flexpart
Commits
57a9ccec
Commit
57a9ccec
authored
Oct 12, 2016
by
Don Morton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Miscellaneous changes, discussed in flexpart.eu Ticket #163
https://www.flexpart.eu/ticket/163
parent
e7403c83
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
18 deletions
+30
-18
flexpart_code/FLEXPART.F90
flexpart_code/FLEXPART.F90
+2
-2
flexpart_code/GRIB2FLEXPART.F90
flexpart_code/GRIB2FLEXPART.F90
+24
-12
flexpart_code/fpmetbinary_mod.F90
flexpart_code/fpmetbinary_mod.F90
+2
-2
flexpart_code/makefile.ctbto.ifort
flexpart_code/makefile.ctbto.ifort
+1
-1
flexpart_code/makefile.general.ifort
flexpart_code/makefile.general.ifort
+1
-1
No files found.
flexpart_code/FLEXPART.F90
View file @
57a9ccec
...
...
@@ -78,9 +78,9 @@ program flexpart
! Print the GPL License statement
!*******************************************************
#if defined CTBTO
print
*
,
'Welcome to FLEXPART Version 9.
0
CTBTO'
print
*
,
'Welcome to FLEXPART Version 9.
3.1f
CTBTO'
#else
print
*
,
'Welcome to FLEXPART Version 9.
0
'
print
*
,
'Welcome to FLEXPART Version 9.
3.1f
'
#endif
print
*
,
'FLEXPART is free software released under the GNU Genera'
//
&
...
...
flexpart_code/GRIB2FLEXPART.F90
View file @
57a9ccec
...
...
@@ -58,9 +58,9 @@ program grib2flexpart
! Print the GPL License statement
!*******************************************************
#if defined CTBTO
print
*
,
'Welcome to GRIB2FLEXPART Version
1.0
CTBTO'
print
*
,
'Welcome to GRIB2FLEXPART Version
9.3.1f
CTBTO'
#else
print
*
,
'Welcome to GRIB2FLEXPART Version
1.0
'
print
*
,
'Welcome to GRIB2FLEXPART Version
9.3.1f
'
#endif
print
*
,
'FLEXPART is free software released under the GNU Genera'
//
&
...
...
@@ -216,29 +216,41 @@ integer function overwritecheck( dump_path, input_path, input_is_path )
write
(
pid
,
*
)
getpid
()
write
(
current_time
,
*
)
time
()
! generate tmp file name using PID and timestamp
tmp_file_name
=
"overwritecheck_"
//
trim
(
adjustl
(
pid
))//
"_"
//
trim
(
adjustl
(
current_time
))//
".tmp"
tmp_file_path
=
trim
(
dump_path
)//
"/"
//
trim
(
tmp_file_name
)
!!
tmp_file_name = "overwritecheck_"//trim(adjustl(pid))//"_"//trim(adjustl(current_time))//".tmp"
!!
tmp_file_path = trim(dump_path)//"/"//trim(tmp_file_name)
! create tmp file in output directory
open
(
10001
,
file
=
trim
(
tmp_file_path
),
status
=
"new"
,
action
=
"write"
,
iostat
=
open_status
)
!!
open(10001, file=trim(tmp_file_path), status="new", action="write", iostat=open_status)
! check for tmp file
if
(
open_status
/
=
0
)
then
print
*
,
"Output directory does not exist or is not writeable"
stop
'Error: Incorrect arguments'
endif
!! if ( open_status /= 0 ) then
!! print *, "Output directory does not exist or is not writeable"
!! print *, "File "//trim(tmp_file_path)//", iostat=",open_status
!! print *, "PID: ", pid, getpid()
!! print *, "current_time: ", current_time
!! stop 'Error: Incorrect arguments'
!! endif
! generate tmp file name in input directory
if
(
input_is_path
==
1
)
then
check_file_path
=
trim
(
input_path
)//
"/"
//
trim
(
tmp_file_name
)
!! check_file_path = trim(input_path)//"/"//trim(tmp_file_name)
stop
'Error: Incorrect arguments; input file is path'
else
check_file_path
=
trim
(
input_path
(:
scan
(
input_path
,
'/'
,
.TRUE.
)))//
trim
(
tmp_file_name
)
if
(
scan
(
input_path
,
'/'
)
==
0
)
then
check_file_path
=
trim
(
dump_path
)//
"/"
//
trim
(
input_path
)
else
check_file_path
=
trim
(
dump_path
)//
trim
(
input_path
(
scan
(
input_path
,
'/'
,
.TRUE.
):))
endif
endif
!check for file presence
print
*
,
"Check if output file "
//
trim
(
check_file_path
)//
" exists ..."
inquire
(
file
=
TRIM
(
check_file_path
),
exist
=
exists
)
! delete tmp file
close
(
10001
,
status
=
'DELETE'
)
!!
close(10001, status='DELETE')
if
(
exists
)
then
overwritecheck
=
-1
print
*
,
"Warning: Output file "
//
trim
(
check_file_path
)//
" exists"
stop
'Please remove this file if the output directory is correct'
endif
end
function
flexpart_code/fpmetbinary_mod.F90
View file @
57a9ccec
...
...
@@ -55,7 +55,7 @@ MODULE fpmetbinary_mod
! When a change is made to the format of the preprocessed file, such that
! this routine will not be able to read a previous version, this version
! string should be modified
CHARACTER
(
LEN
=
8
),
PARAMETER
::
PREPROC_FORMAT_VERSION_STR
=
'
9.3.1e '
CHARACTER
(
LEN
=
12
),
PARAMETER
::
PREPROC_FORMAT_VERSION_STR
=
'
FP_p-9.3.1'
//
char
(
0
)
PRIVATE
IOUNIT_DUMP
,
IOUNIT_LOAD
,
IOUNIT_TEXTOUT
,
fpio
,
&
&
PREPROC_FORMAT_VERSION_STR
...
...
@@ -274,7 +274,7 @@ CONTAINS
INTEGER
::
temp_nxmax
,
temp_nymax
,
temp_nzmax
,
&
&
temp_nuvzmax
,
temp_nwzmax
CHARACTER
(
LEN
=
8
)
::
temp_preproc_format_version_str
CHARACTER
(
LEN
=
12
)
::
temp_preproc_format_version_str
CHARACTER
(
LEN
=
128
)
::
errmesg
...
...
flexpart_code/makefile.ctbto.ifort
View file @
57a9ccec
...
...
@@ -8,7 +8,7 @@ DEFS = -DCTBTO
# Set up for devlan ifort
INTEL_ROOT
=
/cots/intel/composer_xe_2013.2.146
GRIB_API_ROOT
=
/dvl/atm/klinkl/
tmp
/ifort_grib_api/grib_api-1.12.3
GRIB_API_ROOT
=
/dvl/atm/klinkl/
src
/ifort_grib_api/grib_api-1.12.3
FC
=
$(INTEL_ROOT)
/bin/ifort
...
...
flexpart_code/makefile.general.ifort
View file @
57a9ccec
...
...
@@ -9,7 +9,7 @@ DEFS = -DCTBTO
# Set up for devlan ifort
INTEL_ROOT
=
/cots/intel/composer_xe_2013.2.146
GRIB_API_ROOT
=
/dvl/atm/klinkl/
tmp
/ifort_grib_api/grib_api-1.12.3
GRIB_API_ROOT
=
/dvl/atm/klinkl/
src
/ifort_grib_api/grib_api-1.12.3
FC
=
$(INTEL_ROOT)
/bin/ifort
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment