source:
flexpart.git/src/detectformat.f90
Last change on this file was 92fab65, checked in by Ignacio Pisso <ip@…>, 4 years ago | |
---|---|
|
|
File size: 2.0 KB |
Rev | Line | |
---|---|---|
[92fab65] | 1 | ! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt |
2 | ! SPDX-License-Identifier: GPL-3.0-or-later | |
[332fbbd] | 3 | |
[61e07ba] | 4 | integer function detectformat() |
5 | ||
6 | !***************************************************************************** | |
7 | ! * | |
8 | ! This routine reads the 1st file with windfields to determine * | |
9 | ! the format. * | |
10 | ! * | |
11 | ! Authors: M. Harustak * | |
12 | ! * | |
13 | ! 6 May 2015 * | |
14 | ! * | |
15 | ! Unified ECMWF and GFS builds * | |
16 | ! Marian Harustak, 12.5.2017 * | |
17 | ! - Added routine to FP10 Flexpart distribution * | |
18 | !***************************************************************************** | |
19 | ! * | |
20 | ! Variables: * | |
21 | ! fname file name of file to check * | |
22 | ! * | |
23 | !***************************************************************************** | |
24 | ||
25 | use par_mod | |
26 | use com_mod | |
27 | use class_gribfile | |
28 | ||
29 | ||
30 | implicit none | |
31 | ||
32 | character(len=255) :: filename | |
33 | character(len=255) :: wfname1(maxwf) | |
34 | integer :: metdata_format | |
35 | ||
36 | ! If no file is available | |
37 | if ( maxwf.le.0 ) then | |
38 | print*,'No wind file available' | |
39 | detectformat = GRIBFILE_CENTRE_UNKNOWN | |
40 | return | |
41 | endif | |
42 | ||
43 | ! construct filename | |
44 | filename = path(3)(1:length(3)) // trim(wfname(1)) | |
45 | ||
46 | ! get format | |
47 | detectformat = gribfile_centre(TRIM(filename)) | |
48 | ||
49 | end |
Note: See TracBrowser
for help on using the repository browser.