[Dart-dev] [4346] DART/trunk/observations/NCEP/prep_bufr/src: When skipping an observation for any reason the code has to
nancy at ucar.edu
nancy at ucar.edu
Thu Apr 8 15:49:55 MDT 2010
Revision: 4346
Author: nancy
Date: 2010-04-08 15:49:55 -0600 (Thu, 08 Apr 2010)
Log Message:
-----------
When skipping an observation for any reason the code has to
goto 200 (the bottom of the loop) and not directly back to 10
(the top of the loop) or it might read past the end of the
input file and crash in the prepbufr libs.
Also wrapped 2 lines that were longer than 72 chars. these
are fixed-format files and without extra flags to extend the
input line length, with at least one compiler characters
beyond column 72 were silently ignored. in both cases it
was a debug print message that isn't called unless you
turn a local debugging variable on. what was annoying was
that what was being ignored was the value of interest it
was supposet to be printing.
Modified Paths:
--------------
DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f
DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f
-------------- next part --------------
Modified: DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f
===================================================================
--- DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f 2010-04-08 21:30:16 UTC (rev 4345)
+++ DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f 2010-04-08 21:49:55 UTC (rev 4346)
@@ -145,7 +145,8 @@
c----------------------------------------------------------------------
if ( obs_window > 0.0 ) then
- print*, "Using the same observation window for all data: ",obs_window
+ print*, "Using the same observation window for all data: ",
+ & obs_window
obs_window_upa = obs_window
obs_window_air = obs_window
obs_window_sfc = obs_window
@@ -224,34 +225,34 @@
IF ( ( .not. found ) .and. ( ierrpb .eq. 0 ) ) THEN
if ( debug ) print*, 'record found w/no label match, val was: ',
& subset(1:6)
- GO TO 10
+ GO TO 200
ENDIF
IF ( subset(1:6).eq.'SATWND' ) then
IF ( abs(time0) .gt. obs_window_cw ) then
if (debug) print*, 'satwnd outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF ( subset(1:6).eq.'ADPUPA' ) THEN
IF ( abs(time0) .gt. obs_window_upa ) THEN
if ( debug ) print*,
& 'upper-air outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF (subset(1:6).eq.'AIRCFT'.or.subset(1:6).eq.'AIRCAR') THEN
IF ( abs(time0) .gt. obs_window_air ) THEN
if ( debug ) print*,
& 'aircraft outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF (subset(1:6).eq.'ADPSFC'.or.subset(1:6).eq.'SFCSHP') THEN
IF ( abs(time0) .gt. obs_window_sfc ) THEN
if ( debug ) print*,
& 'surface outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ENDIF
@@ -309,8 +310,9 @@
c check to see if this observation type is desired
if ( .NOT. USE_THIS_DATA_REAL(real(hdr(6)),otype_use,inum_otype)
& ) then
- if ( debug ) print *, 'this obs type not in use-list, num was: ', hdr(6)
- GO TO 10
+ if (debug) print *, 'this obs type not in use-list, num was: ',
+ & hdr(6)
+ GO TO 200
endif
DO lv = 1, nlev ! loop over all levels in the report
Modified: DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f
===================================================================
--- DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f 2010-04-08 21:30:16 UTC (rev 4345)
+++ DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f 2010-04-08 21:49:55 UTC (rev 4346)
@@ -145,7 +145,8 @@
c----------------------------------------------------------------------
if ( obs_window > 0.0 ) then
- print*, "Using the same observation window for all data: ",obs_window
+ print*, "Using the same observation window for all data: ",
+ & obs_window
obs_window_upa = obs_window
obs_window_air = obs_window
obs_window_sfc = obs_window
@@ -224,34 +225,34 @@
IF ( ( .not. found ) .and. ( ierrpb .eq. 0 ) ) THEN
if ( debug ) print*, 'record found w/no label match, val was: ',
& subset(1:6)
- GO TO 10
+ GO TO 200
ENDIF
IF ( subset(1:6).eq.'SATWND' ) then
IF ( hour01 .gt. obs_window_cw ) then
if (debug) print*, 'satwnd outside time window, diff was: ',
& hour01
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF ( subset(1:6).eq.'ADPUPA' ) THEN
IF ( hour01 .gt. obs_window_upa ) THEN
if ( debug ) print*,
& 'upper-air outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF (subset(1:6).eq.'AIRCFT'.or.subset(1:6).eq.'AIRCAR') THEN
IF ( hour01 .gt. obs_window_air ) THEN
if ( debug ) print*,
& 'aircraft outside time window, diff was: ',
& abs(time0)
- GO TO 10
+ GO TO 200
ENDIF
ELSE IF (subset(1:6).eq.'ADPSFC'.or.subset(1:6).eq.'SFCSHP') THEN
IF ( hour01 .gt. obs_window_sfc ) THEN
if ( debug ) print*,
& 'surface outside time window, diff was: ',
& hour01
- GO TO 10
+ GO TO 200
ENDIF
ENDIF
@@ -309,8 +310,9 @@
c check to see if this observation type is desired
if ( .NOT. USE_THIS_DATA_REAL(real(hdr(6)),otype_use,inum_otype)
& ) then
- if ( debug ) print *, 'this obs type not in use-list, num was: ', hdr(6)
- GO TO 10
+ if (debug) print *, 'this obs type not in use-list, num was: ',
+ & hdr(6)
+ GO TO 200
endif
DO lv = 1, nlev ! loop over all levels in the report
More information about the Dart-dev
mailing list