[Dart-dev] [4330] DART/trunk/observations/NCEP/prep_bufr: Updates from Ryan Torn; the obs_window setting applies to all types

nancy at ucar.edu nancy at ucar.edu
Mon Mar 29 10:25:50 MDT 2010


Revision: 4330
Author:   nancy
Date:     2010-03-29 10:25:50 -0600 (Mon, 29 Mar 2010)
Log Message:
-----------
Updates from Ryan Torn; the obs_window setting applies to all types
if set.  Otherwise, there are windows per observation type if you
want to restrict the obs to closer to the analysis time.

Modified Paths:
--------------
    DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f
    DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f
    DART/trunk/observations/NCEP/prep_bufr/work/input.nml

-------------- next part --------------
Modified: DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f
===================================================================
--- DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f	2010-03-26 22:05:59 UTC (rev 4329)
+++ DART/trunk/observations/NCEP/prep_bufr/src/prepbufr.f	2010-03-29 16:25:50 UTC (rev 4330)
@@ -1,6 +1,8 @@
 c    This is the 5th version of the BUFR preparation program for the
 c    newly revised DART version. Ps and moisture obs are outputed as well.
 c     
+c    12/2009 added additional time window flavors, specified all of the variable
+c    types. 
 c    A bug with the radiosonde T events selection j2 is fixed at 04/06/2005.
 c    and surface data is included in this version.
 c    For radiosonde T: T of Pc=1 and 6 is dry T; T of pc=8 is virtual T.
@@ -71,7 +73,7 @@
 c    was done on this observation.  As of now, these are unused, but could
 c    be used for selection or diagnosis.
       integer :: pc_t, pc_q, pc_u, pc_v, pc_p 
-      integer :: tqm, pqm, qqm, uqm, vqm, qctype_use(max_otype)
+      integer :: tqm, pqm, qqm, uqm, vqm
       logical :: found, uotype, uqcflag, use_this_data_real, 
      +           use_this_data_int, processed
       logical :: debug = .false.
@@ -79,14 +81,21 @@
 c    Namelist Parameters
 c----------------------------------------------------------------------
 
-      real :: otype_use(max_otype),    ! report types to use
-     +        obs_window = 0.8,        ! observation time window (hours)
-     +        obs_window_cw = 1.5,     ! cloud wind obs time window (hours)
-     +        land_temp_error = 2.5,   ! assumed err surface temp. obs (K)
-     +        land_wind_error = 3.5,   ! assumed err surface wind obs (m/s)
-     +        land_moist_error = 0.2   ! assumed err surface moist. obs (%)
+      integer :: qctype_use(max_otype)  ! qc values to accept (default all)
+      real :: otype_use(max_otype),     ! report types to use (default all)
+     +        obs_window       = 1.5,   ! observation time window (+/-hours)
+     +        obs_window_upa   = 1.5,   ! sonde time window (+/-hours)
+     +        obs_window_air   = 1.5,   ! aircraft obs time window (+/-hours)
+     +        obs_window_sfc   = 0.8,   ! surface obs time window (+/-hours)
+     +        obs_window_cw    = 1.5,   ! cloud wind obs time window (+/-hours)
+     +        land_temp_error  = 2.5,   ! assumed err surface temp. obs (K)
+     +        land_wind_error  = 3.5,   ! assumed err surface wind obs (m/s)
+     +        land_moist_error = 0.2    ! assumed err surface moist. obs (%)
 
       namelist /prep_bufr_nml/ obs_window,
+     +                         obs_window_upa,
+     +                         obs_window_air,
+     +                         obs_window_sfc,
      +                         obs_window_cw,
      +                         otype_use,
      +                         qctype_use,
@@ -132,6 +141,17 @@
         inum_qctype = inum_qctype + 1
       enddo
 
+c     overwrite observation windows if obs_window is defined
+c----------------------------------------------------------------------
+
+      if ( obs_window > 0.0 ) then
+        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
+        obs_window_cw  = obs_window
+      endif
+
 c    open the input bufr file and the output text file
 c----------------------------------------------------------------------
 
@@ -148,7 +168,7 @@
 c----------------------------------------------------------------------
 
 10    CALL READPB  ( ibufr_unit, subset, idate, ierrpb )
