Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flexpart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Püschel
Flexpart
Commits
5cef1ebd
Commit
5cef1ebd
authored
8 years ago
by
Don Morton
Browse files
Options
Downloads
Patches
Plain Diff
Modified preproc file structure so that first string is 8-byte version
See ticket
https://www.flexpart.eu/ticket/162
parent
da10dc89
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flexpart_code/.gitignore
+2
-0
2 additions, 0 deletions
flexpart_code/.gitignore
flexpart_code/fpmetbinary_mod.F90
+51
-7
51 additions, 7 deletions
flexpart_code/fpmetbinary_mod.F90
with
53 additions
and
7 deletions
flexpart_code/.gitignore
+
2
−
0
View file @
5cef1ebd
...
...
@@ -2,3 +2,5 @@
*.mod
FLEXPART_GFORTRAN
GRIB2FLEXPART_GFORTRAN
flexpart_ifort
grib2flexpart_ifort
This diff is collapsed.
Click to expand it.
flexpart_code/fpmetbinary_mod.F90
+
51
−
7
View file @
5cef1ebd
...
...
@@ -7,12 +7,7 @@ MODULE fpmetbinary_mod
! Authors Don Morton (Don.Morton@borealscicomp.com) *
! Delia Arnold (deliona.arnold@gmail.com) *
! *
! 15 Sep 2015 *
! *
! Currently, the only data being dumped and loaded has data structures *
! defined in com_mod.f90. In the future, perhaps it will be necessary *
! to use data structures from other parts of the FLEXPART code system. *
! *
! 07 Oct 2016 *
! *
! Most of the data structures from com_mod.f90 that are dumped and *
! loaded have a final dimension of size two, so that they may hold data *
...
...
@@ -26,6 +21,24 @@ MODULE fpmetbinary_mod
! happens if a read or write fails in any way. Right now, it's crash *
! city. *
! *
! Recent enhancements (07 Oct 2016) DJM: *
! *
! - file format changed so that compiled dimensions are output, and *
! during input these same dimensions are compared with the dimensions *
! compiled into the flexpart that is reading it. A discrepancy *
! causes abort, so that time isn't wasted reading an incompatible *
! file. *
! *
! - file format changed so that first item is an 8-character string *
! depicting the version of the preprocessed file format. *
! An inconsistency between a detected and expected string results *
! in program abort. *
! *
! *** IMPORTANT *** - when the format of the preprocessed output is *
! modified in any way, be sure to change the version string below, *
! PREPROC_FORMAT_VERSION_STR, so that attempts to read the output *
! with a different format version will cause an abort. *
! *
!*****************************************************************************
USE
com_mod
...
...
@@ -38,7 +51,14 @@ MODULE fpmetbinary_mod
! of code
INTEGER
,
PARAMETER
::
IOUNIT_DUMP
=
33
,
IOUNIT_LOAD
=
34
,
&
IOUNIT_TEXTOUT
=
35
PRIVATE
IOUNIT_DUMP
,
IOUNIT_LOAD
,
IOUNIT_TEXTOUT
,
fpio
! 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 '
PRIVATE
IOUNIT_DUMP
,
IOUNIT_LOAD
,
IOUNIT_TEXTOUT
,
fpio
,
&
&
PREPROC_FORMAT_VERSION_STR
CONTAINS
...
...
@@ -254,10 +274,16 @@ CONTAINS
INTEGER
::
temp_nxmax
,
temp_nymax
,
temp_nzmax
,
&
&
temp_nuvzmax
,
temp_nwzmax
CHARACTER
(
LEN
=
8
)
::
temp_preproc_format_version_str
CHARACTER
(
LEN
=
128
)
::
errmesg
if
(
op
==
'DUMP'
)
THEN
! Write the preprocessing format version string
WRITE
(
iounit
)
PREPROC_FORMAT_VERSION_STR
! Write the compiled max dimensions from par_mod - these are
! not meant to be reassigned during a LOAD, but used as "header"
! information to provide the structure of arrays
...
...
@@ -401,6 +427,24 @@ CONTAINS
ELSE
IF
(
op
==
'LOAD'
)
THEN
! Read the preprocessed format version string and insure it
! matches this version
READ
(
iounit
)
temp_preproc_format_version_str
PRINT
*
,
'Reading preprocessed file format version: '
,
&
&
temp_preproc_format_version_str
IF
(
TRIM
(
temp_preproc_format_version_str
)
==
&
&
TRIM
(
PREPROC_FORMAT_VERSION_STR
))
THEN
CONTINUE
ELSE
PRINT
*
,
''
PRINT
*
,
'Inconsistent preprocessing format version'
PRINT
*
,
'Expected Version: '
,
PREPROC_FORMAT_VERSION_STR
PRINT
*
,
'Detected Version: '
,
temp_preproc_format_version_str
PRINT
*
,
''
STOP
END
IF
! Read the compiled max dimensions that were dumped from par_mod
! when creating the fp file, so that we can compare against
! current FLEXPART dimensions - they need to be the same, or else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment