[Dart-dev] DART/branches Revision: 12004

dart at ucar.edu dart at ucar.edu
Tue Oct 17 17:41:45 MDT 2017


nancy at ucar.edu
2017-10-17 17:41:44 -0600 (Tue, 17 Oct 2017)
97
updates to allow the converters to read WOD2013 files.
thanks to Fred Castruccio for the fixes.




Modified: DART/branches/rma_trunk/observations/obs_converters/WOD/wod_read_routines.f90
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/WOD/wod_read_routines.f90	2017-10-17 23:29:29 UTC (rev 12003)
+++ DART/branches/rma_trunk/observations/obs_converters/WOD/wod_read_routines.f90	2017-10-17 23:41:44 UTC (rev 12004)
@@ -322,7 +322,8 @@
 
       read(nf,'(a80)',end=500) xchar
 
-      if ( xchar(1:1) .ne. 'B' .and. xchar(1:1) .ne. 'A' ) then
+      if ( xchar(1:1) .ne. 'B' .and. xchar(1:1) .ne. 'A' .and. &
+           xchar(1:1) .ne. 'C' ) then
 
          !iVERSflag = 1 !- not WOD-2005 format, must be WOD-1998
          write(6, *) 'file not in WOD-2005 format; cannot be read'
@@ -330,7 +331,11 @@
          !return
 
       else
-         !iVERSflag = 0 !- WOD-2005 format
+         if ( xchar(1:1) .eq. 'C' ) then
+          !iVERSflag=2   !- WOD-2013 format
+         else
+          !iVERSflag = 0 !- WOD-2005 format
+         endif
       endif
       
 !print *, 'read record'

Modified: DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.f90
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.f90	2017-10-17 23:29:29 UTC (rev 12003)
+++ DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.f90	2017-10-17 23:41:44 UTC (rev 12004)
@@ -159,12 +159,15 @@
 integer            :: print_every_nth_cast = -1
 real(r8)           :: temperature_error  = 0.5  ! degrees C
 real(r8)           :: salinity_error     = 0.5  ! g/kg
+integer            :: start_month        = 1
+integer            :: end_month          = 12
 
 namelist /wod_to_obs_nml/ &
    wod_input_file, wod_input_filelist, wod_out_file,   &
    avg_obs_per_file, debug, max_casts, no_output_file, &
    print_every_nth_cast, print_qc_summary,             &
-   temperature_error, salinity_error, timedebug
+   temperature_error, salinity_error, timedebug,       &
+   start_month, end_month
 
 ! start of executable code
 
@@ -349,6 +352,10 @@
    if (lono < 0.0_r8) lono = lono + 360.0_r8
    obslon = lono 
    obslat = lato
+   if((obslon < 0.0_r8 .or. obslon > 360.0_r8) .or. (obslat < -90.0_r8 .or. obslat > 90.0_r8)) then
+      print *, 'FSC: longitude (',obslon,') or latitude (',obslat,') is not within range. cycle castloop'
+      goto 20 ! inc counter, cycle castloop
+   endif
 
    if (have_temp) then
       if (ierror(1) == 0) then
@@ -373,6 +380,12 @@
       if (ierror(2) /= 0) print *, 'whole salt cast discarded, ierror == ', ierror(2)
    endif
 
+   ! the incoming files are yearly collections.  allow this converter to create
+   ! output files which are only partial years by only processing selected months.
+   if (obsmonth < start_month .or. obsmonth > end_month) then
+      goto 20 ! inc counter, cycle castloop
+   endif
+
    obsloop: do k = 1, levels
    
      obsdepth = depth(k)

Modified: DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.nml
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.nml	2017-10-17 23:29:29 UTC (rev 12003)
+++ DART/branches/rma_trunk/observations/obs_converters/WOD/wod_to_obs.nml	2017-10-17 23:41:44 UTC (rev 12004)
@@ -14,5 +14,7 @@
    print_every_nth_cast =  -1,
    temperature_error    =  0.5,
    salinity_error       =  0.5, 
+   start_month          = 1
+   end_month            = 12
  /
 


More information about the Dart-dev mailing list