- 
+
       if ( debug ) print *, 'next obs type: ', subset(1:6)
 
       idate00 = idate/100
@@ -212,14 +232,28 @@
      &              abs(time0)
           GO TO 10
         ENDIF 
-      ELSE
-        IF ( abs(time0) .gt. obs_window ) THEN 
+      ELSE IF ( subset(1:6).eq.'ADPUPA' ) THEN
+        IF ( abs(time0) .gt. obs_window_upa ) THEN 
          if ( debug ) print*, 
-     &              'non-satwind outside time window, diff was: ',
+     &              'upper-air outside time window, diff was: ',
      &              abs(time0)
           GO TO 10
         ENDIF
-      END IF
+      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
+	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
+	ENDIF
+      ENDIF
 
 c    place the location data in the appropriate array
 c----------------------------------------------------------------------

Modified: DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f
===================================================================
--- DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f	2010-03-26 22:05:59 UTC (rev 4329)
+++ DART/trunk/observations/NCEP/prep_bufr/src/prepbufr_03Z.f	2010-03-29 16:25:50 UTC (rev 4330)
@@ -1,6 +1,8 @@
 c    This is the 5th version of the BUFR preparation program for the
 c    newly revised DART version. Ps and moisture obs are outputed as well.
 c     
+c    12/2009 added additional time window flavors, specified all of the variable
+c    types. 
 c    A bug with the radiosonde T events selection j2 is fixed at 04/06/2005.
 c    and surface data is included in this version.
 c    For radiosonde T: T of Pc=1 and 6 is dry T; T of pc=8 is virtual T.
@@ -71,7 +73,7 @@
 c    was done on this observation.  As of now, these are unused, but could
 c    be used for selection or diagnosis.
       integer :: pc_t, pc_q, pc_u, pc_v, pc_p 
-      integer :: tqm, pqm, qqm, uqm, vqm, qctype_use(max_otype)
+      integer :: tqm, pqm, qqm, uqm, vqm
       logical :: found, uotype, uqcflag, use_this_data_real, 
      +           use_this_data_int, processed
       logical :: debug = .false.
@@ -79,14 +81,21 @@
 c    Namelist Parameters
 c----------------------------------------------------------------------
 
-      real :: otype_use(max_otype),    ! report types to use
-     +        obs_window = 0.8,        ! observation time window (hours)
-     +        obs_window_cw = 1.5,     ! cloud wind obs time window (hours)
-     +        land_temp_error = 2.5,   ! assumed err surface temp. obs (K)
-     +        land_wind_error = 3.5,   ! assumed err surface wind obs (m/s)
-     +        land_moist_error = 0.2   ! assumed err surface moist. obs (%)
+      integer :: qctype_use(max_otype)  ! qc values to accept (default all)
+      real :: otype_use(max_otype),     ! report types to use (default all)
+     +        obs_window       = 1.5,   ! observation time window (+/-hours)
+     +        obs_window_upa   = 1.5,   ! sonde time window (+/-hours)
+     +        obs_window_air   = 1.5,   ! aircraft obs time window (+/-hours)
+     +        obs_window_sfc   = 0.8,   ! surface obs time window (+/-hours)
+     +        obs_window_cw    = 1.5,   ! cloud wind obs time window (+/-hours)
+     +        land_temp_error  = 2.5,   ! assumed err surface temp. obs (K)
+     +        land_wind_error  = 3.5,   ! assumed err surface wind obs (m/s)
+     +        land_moist_error = 0.2    ! assumed err surface moist. obs (%)
 
       namelist /prep_bufr_nml/ obs_window,
+     +                         obs_window_upa,
+     +                         obs_window_air,
+     +                         obs_window_sfc,
      +                         obs_window_cw,
      +                         otype_use,
      +                         qctype_use,
@@ -132,6 +141,17 @@
         inum_qctype = inum_qctype + 1
       enddo
 
+c     overwrite observation windows if obs_window is defined
+c----------------------------------------------------------------------
+
+      if ( obs_window > 0.0 ) then
+        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
+        obs_window_cw  = obs_window
+      endif
+
 c    open the input bufr file and the output text file
 c----------------------------------------------------------------------
 
