Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bufr.pm:bufrdump [2015-03-18 13:19:19] pals |
bufr.pm:bufrdump [2022-05-31 09:29:31] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Use this in Makefile, with $(FC) set to your Fortran compiler (e.g. gfortran or g77), $(LDIR) set to the directory where libbufr.a is located, and $(FCFLAGS) set to -fbackslash for gfortran | + | Use this in Makefile, with $(FC) set to your Fortran compiler (e.g. gfortran or g77), $(LDIR) set to the directory where libbufr.a is located, and $(FCFLAGS) set to -fbackslash for gfortran. Note that code for comfilter.f is found at the end of this page (below the code for bufrdump.F). |
| < | < | ||
| Line 7: | Line 7: | ||
| <code fortran bufrdump.F> | <code fortran bufrdump.F> | ||
| - | C (C) Copyright 2010, met.no | + | C (C) Copyright 2010-2016 MET Norway |
| C | C | ||
| C This program is free software; you can redistribute it and/or modify | C This program is free software; you can redistribute it and/or modify | ||
| Line 49: | Line 49: | ||
| C export BUFR_TABLES=/ | C export BUFR_TABLES=/ | ||
| C | C | ||
| - | C Author: P.Sannes | + | C Author: P.Sannes, MET Norway |
| Line 161: | Line 161: | ||
| INTEGER verbose | INTEGER verbose | ||
| + | LOGICAL metar ! Set to TRUE if metar (data subcategory 5) | ||
| + | | ||
| INTEGER kelem, | INTEGER kelem, | ||
| INTEGER kvals ! expected (max) number of data values | INTEGER kvals ! expected (max) number of data values | ||
| Line 208: | Line 209: | ||
| kerr = 0 | kerr = 0 | ||
| + | metar = .FALSE. | ||
| + | | ||
| C Do a partial expansion without quality control | C Do a partial expansion without quality control | ||
| kreq(1) = 1 ! All original elements without quality control | kreq(1) = 1 ! All original elements without quality control | ||
| Line 226: | Line 228: | ||
| C | C | ||
| - | C Using parameter kelem in call to BUFREX might be too big for | + | C Using parameter kelem in call to BUFREX might be too big for some |
| - | C | + | C |
| - | C in libbufr, first calling BUS012 in order to get number of subsets | + | C copied the method used in decode_bufr.F in libbufr, first calling |
| - | C ksup(6) | + | C BUS012 in order to get number of subsets ksup(6) |
| CALL BUS012(ilen, | CALL BUS012(ilen, | ||
| IF (kerr.NE.0) THEN | IF (kerr.NE.0) THEN | ||
| Line 238: | Line 240: | ||
| END IF | END IF | ||
| kxelem = kvals/ | kxelem = kvals/ | ||
| - | | + | C The second IF-condition is not in decode_bufr.F, |
| + | C | ||
| + | | ||
| CALL BUFREX (ilen, | CALL BUFREX (ilen, | ||
| Line 253: | Line 257: | ||
| | | ||
| - | C | + | C |
| C 0 = Surface data - land, 1 = Surface data - sea, 2 = Vertical | C 0 = Surface data - land, 1 = Surface data - sea, 2 = Vertical | ||
| C | C | ||
| - | C | + | C |
| - | IF (ksec1(6).GT.2 .AND. ksec1(6).NE.4 .AND. ksec1(6).NE.31) RETURN | + | IF (ksec1(6).GT.2 .AND. ksec1(6).NE.4 |
| + | | ||
| + | |||
| + | C MET (and perhaps also other ECMWF based software?) uses local | ||
| + | C | ||
| + | IF (KSEC1(2).EQ.3 .AND. KSEC1(6).EQ.0 .AND. KSEC1(7).EQ.5) THEN | ||
| + | metar = .TRUE. | ||
| + | END IF | ||
| IF (filter) THEN | IF (filter) THEN | ||
| Line 293: | Line 304: | ||
| IF (obstype.EQ.' | IF (obstype.EQ.' | ||
| CALL print_surface_values(ksub, | CALL print_surface_values(ksub, | ||
| - | | + | |
| ELSE IF (obstype(1: | ELSE IF (obstype(1: | ||
| CALL print_sounding_values(ksub, | CALL print_sounding_values(ksub, | ||
| Line 305: | Line 316: | ||
| ELSE IF (ksec1(6).LE.1) THEN | ELSE IF (ksec1(6).LE.1) THEN | ||
| CALL print_surface_values(ksub, | CALL print_surface_values(ksub, | ||
| - | | + | |
| ELSE IF (ksec1(6).EQ.2) THEN | ELSE IF (ksec1(6).EQ.2) THEN | ||
| CALL print_sounding_values(ksub, | CALL print_sounding_values(ksub, | ||
| Line 312: | Line 323: | ||
| CALL print_amdar_values(ksub, | CALL print_amdar_values(ksub, | ||
| | | ||
| + | ELSE IF (ksec1(6).EQ.6) THEN | ||
| + | CALL print_radar_profiler_values(ksub, | ||
| + | | ||
| ELSE IF (ksec1(6).EQ.31) THEN | ELSE IF (ksec1(6).EQ.31) THEN | ||
| CALL print_oceanographic_values(ksub, | CALL print_oceanographic_values(ksub, | ||
| Line 330: | Line 344: | ||
| IF (obstype.EQ.' | IF (obstype.EQ.' | ||
| CALL print_surface_values(ksub, | CALL print_surface_values(ksub, | ||
| - | | + | |
| ELSE IF (obstype(1: | ELSE IF (obstype(1: | ||
| CALL print_sounding_values(ksub, | CALL print_sounding_values(ksub, | ||
| Line 342: | Line 356: | ||
| ELSE IF (ksec1(6).LE.1) THEN | ELSE IF (ksec1(6).LE.1) THEN | ||
| CALL print_surface_values(ksub, | CALL print_surface_values(ksub, | ||
| - | | + | |
| ELSE IF (ksec1(6).EQ.2) THEN | ELSE IF (ksec1(6).EQ.2) THEN | ||
| CALL print_sounding_values(ksub, | CALL print_sounding_values(ksub, | ||
| Line 349: | Line 363: | ||
| CALL print_amdar_values(ksub, | CALL print_amdar_values(ksub, | ||
| | | ||
| + | ELSE IF (ksec1(6).EQ.6) THEN | ||
| + | CALL print_radar_profiler_values(ksub, | ||
| + | | ||
| ELSE IF (ksec1(6).EQ.31) THEN | ELSE IF (ksec1(6).EQ.31) THEN | ||
| C For ocea files at met.no data category is 31. But note that IOB | C For ocea files at met.no data category is 31. But note that IOB | ||
| Line 379: | Line 396: | ||
| CHARACTER(LEN=200) argument ! Buffer for next argument | CHARACTER(LEN=200) argument ! Buffer for next argument | ||
| CHARACTER(LEN=1350) Usage | CHARACTER(LEN=1350) Usage | ||
| - | CHARACTER(LEN=900) Help | + | CHARACTER(LEN=950) Help |
| INTEGER iargc,iarg | INTEGER iargc,iarg | ||
| Line 442: | Line 459: | ||
| | | ||
| | | ||
| + | | ||
| + | | ||
| | | ||
| | | ||
| Line 772: | Line 791: | ||
| END DO ! all data in subset | END DO ! all data in subset | ||
| IF (.NOT.match) ! there is one descriptor in condition which | IF (.NOT.match) ! there is one descriptor in condition which | ||
| - | | + | |
| ! value line | ! value line | ||
| END DO ! all descriptors in condition | END DO ! all descriptors in condition | ||
| Line 791: | Line 810: | ||
| C | C | ||
| - | C | + | C |
| - | C 7002 HEIGHT OR ALTITUDE | + | C ALTITUDE |
| - | C 7004 PRESSURE (10004 was used for pressure). Not able to handle | + | C used as vertical coordinate instead of 7004 PRESSURE (10004 was |
| - | C that in present code. | + | C used for pressure |
| + | C | ||
| SUBROUTINE print_sounding_values(ksub, | SUBROUTINE print_sounding_values(ksub, | ||
| | | ||
| Line 813: | Line 833: | ||
| REAL*8 II, | REAL*8 II, | ||
| - | | + | |
| + | CHARACTER*5 wigos_issuer, | ||
| CHARACTER*9 call_sign, | CHARACTER*9 call_sign, | ||
| + | CHARACTER*8 flight_number, | ||
| + | CHARACTER*16 wigos_localid, | ||
| + | |||
| CHARACTER one_bits | CHARACTER one_bits | ||
| REAL*8 value | REAL*8 value | ||
| - | INTEGER idx, | + | INTEGER idx, |
| - | PARAMETER(maxlevel=4000) | + | PARAMETER(maxlevel=100000) |
| REAL*8 P(maxlevel), | REAL*8 P(maxlevel), | ||
| Line 845: | Line 869: | ||
| one_bits = CHAR(255) | one_bits = CHAR(255) | ||
| - | WRITE(missing9,'(9A)') one_bits, | + | WRITE(missing5,'(5A)') one_bits, |
| - | | + | |
| + | WRITE(missing8,' | ||
| + | | ||
| + | missing9 = missing8 // one_bits | ||
| + | missing16 = missing8 // missing8 | ||
| vss_missing = ' | vss_missing = ' | ||
| C | C | ||
| call_sign = missing9 | call_sign = missing9 | ||
| + | flight_number = missing8 | ||
| + | wigos_issuer = missing5 | ||
| + | wigos_issueno = missing5 | ||
| + | wigos_localid = missing16 | ||
| + | wigos_series = rvind | ||
| II = rvind | II = rvind | ||
| iii= rvind | iii= rvind | ||
| Line 892: | Line 925: | ||
| ELSE IF (desc.EQ.1002) THEN ! WMO station number | ELSE IF (desc.EQ.1002) THEN ! WMO station number | ||
| iii = value | iii = value | ||
| - | ELSE IF (desc.EQ.1011) THEN | + | ELSE IF (desc.EQ.1011.OR. ! Ship or mobile |
| + | | ||
| cidx = int(value/ | cidx = int(value/ | ||
| | | ||
| | | ||
| + | ELSE IF (desc.EQ.1006) THEN ! Aircraft flight number, used for dropsondes | ||
| + | cidx = int(value/ | ||
| + | flight_number = cvals(cidx) ! CCITTIA5 data | ||
| + | flight_number = ctrim(flight_number, | ||
| + | ELSE IF (desc.EQ.1125) THEN ! WIGOS identifier series | ||
| + | wigos_series = value | ||
| + | ELSE IF (desc.EQ.1126) THEN ! WIGOS issuer of identifier | ||
| + | i = NINT(value) | ||
| + | WRITE(wigos_issuer,' | ||
| + | wigos_issuer = ADJUSTL(wigos_issuer) | ||
| + | ELSE IF (desc.EQ.1127) THEN ! WIGOS issue number | ||
| + | i = NINT(value) | ||
| + | WRITE(wigos_issueno,' | ||
| + | wigos_issueno = ADJUSTL(wigos_issueno) | ||
| + | ELSE IF (desc.EQ.1128) THEN ! WIGOS local identifier | ||
| + | cidx = int(value/ | ||
| + | wigos_localid = cvals(cidx) ! CCITTIA5 data | ||
| + | wigos_localid = ctrim(wigos_localid, | ||
| ELSE IF (desc.EQ.2001) THEN ! Type of station | ELSE IF (desc.EQ.2001) THEN ! Type of station | ||
| ix = value | ix = value | ||
| Line 917: | Line 969: | ||
| ELSE IF (desc.EQ.6002 .AND. longitude.EQ.rvind) THEN ! Longitude (coarse accuracy) | ELSE IF (desc.EQ.6002 .AND. longitude.EQ.rvind) THEN ! Longitude (coarse accuracy) | ||
| longitude = value | longitude = value | ||
| - | ELSE IF (desc.EQ.7001) THEN ! Height of station | + | ELSE IF (desc.EQ.7001.OR. ! Height of station |
| - | height = value | + | |
| - | ELSE IF (desc.EQ.4086.AND.n<maxlevel) THEN ! Long time period or displacement [second] | + | |
| + | | ||
| + | | ||
| + | height = value | ||
| + | END IF | ||
| + | ELSE IF (desc.EQ.4086.AND.n.LT.maxlevel) THEN ! Long time period or displacement [second] | ||
| C In WMO template (309052) descriptors 004086 and 008042 comes BEFORE 7004 pressure | C In WMO template (309052) descriptors 004086 and 008042 comes BEFORE 7004 pressure | ||
| tp(n+1) = value | tp(n+1) = value | ||
| - | ELSE IF (desc.EQ.8042.AND.n<maxlevel) THEN ! Extended vertical sounding significance | + | ELSE IF (desc.EQ.8042.AND.n.LT.maxlevel) THEN ! Extended vertical sounding significance |
| CALL vss_8042(NINT(value), | CALL vss_8042(NINT(value), | ||
| ELSE IF (desc.EQ.7004) THEN ! Pressure | ELSE IF (desc.EQ.7004) THEN ! Pressure | ||
| n = n + 1 ! new level | n = n + 1 ! new level | ||
| IF (n.GT.maxlevel) THEN | IF (n.GT.maxlevel) THEN | ||
| + | n = maxlevel | ||
| | | ||
| GOTO 110 | GOTO 110 | ||
| Line 972: | Line 1030: | ||
| END IF | END IF | ||
| - | WRITE(*,*) | + | |
| IF (II.NE.rvind .AND. iii.NE.rvind) THEN | IF (II.NE.rvind .AND. iii.NE.rvind) THEN | ||
| + | | ||
| | | ||
| + | ELSE IF (wigos_series.NE.rvind .AND. wigos_issuer.NE.missing5 | ||
| + | | ||
| + | | ||
| + | ind = index(wigos_issuer,' | ||
| + | IF (ind.EQ.-1) ind = 5 | ||
| + | ind2 = index(wigos_issueno,' | ||
| + | IF (ind2.EQ.-1) ind2 = 5 | ||
| + | ind3 = index(wigos_localid,' | ||
| + | IF (ind3.EQ.-1) ind3 = 16 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| ELSE IF (call_sign.NE.missing9) THEN | ELSE IF (call_sign.NE.missing9) THEN | ||
| + | | ||
| | | ||
| + | ELSE IF (flight_number.NE.missing8) THEN | ||
| + | | ||
| + | | ||
| + | | ||
| ELSE | ELSE | ||
| IF (verbose .GT. 1) THEN | IF (verbose .GT. 1) THEN | ||
| - | WRITE(*,*) 'Both wmonr and call sign are missing!!!' | + | |
| + | | ||
| + | | ||
| END IF | END IF | ||
| | | ||
| Line 1056: | Line 1137: | ||
| END SUBROUTINE print_sounding_values | END SUBROUTINE print_sounding_values | ||
| + | |||
| + | C | ||
| + | |||
| + | C | ||
| + | C | ||
| + | SUBROUTINE print_radar_profiler_values(ksub, | ||
| + | | ||
| + | IMPLICIT NONE | ||
| + | |||
| + | INTEGER ksub ! Input: number of subset currently processed | ||
| + | INTEGER kxelem | ||
| + | INTEGER ktdexl | ||
| + | INTEGER ktdexp(*) | ||
| + | REAL*8 values(*) | ||
| + | CHARACTER*80 cvals(*) | ||
| + | LOGICAL rectangle | ||
| + | INTEGER verbose | ||
| + | |||
| + | REAL*8 rvind ! missing value for real*8 data | ||
| + | PARAMETER (rvind=1.7E38) | ||
| + | |||
| + | REAL*8 II, | ||
| + | | ||
| + | CHARACTER*9 call_sign, | ||
| + | CHARACTER one_bits | ||
| + | REAL*8 value | ||
| + | INTEGER idx, | ||
| + | PARAMETER(maxlevel=1000) | ||
| + | |||
| + | REAL*8 HH(maxlevel), | ||
| + | | ||
| + | |||
| + | C | ||
| + | REAL*8 x1,y1,x2,y2 | ||
| + | COMMON / | ||
| + | |||
| + | C | ||
| + | INTEGER lenstr | ||
| + | CHARACTER*9 ctrim ! length must be >= longest variable ctrim is used for | ||
| + | |||
| + | one_bits = CHAR(255) | ||
| + | WRITE(missing9,' | ||
| + | | ||
| + | |||
| + | C | ||
| + | call_sign = missing9 | ||
| + | II = rvind | ||
| + | iii= rvind | ||
| + | year = rvind | ||
| + | month = rvind | ||
| + | day = rvind | ||
| + | hour = rvind | ||
| + | minute = rvind | ||
| + | latitude = rvind | ||
| + | longitude = rvind | ||
| + | height = rvind | ||
| + | DO n=1, | ||
| + | HH(n) = rvind | ||
| + | D(n) = rvind | ||
| + | F(n) = rvind | ||
| + | Q1(n) = rvind | ||
| + | WC(n) = rvind | ||
| + | Q2(n) = rvind | ||
| + | END DO | ||
| + | |||
| + | C Loop through all expanded descriptors | ||
| + | n = 0 ! Numbering the pressure levels | ||
| + | DO idx=1, | ||
| + | desc = ktdexp(idx) | ||
| + | value = values(idx + (ksub-1)*kxelem) | ||
| + | |||
| + | C | ||
| + | C | ||
| + | IF (ABS(value - rvind)/ | ||
| + | CYCLE | ||
| + | END IF | ||
| + | |||
| + | IF (desc.EQ.1001) THEN ! WMO block number | ||
| + | II = value | ||
| + | ELSE IF (desc.EQ.1002) THEN ! WMO station number | ||
| + | iii = value | ||
| + | ELSE IF (desc.EQ.1011.OR. | ||
| + | | ||
| + | cidx = int(value/ | ||
| + | | ||
| + | | ||
| + | ELSE IF (desc.EQ.2001) THEN ! Type of station | ||
| + | ix = value | ||
| + | ELSE IF (desc.EQ.4001) THEN ! Year | ||
| + | year = value | ||
| + | ELSE IF (desc.EQ.4002) THEN ! Month | ||
| + | month = value | ||
| + | ELSE IF (desc.EQ.4003) THEN ! Day | ||
| + | day = value | ||
| + | ELSE IF (desc.EQ.4004) THEN ! Hour | ||
| + | hour = value | ||
| + | ELSE IF (desc.EQ.4005) THEN ! Minute | ||
| + | minute = value | ||
| + | C Seen 5002 and 6002 used for each level in high resolution data | ||
| + | ELSE IF (desc.EQ.5001 .AND. latitude.EQ.rvind) THEN ! Latitude (high accuracy) | ||
| + | latitude = value | ||
| + | ELSE IF (desc.EQ.5002 .AND. latitude.EQ.rvind) THEN ! Latitude (coarse accuracy) | ||
| + | latitude = value | ||
| + | ELSE IF (desc.EQ.6001 .AND. longitude.EQ.rvind) THEN ! Longitude (high accuracy) | ||
| + | longitude = value | ||
| + | ELSE IF (desc.EQ.6002 .AND. longitude.EQ.rvind) THEN ! Longitude (coarse accuracy) | ||
| + | longitude = value | ||
| + | ELSE IF (desc.EQ.7001) THEN ! Height of station | ||
| + | IF (height.EQ.rvind) THEN | ||
| + | | ||
| + | END IF | ||
| + | ELSE IF (desc.EQ.7007) THEN ! Height | ||
| + | n = n + 1 ! new level | ||
| + | IF (n.GT.maxlevel) THEN | ||
| + | n = maxlevel | ||
| + | | ||
| + | GOTO 110 | ||
| + | END IF | ||
| + | HH(n) = value | ||
| + | C All following descriptors come after 7007 height | ||
| + | ELSE IF (n.GT.0 .AND. n.LE.maxlevel) THEN | ||
| + | IF (desc.EQ.11001) THEN ! Wind direction | ||
| + | D(n) = value | ||
| + | ELSE IF (desc.EQ.11002) THEN ! Wind speed | ||
| + | F(n) = value | ||
| + | ELSE IF (desc.EQ.11006) THEN ! W-component | ||
| + | WC(n) = value | ||
| + | ELSE IF (desc.EQ.33002) THEN ! Quality information, | ||
| + | IF (ktdexp(idx-1).EQ.11002) THEN | ||
| + | Q1(n) = value | ||
| + | ELSE | ||
| + | Q2(n) = value | ||
| + | END IF | ||
| + | END IF | ||
| + | END IF | ||
| + | END DO | ||
| + | | ||
| + | numlevels = n | ||
| + | |||
| + | IF (rectangle) THEN | ||
| + | IF (longitude.EQ.rvind .OR. latitude.EQ.rvind | ||
| + | | ||
| + | | ||
| + | END IF | ||
| + | |||
| + | IF (II.NE.rvind .AND. iii.NE.rvind) THEN | ||
| + | | ||
| + | | ||
| + | ELSE IF (call_sign.NE.missing9) THEN | ||
| + | | ||
| + | | ||
| + | ELSE | ||
| + | IF (verbose .GT. 1) THEN | ||
| + | WRITE(*,*) | ||
| + | WRITE(*,*) 'Both wmonr and call sign are missing!!!' | ||
| + | END IF | ||
| + | | ||
| + | END IF | ||
| + | |||
| + | IF (year.NE.rvind.AND.month.NE.rvind.AND.day.NE.rvind | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ELSE | ||
| + | IF (verbose .GT. 1) THEN | ||
| + | WRITE(*,*) ' | ||
| + | RETURN | ||
| + | END IF | ||
| + | ENDIF | ||
| + | IF (ix.NE.rvind) THEN | ||
| + | IF (NINT(ix).EQ.0) THEN | ||
| + | WRITE(*,' | ||
| + | ELSE IF (NINT(ix).EQ.1) THEN | ||
| + | WRITE(*,' | ||
| + | ELSE IF (NINT(ix).EQ.2) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | END IF | ||
| + | IF (latitude.NE.rvind) THEN | ||
| + | | ||
| + | END IF | ||
| + | IF (longitude.NE.rvind) THEN | ||
| + | | ||
| + | END IF | ||
| + | IF (height.NE.rvind) THEN | ||
| + | | ||
| + | END IF | ||
| + | |||
| + | DO n=1, | ||
| + | | ||
| + | IF (HH(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | IF (D(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | IF (F(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | IF (Q1(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | IF (WC(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | IF (Q2(n).NE.rvind) THEN | ||
| + | WRITE(*,' | ||
| + | END IF | ||
| + | END DO | ||
| + | |||
| + | END SUBROUTINE print_radar_profiler_values | ||
| C | C | ||
| SUBROUTINE print_surface_values(ksub, | SUBROUTINE print_surface_values(ksub, | ||
| - | | + | |
| C | C | ||
| IMPLICIT NONE | IMPLICIT NONE | ||
| Line 1071: | Line 1364: | ||
| CHARACTER*80 cvals(*) | CHARACTER*80 cvals(*) | ||
| LOGICAL rectangle | LOGICAL rectangle | ||
| + | LOGICAL metar ! Input: TRUE if metar (data subcategory 5) | ||
| INTEGER verbose | INTEGER verbose | ||
| Line 1076: | Line 1370: | ||
| PARAMETER (rvind=1.7E38) | PARAMETER (rvind=1.7E38) | ||
| - | CHARACTER*8 icao_id, | + | |
| - | CHARACTER*9 call_sign, | + | |
| - | CHARACTER*20 name, | + | CHARACTER*9 call_sign, |
| - | CHARACTER*32 long_name, | + | CHARACTER*16 wigos_localid,missing16 |
| + | CHARACTER*20 name, | ||
| + | CHARACTER*32 long_name, | ||
| C | C | ||
| REAL*8 AA, | REAL*8 AA, | ||
| Line 1088: | Line 1384: | ||
| | | ||
| C Other parameters | C Other parameters | ||
| - | | + | |
| - | | + | |
| | | ||
| - | | + | |
| + | | ||
| REAL*8 vert_sign(4), | REAL*8 vert_sign(4), | ||
| INTEGER idx,cidx | INTEGER idx,cidx | ||
| INTEGER cloud_type_count | INTEGER cloud_type_count | ||
| - | ! (cloud type) encountered (0 initially) | + | ! (cloud type) encountered (0 initially). |
| - | INTEGER num_cloud_layers | + | ! Not used for metar |
| - | ! set to value of 031001 (delayed | + | INTEGER num_cloud_layers |
| - | ! descriptor) if this is met immediately | + | ! to value of 031001 (delayed |
| - | ! after a 020012 descriptor (-1 initially) | + | ! replication factor) if this is met immediately |
| + | ! after a 020012 descriptor (-1 initially). | ||
| + | ! For metar num_cloud_layers is increased | ||
| + | ! by one for each new 020011 | ||
| LOGICAL bad_cloud_data | LOGICAL bad_cloud_data | ||
| ! found in cloud data. No more cloud | ! found in cloud data. No more cloud | ||
| Line 1107: | Line 1407: | ||
| ! surface' | ! surface' | ||
| ! from 0 | ! from 0 | ||
| + | LOGICAL time_of_last_position ! Set to true if 008021 time significance is | ||
| + | ! included with value 26 | ||
| CHARACTER one_bits | CHARACTER one_bits | ||
| REAL*8 value | REAL*8 value | ||
| - | INTEGER desc, | + | INTEGER desc, |
| INTEGER degree2dir, | INTEGER degree2dir, | ||
| Line 1122: | Line 1424: | ||
| one_bits = CHAR(255) | one_bits = CHAR(255) | ||
| + | WRITE(missing5,' | ||
| + | | ||
| WRITE(missing8,' | WRITE(missing8,' | ||
| | | ||
| missing9 = missing8 // one_bits | missing9 = missing8 // one_bits | ||
| + | missing16 = missing8 // missing8 | ||
| missing20 = missing9 // missing9 // one_bits // one_bits | missing20 = missing9 // missing9 // one_bits // one_bits | ||
| - | missing32 = missing20 | + | missing32 = missing16 |
| - | | + | |
| - | spc8 = ' | + | |
| - | spc9 = ' | + | |
| - | spc20 = ' | + | |
| - | spc32 = ' | + | |
| cloud_type_count = 0 | cloud_type_count = 0 | ||
| Line 1137: | Line 1437: | ||
| num_cloud_layers = -1 | num_cloud_layers = -1 | ||
| surface_data = .TRUE. | surface_data = .TRUE. | ||
| + | time_of_last_position = .FALSE. | ||
| C | C | ||
| Line 1143: | Line 1444: | ||
| icao_id = missing8 | icao_id = missing8 | ||
| call_sign = missing9 | call_sign = missing9 | ||
| + | wigos_issuer = missing5 | ||
| + | wigos_issueno = missing5 | ||
| + | wigos_localid = missing16 | ||
| name = missing20 | name = missing20 | ||
| long_name = missing32 | long_name = missing32 | ||
| Line 1234: | Line 1538: | ||
| longitude = rvind | longitude = rvind | ||
| height = rvind | height = rvind | ||
| + | hp = rvind | ||
| vert_sign_first = rvind | vert_sign_first = rvind | ||
| II = rvind | II = rvind | ||
| Line 1243: | Line 1548: | ||
| vs = rvind | vs = rvind | ||
| TbTbTb = rvind | TbTbTb = rvind | ||
| - | | + | |
| + | buoy_id7 | ||
| wmo_region_number = rvind | wmo_region_number = rvind | ||
| wmo_region_subarea = rvind | wmo_region_subarea = rvind | ||
| state_id = rvind | state_id = rvind | ||
| national_number = rvind | national_number = rvind | ||
| + | wigos_series = rvind | ||
| DO i=1,4 | DO i=1,4 | ||
| Line 1300: | Line 1607: | ||
| ELSE IF (desc.EQ.4025) THEN ! Time period or displacement [minute] | ELSE IF (desc.EQ.4025) THEN ! Time period or displacement [minute] | ||
| minute_p = value | minute_p = value | ||
| + | ELSE IF (desc.EQ.8021) THEN ! Time significance | ||
| + | IF (NINT(value).EQ.26) THEN | ||
| + | | ||
| + | ELSE | ||
| + | | ||
| + | END IF | ||
| ELSE IF (desc.EQ.1001 .AND. II.EQ.rvind) THEN ! WMO block number | ELSE IF (desc.EQ.1001 .AND. II.EQ.rvind) THEN ! WMO block number | ||
| - | II = value | + | |
| ELSE IF (desc.EQ.1002 .AND. iii.EQ.rvind) THEN ! WMO station number | ELSE IF (desc.EQ.1002 .AND. iii.EQ.rvind) THEN ! WMO station number | ||
| - | iii = value | + | |
| ELSE IF (desc.EQ.1101 .AND. state_id.EQ.rvind) THEN ! WMO member state identifier | ELSE IF (desc.EQ.1101 .AND. state_id.EQ.rvind) THEN ! WMO member state identifier | ||
| - | state_id = value | + | |
| ELSE IF (desc.EQ.1102 .AND. national_number.EQ.rvind) THEN ! National station number | ELSE IF (desc.EQ.1102 .AND. national_number.EQ.rvind) THEN ! National station number | ||
| - | national_number = value | + | |
| ELSE IF (desc.EQ.1015) THEN ! Station or site name | ELSE IF (desc.EQ.1015) THEN ! Station or site name | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | | + | name = cvals(cidx) |
| - | name = cvals(cidx) ! CCITTIA5 data | + | name = ctrim(name, |
| - | | + | |
| - | END IF | + | |
| ELSE IF (desc.EQ.1019) THEN ! Long station or site name | ELSE IF (desc.EQ.1019) THEN ! Long station or site name | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | | + | |
| - | long_name | + | long_name = ctrim(long_name, |
| - | long_name | + | ELSE IF (desc.EQ.1125) THEN ! WIGOS identifier series |
| - | END IF | + | |
| + | ELSE IF (desc.EQ.1126) THEN ! WIGOS issuer of identifier | ||
| + | i = NINT(value) | ||
| + | WRITE(wigos_issuer,' | ||
| + | wigos_issuer = ADJUSTL(wigos_issuer) | ||
| + | ELSE IF (desc.EQ.1127) THEN ! WIGOS issue number | ||
| + | i = NINT(value) | ||
| + | WRITE(wigos_issueno,' | ||
| + | wigos_issueno = ADJUSTL(wigos_issueno) | ||
| + | ELSE IF (desc.EQ.1128) THEN ! WIGOS local identifier | ||
| + | cidx = int(value/ | ||
| + | wigos_localid | ||
| + | | ||
| ELSE IF (desc.EQ.2001) THEN ! Type of station | ELSE IF (desc.EQ.2001) THEN ! Type of station | ||
| IF (ix.EQ.rvind) THEN | IF (ix.EQ.rvind) THEN | ||
| Line 1325: | Line 1648: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.4001) THEN ! Year | ELSE IF (desc.EQ.4001) THEN ! Year | ||
| - | IF (year.EQ.rvind) THEN | + | IF (year.EQ.rvind.AND..NOT.time_of_last_position) THEN |
| year = value | year = value | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.4002) THEN ! Month | ELSE IF (desc.EQ.4002) THEN ! Month | ||
| - | IF (month.EQ.rvind) THEN | + | IF (month.EQ.rvind.AND..NOT.time_of_last_position) THEN |
| month = value | month = value | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.4003) THEN ! Day | ELSE IF (desc.EQ.4003) THEN ! Day | ||
| - | IF (day.EQ.rvind) THEN | + | IF (day.EQ.rvind.AND..NOT.time_of_last_position) THEN |
| day = value | day = value | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.4004) THEN ! Hour | ELSE IF (desc.EQ.4004) THEN ! Hour | ||
| - | IF (hour.EQ.rvind) THEN | + | IF (hour.EQ.rvind.AND..NOT.time_of_last_position) THEN |
| hour = value | hour = value | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.4005) THEN ! Minute | ELSE IF (desc.EQ.4005) THEN ! Minute | ||
| - | IF (minute.EQ.rvind) THEN | + | IF (minute.EQ.rvind.AND..NOT.time_of_last_position) THEN |
| | | ||
| END IF | END IF | ||
| Line 1358: | Line 1681: | ||
| IF (height.EQ.rvind) THEN | IF (height.EQ.rvind) THEN | ||
| | | ||
| + | END IF | ||
| + | ELSE IF (desc.EQ.7031) THEN ! Hp | ||
| + | IF (hp.EQ.rvind) THEN | ||
| + | hp = value | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.10004) THEN ! Pressure | ELSE IF (desc.EQ.10004) THEN ! Pressure | ||
| Line 1526: | Line 1853: | ||
| C | C | ||
| C type, according to all WMO recommended templates | C type, according to all WMO recommended templates | ||
| + | C (but DNMI metar is an exception!) | ||
| IF (ktdexp(idx - 1).EQ.20012) THEN | IF (ktdexp(idx - 1).EQ.20012) THEN | ||
| IF (NINT(value).LE.4) THEN | IF (NINT(value).LE.4) THEN | ||
| Line 1553: | Line 1881: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.20011 .AND. .NOT.bad_cloud_data) THEN ! Cloud amount | ELSE IF (desc.EQ.20011 .AND. .NOT.bad_cloud_data) THEN ! Cloud amount | ||
| - | IF (cloud_type_count.EQ.0) THEN ! First occurrence | + | |
| + | IF (num_cloud_layers.GT.-1) THEN | ||
| + | num_cloud_layers = num_cloud_layers + 1 | ||
| + | | ||
| + | num_cloud_layers = 1 | ||
| + | END IF | ||
| + | | ||
| + | ELSE IF (cloud_type_count.EQ.0) THEN ! First occurrence | ||
| IF (NH.EQ.rvind) THEN | IF (NH.EQ.rvind) THEN | ||
| NH = value | NH = value | ||
| Line 1572: | Line 1907: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.20012 .AND. .NOT.bad_cloud_data) THEN ! Cloud type | ELSE IF (desc.EQ.20012 .AND. .NOT.bad_cloud_data) THEN ! Cloud type | ||
| - | cloud_type_count = cloud_type_count + 1 | + | |
| - | IF (cloud_type_count.GT.3) THEN | + | |
| - | | + | ELSE |
| - | | + | cloud_type_count = cloud_type_count + 1 |
| - | IF (value < 10.0 ! Accept one digit values only | + | |
| - | | + | cloud_layer = cloud_type_count - 3 |
| + | IF (num_cloud_layers .GT.-1) THEN | ||
| + | | ||
| + | | ||
| + | CC(cloud_layer) = value | ||
| + | END IF | ||
| + | ELSE IF (cloud_layer.LT.5) THEN ! rdb-files always have 0 or 4 cloud layers | ||
| | | ||
| END IF | END IF | ||
| - | | + | |
| - | | + | IF (cloud_type_count.EQ.1) THEN |
| - | END IF | + | |
| - | ELSE | + | CL = value |
| - | IF (cloud_type_count.EQ.1) THEN | + | |
| - | IF (CL.EQ.rvind) THEN | + | ELSE IF (cloud_type_count.EQ.2) THEN |
| - | | + | |
| - | END IF | + | CM = value |
| - | | + | |
| - | IF (CM.EQ.rvind) THEN | + | ELSE IF (cloud_type_count.EQ.3) THEN |
| - | | + | |
| - | END IF | + | CH = value |
| - | | + | END IF |
| - | IF (CH.EQ.rvind) THEN | + | |
| - | | + | |
| END IF | END IF | ||
| END IF | END IF | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.20013 .AND. .NOT.bad_cloud_data) THEN ! Height of base of cloud | ELSE IF (desc.EQ.20013 .AND. .NOT.bad_cloud_data) THEN ! Height of base of cloud | ||
| - | IF (cloud_type_count.EQ.0) THEN ! First occurrence | + | |
| + | | ||
| + | ELSE IF (cloud_type_count.EQ.0) THEN ! First occurrence | ||
| IF (HL.EQ.rvind) THEN | IF (HL.EQ.rvind) THEN | ||
| HL = value | HL = value | ||
| Line 1757: | Line 2098: | ||
| ELSE IF (desc.EQ.1011) THEN ! Ship or mobile land station identifier | ELSE IF (desc.EQ.1011) THEN ! Ship or mobile land station identifier | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | IF (cvals(cidx).NE.spc9) THEN | + | IF (cidx.GT.0) THEN |
| | | ||
| | | ||
| Line 1779: | Line 2120: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.22043.OR. | ELSE IF (desc.EQ.22043.OR. | ||
| - | | + | |
| + | | ||
| IF (TW.EQ.rvind .AND. surface_data)THEN | IF (TW.EQ.rvind .AND. surface_data)THEN | ||
| TW = value | TW = value | ||
| Line 1859: | Line 2201: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.1005) THEN ! Buoy/ | ELSE IF (desc.EQ.1005) THEN ! Buoy/ | ||
| - | IF (buoy_id.EQ.rvind) THEN | + | IF (buoy_id5.EQ.rvind) THEN |
| - | buoy_id | + | buoy_id5 |
| END IF | END IF | ||
| ELSE IF (desc.EQ.1003) THEN ! WMO region number/ | ELSE IF (desc.EQ.1003) THEN ! WMO region number/ | ||
| Line 1871: | Line 2213: | ||
| END IF | END IF | ||
| ELSE IF (desc.EQ.1087) THEN ! WMO Marine observing platform extended identifier | ELSE IF (desc.EQ.1087) THEN ! WMO Marine observing platform extended identifier | ||
| - | IF (buoy_id.EQ.rvind) THEN | + | IF (buoy_id7.EQ.rvind) THEN |
| - | buoy_id | + | buoy_id7 |
| END IF | END IF | ||
| C | C | ||
| ELSE IF (desc.EQ.1063) THEN ! ICAO location indicator | ELSE IF (desc.EQ.1063) THEN ! ICAO location indicator | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | | + | icao_id = cvals(cidx) ! CCITTIA5 data |
| - | icao_id = cvals(cidx) ! CCITTIA5 data | + | icao_id = ctrim(icao_id, |
| - | | + | |
| - | END IF | + | |
| ELSE IF (desc.EQ.10052) THEN ! Altimeter setting (QNH) | ELSE IF (desc.EQ.10052) THEN ! Altimeter setting (QNH) | ||
| IF (PH.EQ.rvind) THEN | IF (PH.EQ.rvind) THEN | ||
| Line 1894: | Line 2234: | ||
| END IF | END IF | ||
| - | WRITE(*,*) | ||
| IF (II.NE.rvind .AND. iii.NE.rvind) THEN | IF (II.NE.rvind .AND. iii.NE.rvind) THEN | ||
| + | | ||
| | | ||
| + | ELSE IF (wigos_series.NE.rvind .AND. wigos_issuer.NE.missing5 | ||
| + | | ||
| + | | ||
| + | ind = index(wigos_issuer,' | ||
| + | IF (ind.EQ.-1) ind = 5 | ||
| + | ind2 = index(wigos_issueno,' | ||
| + | IF (ind2.EQ.-1) ind2 = 5 | ||
| + | ind3 = index(wigos_localid,' | ||
| + | IF (ind3.EQ.-1) ind3 = 16 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| ELSE IF (state_id.NE.rvind .AND. national_number.NE.rvind) THEN | ELSE IF (state_id.NE.rvind .AND. national_number.NE.rvind) THEN | ||
| + | | ||
| | | ||
| | | ||
| Line 1908: | Line 2264: | ||
| ind = ind - 1 | ind = ind - 1 | ||
| END DO | END DO | ||
| + | | ||
| | | ||
| | | ||
| - | ELSE IF (buoy_id.NE.rvind.AND.wmo_region_number.NE.rvind | + | ELSE IF (buoy_id7.NE.rvind) THEN |
| + | C New templates introduced in 2014 for data category 1 use 001087 | ||
| + | C WMO Marine observing platform extended identifier, 7 digits | ||
| + | | ||
| + | | ||
| + | ELSE IF (buoy_id5.NE.rvind) THEN | ||
| + | | ||
| + | IF (wmo_region_number.EQ.rvind | ||
| + | | ||
| + | C Old drau files (wrongly) includes | ||
| + | C | ||
| + | C | ||
| + | WRITE(*,' | ||
| + | ELSE IF (wmo_region_number.EQ.rvind | ||
| | | ||
| - | IF (buoy_id.LT.1000) THEN | + | C Some BUFR BUOYS on GTS have ' |
| - | WRITE(*,' | + | C but not for wmo_region_subarea |
| - | | + | WRITE(*,' |
| - | ELSE | + | |
| - | C | + | |
| - | C in all cases I have seen of this error, first 2 digits of buoy_id | + | + |
| - | C is wmo_region_number and wmo_region_subarea respectively). | + | C Not easy to know how to display this case, but then I have never |
| - | | + | C seen this in practice |
| - | WRITE(*,' | + | WRITE(*,' |
| - | ELSE IF (buoy_id.LT.100000) THEN | + | |
| - | WRITE(*,'(A,I5)') ' | + | + (NINT(buoy_id5) - MOD(NINT(buoy_id5), |
| - | ELSE IF (buoy_id.LT.1000000) THEN | + | + NINT(wmo_region_number)*10000 |
| - | WRITE(*,'(A,I6)') 'buoy_id=',NINT(buoy_id) | + | |
| - | ELSE | + | C If first 2 digits of 5 digit buoy_id |
| - | | + | C |
| - | END IF | + | C |
| - | END IF | + | |
| - | ELSE IF (buoy_id.NE.rvind.AND.buoy_id.GT.1000) THEN | + | + + NINT(wmo_region_subarea)*100000 |
| - | C | + | + + MOD(NINT(buoy_id5),1000) |
| - | C | + | |
| - | | + | |
| - | WRITE(*,' | + | |
| ELSE | ELSE | ||
| - | C New templates introduced in 2014 for data category 1 use 001087 | + | |
| - | C WMO Marine observing platform extended identifier, 7 digits | + | |
| - | | + | |
| END IF | END IF | ||
| ELSE | ELSE | ||
| IF (verbose .GT. 1) THEN | IF (verbose .GT. 1) THEN | ||
| - | WRITE(*,*) 'Both wmonr, nationalnr, call_sign | + | |
| - | | + | |
| + | | ||
| C | C | ||
| C | C | ||
| Line 1987: | Line 2354: | ||
| ! so display as integer | ! so display as integer | ||
| | | ||
| + | END IF | ||
| + | IF (hp.NE.rvind) THEN | ||
| + | | ||
| END IF | END IF | ||
| IF (vs.NE.rvind) THEN | IF (vs.NE.rvind) THEN | ||
| Line 2408: | Line 2778: | ||
| n = n + 1 ! new level | n = n + 1 ! new level | ||
| IF (n.GT.maxlevel) THEN | IF (n.GT.maxlevel) THEN | ||
| + | n = maxlevel | ||
| | | ||
| GOTO 120 | GOTO 120 | ||
| Line 2415: | Line 2786: | ||
| n = n + 1 ! new level | n = n + 1 ! new level | ||
| IF (n.GT.maxlevel) THEN | IF (n.GT.maxlevel) THEN | ||
| + | n = maxlevel | ||
| | | ||
| GOTO 120 | GOTO 120 | ||
| Line 2420: | Line 2792: | ||
| w(n) = value | w(n) = value | ||
| ELSE IF (desc.EQ.22045.OR. | ELSE IF (desc.EQ.22045.OR. | ||
| - | | + | |
| - | | + | |
| IF (n.GT.0 .AND. n.LE.maxlevel) THEN | IF (n.GT.0 .AND. n.LE.maxlevel) THEN | ||
| t(n) = value | t(n) = value | ||
| Line 2493: | Line 2865: | ||
| END IF | END IF | ||
| - | WRITE(*,*) | ||
| IF (buoy_id.NE.rvind.AND.wmo_region_number.NE.rvind | IF (buoy_id.NE.rvind.AND.wmo_region_number.NE.rvind | ||
| | | ||
| + | | ||
| IF (buoy_id.LT.1000) THEN | IF (buoy_id.LT.1000) THEN | ||
| WRITE(*,' | WRITE(*,' | ||
| | | ||
| - | | + | ELSE |
| C This is an error in encoding. We choose to show buoy_id only (and | C This is an error in encoding. We choose to show buoy_id only (and | ||
| C in all cases I have seen of this error, first 2 digits of buoy_id | C in all cases I have seen of this error, first 2 digits of buoy_id | ||
| Line 2516: | Line 2888: | ||
| C Old drau files (wrongly) includes wmo_region_number and | C Old drau files (wrongly) includes wmo_region_number and | ||
| C | C | ||
| + | | ||
| IF (buoy_id.LT.10000) THEN ! 001005 | IF (buoy_id.LT.10000) THEN ! 001005 | ||
| WRITE(*,' | WRITE(*,' | ||
| Line 2529: | Line 2902: | ||
| ind = ind - 1 | ind = ind - 1 | ||
| END DO | END DO | ||
| + | | ||
| | | ||
| | | ||
| ELSE | ELSE | ||
| IF (verbose .GT. 1) THEN | IF (verbose .GT. 1) THEN | ||
| + | WRITE(*,*) | ||
| WRITE(*,*) 'Both buoy_id and call_sign are missing!!!' | WRITE(*,*) 'Both buoy_id and call_sign are missing!!!' | ||
| END IF | END IF | ||
| Line 2620: | Line 2995: | ||
| PARAMETER (rvind=1.7E38) | PARAMETER (rvind=1.7E38) | ||
| - | CHARACTER*8 aircraft, | + | CHARACTER*8 aircraft, |
| C | C | ||
| REAL*8 DD, | REAL*8 DD, | ||
| C Other parameters | C Other parameters | ||
| | | ||
| - | | + | |
| CHARACTER*3 cphase, | CHARACTER*3 cphase, | ||
| INTEGER idx, | INTEGER idx, | ||
| Line 2646: | Line 3021: | ||
| WRITE(missing8,' | WRITE(missing8,' | ||
| | | ||
| - | spc8 = ' | ||
| C | C | ||
| Line 2667: | Line 3041: | ||
| flight_level = rvind | flight_level = rvind | ||
| phase = rvind | phase = rvind | ||
| + | mixing_ratio = rvind | ||
| C Loop through all expanded descriptors | C Loop through all expanded descriptors | ||
| Line 2681: | Line 3056: | ||
| IF (desc.EQ.1008) THEN ! Aircraft registration number or other identification | IF (desc.EQ.1008) THEN ! Aircraft registration number or other identification | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | | + | aircraft = cvals(cidx) ! CCITTIA5 data |
| - | aircraft = cvals(cidx) ! CCITTIA5 data | + | aircraft = ctrim(aircraft, |
| - | | + | |
| - | END IF | + | |
| ELSE IF (desc.EQ.1006) THEN ! Aircraft flight number | ELSE IF (desc.EQ.1006) THEN ! Aircraft flight number | ||
| cidx = int(value/ | cidx = int(value/ | ||
| - | | + | flight_number = cvals(cidx) ! CCITTIA5 data |
| - | flight_number = cvals(cidx) ! CCITTIA5 data | + | flight_number = ctrim(flight_number, |
| - | | + | |
| - | END IF | + | |
| ELSE IF (desc.EQ.1023) THEN ! Observation sequence number | ELSE IF (desc.EQ.1023) THEN ! Observation sequence number | ||
| IF (osn.EQ.rvind) osn = value | IF (osn.EQ.rvind) osn = value | ||
| Line 2764: | Line 3135: | ||
| IF (PP.EQ.rvind) THEN | IF (PP.EQ.rvind) THEN | ||
| PP = value | PP = value | ||
| + | END IF | ||
| + | ELSE IF (desc.EQ.13002) THEN ! Mixing ratio | ||
| + | IF (mixing_ratio.EQ.rvind) THEN | ||
| + | | ||
| END IF | END IF | ||
| END IF | END IF | ||
| Line 2774: | Line 3149: | ||
| END IF | END IF | ||
| - | WRITE(*,*) | ||
| IF (aircraft.NE.missing8) THEN | IF (aircraft.NE.missing8) THEN | ||
| + | | ||
| | | ||
| ELSE IF (flight_number.NE.missing8) THEN | ELSE IF (flight_number.NE.missing8) THEN | ||
| + | | ||
| | | ||
| | | ||
| ELSE | ELSE | ||
| IF (verbose .GT. 1) THEN | IF (verbose .GT. 1) THEN | ||
| + | WRITE(*,*) | ||
| WRITE(*,*) ' | WRITE(*,*) ' | ||
| END IF | END IF | ||
| Line 2828: | Line 3205: | ||
| END IF | END IF | ||
| IF (PP.NE.rvind) THEN | IF (PP.NE.rvind) THEN | ||
| - | | + | |
| + | END IF | ||
| + | IF (mixing_ratio.NE.rvind) THEN | ||
| + | | ||
| END IF | END IF | ||
| Line 3114: | Line 3494: | ||
| return | return | ||
| end | end | ||
| - | </ | + | </ |
| <code fortran comfilter.f> | <code fortran comfilter.f> | ||
| C (C) Copyright 2010, met.no | C (C) Copyright 2010, met.no | ||