diff --git a/flexpart_code/FLEXPART.F90 b/flexpart_code/FLEXPART.F90 index b65a6d90f78638ab132960eb09b88ef32b4e875f..0e85f694c1c000d7051b5a0c93b98f3a14a5b451 100644 --- a/flexpart_code/FLEXPART.F90 +++ b/flexpart_code/FLEXPART.F90 @@ -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'// & diff --git a/flexpart_code/GRIB2FLEXPART.F90 b/flexpart_code/GRIB2FLEXPART.F90 index fd0edff0c469237e3c226725ee4aa26188327166..80762670dfffe7642c0b7e1e75a9a7e23abdf622 100644 --- a/flexpart_code/GRIB2FLEXPART.F90 +++ b/flexpart_code/GRIB2FLEXPART.F90 @@ -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 diff --git a/flexpart_code/fpmetbinary_mod.F90 b/flexpart_code/fpmetbinary_mod.F90 index 91ee22016d250b99576852acb4c18a189f5d0847..c2e69062adf0eca32c0068112490ad8a5e476d12 100644 --- a/flexpart_code/fpmetbinary_mod.F90 +++ b/flexpart_code/fpmetbinary_mod.F90 @@ -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 diff --git a/flexpart_code/makefile.ctbto.ifort b/flexpart_code/makefile.ctbto.ifort index cb169b3262db594381d957916c1c7b3566a834e8..23416d5418328e2795a41a424a013917ea04273c 100644 --- a/flexpart_code/makefile.ctbto.ifort +++ b/flexpart_code/makefile.ctbto.ifort @@ -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 diff --git a/flexpart_code/makefile.general.ifort b/flexpart_code/makefile.general.ifort index 5629bdd310ddb05d9bd33d6a7d29198cf644fe61..876c27a978f51be9cc336493bb65211304dbd13a 100644 --- a/flexpart_code/makefile.general.ifort +++ b/flexpart_code/makefile.general.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