Skip to content
Snippets Groups Projects
Commit 57a9ccec authored by Don Morton's avatar Don Morton
Browse files

Miscellaneous changes, discussed in flexpart.eu Ticket #163

parent e7403c83
No related branches found
No related tags found
No related merge requests found
......@@ -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'// &
......
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment