[Dart-dev] DART/branches Revision: 12609

dart at ucar.edu dart at ucar.edu
Thu May 31 13:14:14 MDT 2018


bdobbins at ucar.edu
2018-05-31 13:14:14 -0600 (Thu, 31 May 2018)
223
Still very ugly code; committing before fixing a bug where if a chunk has multiple bad-qc obs (particularly at the end of the chunk), we swap bad for bad.  Will try to fix this via a logical vector of which obs are 'good'.



Modified: DART/branches/graph_coloring/assimilation_code/location/threed_sphere/location_mod.f90
===================================================================
--- DART/branches/graph_coloring/assimilation_code/location/threed_sphere/location_mod.f90	2018-05-29 22:45:29 UTC (rev 12608)
+++ DART/branches/graph_coloring/assimilation_code/location/threed_sphere/location_mod.f90	2018-05-31 19:14:14 UTC (rev 12609)
@@ -167,6 +167,7 @@
 
 ! Option for verification using exhaustive search
 logical :: COMPARE_TO_CORRECT = .false.    ! normally false
+!logical :: COMPARE_TO_CORRECT = .true.    ! normally false
 
 !-----------------------------------------------------------------
 ! Namelist with default values
@@ -1503,6 +1504,7 @@
 
 ! local variable for what the maxdist is in this particular case.
 this_maxdist = gc%gtt(bt)%maxdist
+!write(*,*) "maxdist = ", this_maxdist
 
 !--------------------------------------------------------------
 ! For validation, it is useful to be able to compare against exact
@@ -1510,6 +1512,7 @@
 if(COMPARE_TO_CORRECT) then
    cnum_close = 0
    do i = 1, gc%gtt(bt)%num 
+      !write(*,*) "COMPARE_TO_CORRECT(A): ", gc%gtt(bt)%num, i
       if (locs(i)%which_vert /= base_loc%which_vert) then
          this_dist = get_dist(base_loc, locs(i), base_type, loc_qtys(i), &
                      no_vert = .true.)
@@ -1517,10 +1520,13 @@
          this_dist = get_dist(base_loc, locs(i), base_type, loc_qtys(i))
       endif
       if(this_dist <= this_maxdist) then
+         !write(*,'(A,I,F,F)') "C2C(Close): ", i, this_dist, this_maxdist
          ! Add this location to correct list
          cnum_close = cnum_close + 1
          cclose_ind(cnum_close) = i
          cdist(cnum_close) = this_dist
+       else
+         !write(*,'(A,I,F,F)') "C2C(-----): ", i, this_dist, this_maxdist
       endif
    end do
 endif
@@ -1581,6 +1587,7 @@
             if(.not. present(dist)) then
                ! Dist isn't present; add this ob to list without computing distance
                num_close = num_close + 1
+               !write(*,*) "Distance Not Present - adding to list : ", t_ind, num_close
                close_ind(num_close) = t_ind
             else
                if(base_loc%which_vert == locs(t_ind)%which_vert) then
@@ -1594,6 +1601,7 @@
 
                ! If this locations distance is less than cutoff, add it to the list
                if(this_dist <= this_maxdist) then
+                  !write(*,*) "Location comparison : ", this_dist, this_maxdist
                   num_close = num_close + 1
                   close_ind(num_close) = t_ind
                   dist(num_close) = this_dist
@@ -1606,6 +1614,7 @@
 
 !------------------------ Verify by comparing to exhaustive search --------------
 if(COMPARE_TO_CORRECT) then
+   write(*,*) "C2C(Check) : ", num_close, cnum_close
    ! Do comparisons against full search
    if((num_close /= cnum_close) .and. present(dist)) then
       write(msgstring, *) 'get_close (', num_close, ') should equal exhaustive search (', cnum_close, ')'

Modified: DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90
===================================================================
--- DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90	2018-05-29 22:45:29 UTC (rev 12608)
+++ DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90	2018-05-31 19:14:14 UTC (rev 12609)
@@ -1,12 +1,15 @@
-! Initial graph coloring version - has lots of issues:
-!  - very simplified 'filter' routine
-!  - needs to handle ob 'skips'
-!  - communication is element-wise in chunks, needs optimization
-!  - needs a general cleanup... focus right now is just to get it building
+! DART software - Copyright UCAR. This open source software is provided
+! by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! $Id: assim_tools_mod.f90 11799 2017-07-07 21:08:09Z nancy at ucar.edu $
 
-!>  A coloring-enabled version of the assim_tools_mod functionality
-module assim_graph_tools_mod
+!>  A variety of operations required by assimilation.
+module assim_tools_mod
 
+!> \defgroup assim_tools assim_tools_mod
+!> 
+!> @{
 use      types_mod,       only : r8, i8, digits12, PI, missing_r8
 use  utilities_mod,       only : file_exist, get_unit, check_namelist_read, do_output,    &
                                  find_namelist_in_file, register_module, error_handler,   &
@@ -18,7 +21,7 @@
 
 use obs_sequence_mod,     only : obs_sequence_type, obs_type, get_num_copies, get_num_qc, &
                                  init_obs, get_obs_from_key, get_obs_def, get_obs_values, &
-                                 destroy_obs
+                                 destroy_obs, get_obs_from_key_debug
    


More information about the Dart-dev mailing list