[Dart-dev] [3935] DART/trunk/observations/quikscat: Providing ability to thin the data by

nancy at ucar.edu nancy at ucar.edu
Fri Jun 19 10:57:24 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090619/6da1bc98/attachment-0001.html 
-------------- next part --------------
Modified: DART/trunk/observations/quikscat/QuikSCAT.html
===================================================================
--- DART/trunk/observations/quikscat/QuikSCAT.html	2009-06-19 16:00:37 UTC (rev 3934)
+++ DART/trunk/observations/quikscat/QuikSCAT.html	2009-06-19 16:57:23 UTC (rev 3935)
@@ -209,7 +209,8 @@
 <P>
 <div class=namelist><pre>
 <em class=call>namelist / convert_L2b_nml / </em> &#38;
-    l2b_file, datadir, outputdir, lon1, lon2, lat1, lat2
+    l2b_file, datadir, outputdir, lon1, lon2, lat1, lat2, &#38;
+    along_track_thin, cross_track_thin 
 </pre></div>
 </P>
 
@@ -263,6 +264,17 @@
     <!--  type  --><TD valign=top>real(r8)             </TD>
     <!--descript--><TD>the North-most latitude of interest. [-90.0, 90.0]
                      <em class="unit">[default:90.0</em></TD></TR>
+<TR><!--contents--><TD valign=top>along_track_thin     </TD>
+    <!--  type  --><TD valign=top>integer              </TD>
+    <!--descript--><TD>provides ability to thin the data by ignoring 
+                       entire WVC rows. 2 == ignore every other row.
+                     <em class="unit">[default:0</em></TD></TR>
+<TR><!--contents--><TD valign=top>cross_track_thin     </TD>
+    <!--  type  --><TD valign=top>integer              </TD>
+    <!--descript--><TD>provides ability to thin the data by ignoring 
+                       wind vector cells in a particular row. 
+                       2 == ignore every other cell.
+                     <em class="unit">[default:0</em></TD></TR>
 </TABLE>
 
 <!--==================================================================-->

Modified: DART/trunk/observations/quikscat/convert_L2b.f90
===================================================================
--- DART/trunk/observations/quikscat/convert_L2b.f90	2009-06-19 16:00:37 UTC (rev 3934)
+++ DART/trunk/observations/quikscat/convert_L2b.f90	2009-06-19 16:57:23 UTC (rev 3935)
@@ -57,8 +57,12 @@
             lat1 = -90.0_r8,  &   !  lower latitude bound
             lat2 =  90.0_r8       !  upper latitude bound
 
+integer :: along_track_thin = 0
+integer :: cross_track_thin = 0
+
 namelist /convert_L2b_nml/ l2b_file, datadir, outputdir, &
-                           lon1, lon2, lat1, lat2
+                           lon1, lon2, lat1, lat2,       &
+                           along_track_thin, cross_track_thin
 
 ! ----------------------------------------------------------------------
 ! start of executable program code
@@ -88,7 +92,8 @@
 dartfile = trim(outputdir)//'/'//trim(output_name)
 
 call read_qscat2b(datafile, orbit)   ! read from HDF file into a structure
-seq = real_obs_sequence(orbit, lon1, lon2, lat1, lat2) ! convert structure to a sequence
+seq = real_obs_sequence(orbit, lon1, lon2, lat1, lat2, &
+           along_track_thin, cross_track_thin ) ! convert structure to a sequence
 call write_obs_seq(seq, dartfile)
 call destroy_obs_sequence(seq)       ! release the memory of the seq
 call timestamp(source,revision,revdate,'end') ! close the log file

Modified: DART/trunk/observations/quikscat/convert_L2b.nml
===================================================================
--- DART/trunk/observations/quikscat/convert_L2b.nml	2009-06-19 16:00:37 UTC (rev 3934)
+++ DART/trunk/observations/quikscat/convert_L2b.nml	2009-06-19 16:57:23 UTC (rev 3935)
@@ -3,6 +3,8 @@
      datadir = '.',
    outputdir = '.',
    lon1 = 0.0, lon2 = 360.0, 
-   lat1 = -90.0, lat2 = 90.0
+   lat1 = -90.0, lat2 = 90.0,
+   along_track_thin = 0,
+   cross_track_thin = 0
  /
 

Modified: DART/trunk/observations/quikscat/quikscat_JPL_mod.f90
===================================================================
--- DART/trunk/observations/quikscat/quikscat_JPL_mod.f90	2009-06-19 16:00:37 UTC (rev 3934)
+++ DART/trunk/observations/quikscat/quikscat_JPL_mod.f90	2009-06-19 16:57:23 UTC (rev 3935)
@@ -11,7 +11,7 @@
 ! $Revision$
 ! $Date$
 
-use types_mod,        only : r4, r8, digits12, deg2rad, rad2deg
+use types_mod,        only : r4, r8, digits12, deg2rad, rad2deg, metadatalength
 
 use obs_def_mod,      only : obs_def_type, get_obs_def_time, read_obs_def, &
                              write_obs_def, destroy_obs_def, interactive_obs_def, &
@@ -145,12 +145,14 @@
 
 
 
-function real_obs_sequence ( orbit, lon1, lon2, lat1, lat2 )
+function real_obs_sequence ( orbit, lon1, lon2, lat1, lat2, &
+                             row_thin, col_thin )
 !------------------------------------------------------------------------------
 !  this function is to prepare data to DART sequence format
 !
 type(orbit_type), intent(in) :: orbit
 real(r8), intent(in) :: lon1, lon2, lat1, lat2
+integer,  intent(in) :: row_thin, col_thin
 
 integer :: max_num=MAX_WVC*MAX_ROWS*2
 
@@ -174,7 +176,7 @@
 
 type(time_type) :: time, pre_time
 
-character(len = 129) :: meta_data
+character(len = metadatalength) :: meta_data
 
 if ( .not. module_initialized ) call initialize_module
 
@@ -213,11 +215,21 @@
 !rowloop:  do irow=400,403
 rowloop:  do irow=1,MAX_ROWS
 
+   ! if we're going to subset rows, cycle here
+   if (row_thin > 0) then
+      if (modulo(irow, row_thin) /= 1) cycle rowloop
+   endif
+
    time = orbit%row_time(irow)
    call get_time(time, seconds, days)
 
    wvcloop:  do iwvc=1,MAX_WVC
 
+      ! if we're going to subset columns, cycle here
+      if (col_thin > 0) then
+         if (modulo(iwvc, col_thin) /= 1) cycle wvcloop
+      endif
+
       ! no ambiguities means no retrieval
 
       if (orbit%num_ambigs(iwvc,irow) < 1) cycle wvcloop

Modified: DART/trunk/observations/quikscat/work/ConvertMany.lsf
===================================================================
--- DART/trunk/observations/quikscat/work/ConvertMany.lsf	2009-06-19 16:00:37 UTC (rev 3934)
+++ DART/trunk/observations/quikscat/work/ConvertMany.lsf	2009-06-19 16:57:23 UTC (rev 3935)
@@ -20,7 +20,7 @@
 #BXXX -J qscat[032-060]   # feb 2008
 #BXXX -J qscat[061-091]   # mar 2008
 #
-#BSUB -J qscat[061-091]
+#BSUB -J qscat[032-060]
 #BSUB -n 1
 #BSUB -q standby
 #BSUB -W 0:10
@@ -36,7 +36,8 @@
 #----------------------------------------------------------------------
 #----------------------------------------------------------------------
 
-set month = 03
+set month = 02
+set  year = 2008
 
 if ($?LSB_HOSTS) then
 
@@ -82,17 +83,15 @@
 #----------------------------------------------------------------------
 #----------------------------------------------------------------------
 
-@ y = 2008
-
 if ( $TASKID < 10 ) then
-   @ d = 00$TASKID
+   set doy = 00$TASKID
 else if ( $TASKID < 100 ) then
-   @ d = 0$TASKID
+   set  doy = 0$TASKID
 else
-   @ d = $TASKID
+   set   doy = $TASKID
 endif
 
-   cd /ptmp/thoar/QuikSCAT_L2B/${y}/${d}
+   cd /ptmp/thoar/QuikSCAT_L2B/${year}/${doy}
 
    \rm -f *obs_seq_out
 
@@ -115,7 +114,9 @@
       echo "outputdir = '.',"                          >> input.nml
       echo "l2b_file = '"$FILE"',"                     >> input.nml
       echo "lon1 =   0.0, lon2 = 360.0,"               >> input.nml
-      echo "lat1 = -90.0, lat2 =  90.0"                >> input.nml
+      echo "lat1 = -90.0, lat2 =  90.0,"               >> input.nml
+      echo "along_track_thin = 2,"                     >> input.nml
+      echo "cross_track_thin = 2"                      >> input.nml
       echo "   /"                                      >> input.nml
       echo " "                                         >> input.nml
 
@@ -162,7 +163,7 @@
   #   ${DARTHOME}/utilities/threed_sphere/obs_sequence_tool || exit 2
       ${DARTHOME}/quikscat/work/obs_sequence_tool || exit 2
 
-      mv obs_seq.processed ${DATADIR}/${y}${month}/qscatL2B_${y}_${d}_obs_seq.out
+      mv obs_seq.processed ${DATADIR}/${year}${month}/qscatL2B_${year}_${doy}_obs_seq.out
 
    endif
 


More information about the Dart-dev mailing list