@@ -148,7 +168,7 @@
 c----------------------------------------------------------------------
 
 10    CALL READPB  ( ibufr_unit, subset, idate, ierrpb )
- 
+
       if ( debug ) print *, 'next obs type: ', subset(1:6)
 
       idate00 = idate/100
@@ -212,14 +232,28 @@
      &              hour01
           GO TO 10
         ENDIF 
-      ELSE
-        IF ( hour01 .gt. obs_window ) THEN 
+      ELSE IF ( subset(1:6).eq.'ADPUPA' ) THEN
+        IF ( hour01 .gt. obs_window_upa ) THEN 
          if ( debug ) print*, 
-     &              'non-satwind outside time window, diff was: ',
+     &              'upper-air outside time window, diff was: ',
+     &              abs(time0)
+          GO TO 10
+        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
+	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
-        ENDIF
-      END IF
+	ENDIF
+      ENDIF
 
 c    place the location data in the appropriate array
 c----------------------------------------------------------------------

Modified: DART/trunk/observations/NCEP/prep_bufr/work/input.nml
===================================================================
--- DART/trunk/observations/NCEP/prep_bufr/work/input.nml	2010-03-26 22:05:59 UTC (rev 4329)
+++ DART/trunk/observations/NCEP/prep_bufr/work/input.nml	2010-03-29 16:25:50 UTC (rev 4330)
@@ -1,6 +1,5 @@
 &prep_bufr_nml 
  obs_window     = 24.0,
- obs_window_cw  = 24.0, 
  otype_use      = 120.0, 130.0, 131.0, 132.0, 133.0, 180.0,
                   181.0, 182.0, 220.0, 221.0, 230.0, 231.0,
                   232.0, 233.0, 242.0, 243.0, 245.0, 246.0,
@@ -9,25 +8,28 @@
  /
 
 
+! set obs_window to -1 and then set the per-type windows
+! to values to use different widths of time windows.
+
 ! the above are suggested settings.  the full set of
 ! namelist items (and defaults) are here:
 
-! otype_use (= all)        ! report types to use
-! obs_window = 0.8,        ! observation time window (hours)
-! obs_window_cw = 1.5,     ! cloud wind observation time window (hours)
-! qctype_use = 1,2,3,4,9,15  ! NCEP QC values to accept
-! land_temp_error = 2.5,   ! assumed error for surface temp. observations (K)
-! land_wind_error = 3.5,   ! assumed error for surface wind observations (m/s)
-! land_moist_error = 0.2   ! assumed error for surface moist. observations (%)
-
+! qctype_use(:)            ! data qc values to accept (default all)
+! otype_use(:)             ! report types to use (default all)
+! obs_window       = 1.5   ! observation time window (+/-hours)
+! obs_window_upa   = 1.5   ! sonde time window (+/-hours)
+! obs_window_air   = 1.5   ! aircraft obs time window (+/-hours)
+! obs_window_sfc   = 0.8   ! surface obs time window (+/-hours)
+! obs_window_cw    = 1.5   ! cloud wind obs time window (+/-hours)
+! land_temp_error  = 2.5   ! assumed err surface temp. obs (K)
+! land_wind_error  = 3.5   ! assumed err surface wind obs (m/s)
+! land_moist_error = 0.2   ! assumed err surface moist. obs (%)
+!
 ! other examples of use:
+! obs_window     = -1.,
 ! obs_window     = 2.00,
-! obs_window     = 1.00,
+! obs_window     = 0.80,
 ! otype_use      = 120.0, 180.0, 181.0, 182.0,
-! otype_use      = 120.0, 130.0, 131.0, 132.0, 133.0, 180.0,
-!                  181.0, 182.0, 220.0, 221.0, 230.0, 231.0,
-!                  232.0, 233.0, 242.0, 243.0, 245.0, 246.0,
-!                  252.0, 253.0, 255.0, 280.0, 281.0, 282.0,
-! qctype_use     = 0, 1, 2, 4, 5, 6, 9, 15
+! qctype_use     = 0, 1, 2, 4, 5, 6
 !
 


More information about the Dart-dev mailing list