UPSCALE

The upscale command is used to interpolate attribute values from nodes of a fine source mesh to node attributes of a coarse sink mesh. The subroutine finds nodes of the fine source mesh within the Voronoi cell of every node in the coarser sink mesh. Nodes on cell boundaries are assigned to two or more sink nodes. Then the attributes of all the source nodes within a source node’s cell are upscaled into a single value based on the chosen method. Mesh elements and connectivity are ignored and only node values are used to upscale values on to the sink mesh nodes.

A kdtree node search is used to find the source mesh nodes located in each of the Voronoi sink point volumes. It is possible for source nodes to occur on the boundary of multiple Voronoi volumes. By default, all nodes found in each Voronoi volume are used to upscale to the enclosed sink node. In this case, source nodes on multiple Voronoi boundaries will be included in upscale calculations more than once. The keyword option single can be used for situations that require the sum of nodes in each Voronoi space to equal the total of source points used. This one-to-one correspondence is written to the source cmo attribute pt_gtg. This attribute can be reused during multiple calls to the upscale command and will greatly reduce CPU time. The keyword that allows the attributes to be kept as part of the sink cmo is keepatt. Note that information regarding duplicate nodes on Voronoi volume boundaries will be lost if the pt_gtg is used instead of the default search.

The upscale method options provide choices for the calculation of the associated set of source nodes on to the single sink node. The scale_method parameter includes sum, min, max, and averages ariave, harave, geoave. For all positive data sets containing at least one pair of nonequal values, the harmonic mean is always the least of the three means, while the arithmetic mean is always the greatest of the three and the geometric mean is always in between.

The format for the command line is as follows:

upscale / scale_method / cmosink, attsink / 1,0,0 / cmosrc, attsrc /

[boundary_choice] [keepatt] [set_id]

Keywords appearing after the source cmo attribute name are optional and may appear in any order.

scale_method is the choice of upscale calculation applied to each set of source nodes within each sink Voronoi cell where x(1) to x(n) are the values of source nodes 1 to n found for the sink point. The choices are as follows:

ariave - For each sink point, calculate the arithmetic mean of n values from source attribute attsrc

sink_val = (x(1) + x(i)… + x(n)) / n

for 4 values; 1,2,3,4 ariave = 2.5

geoave - For each sink point, calculate the geometric average of n values found in attsrc

sink_val = ( x(1)

EXAMPLE 2 IMAGES:

These images show the 10 numbered sink points and the 1221 source points. In this example all source points have an imt1 value of 1. The sink points each have a value in icount equal to the number of nodes used for the associated Voronoi volume. The red lines show the Voronoi cell boundaries for the 10 sink points.

Source points all equal to 1,

Sink points colored by upscaled value.

Source points colored by associated sink node id, attribute pt_gtg. cell boundaries, attribute dups_gtg.

Source points colored by number of duplicates.

Example 3:

Show results for the 3 versions of mean calcuations.
   
+-----------------------------------------------------------------------+
                                                                       
     * use single quad element with two nodes located                  
     * so they will capture 4 nodes each from source                   
                                                                       
     * for source mesh FINE_MO with two quad elements                  
     * assign bottom nodes to 2 and top nodes to 8                     
                                                                       
     cmo setatt FINE_MO xmean 2.0                                      
     cmo setatt FINE_MO xmean 4,6,1 8.0                                
                                                                       
     * Upscale using averages                                          
     * and write to attributes for nodes 1 and 2 only                  
                                                                       
     ** *** Arithmetic mean ** ***                                       
     upscale/ariave/COARSE_MO amean/1,2,0/ FINE_MO/xmean/              
                                                                       
     ** *** Geometric mean ** ***                                        
     upscale/geoave/COARSE_MO gmean/1,2,0/ FINE_MO/xmean/              
                                                                       
     ** *** Harmonic mean ** ***                                         
     upscale/harave/COARSE_MO hmean/1,2,0/ FINE_MO/xmean/              
                                                                       
                                                                       
     ** *** SOURCE VALUES from FINE_MO ** **** **                         
                                                                       
     cmo printatt FINE_MO xmean                                        
                                                                       
     Attribute: xmean                                                  
                                                                       
              1  2.00000E+00                                           
                                                                       
              2  2.00000E+00                                           
                                                                       
              3  2.00000E+00                                           
                                                                       
              4  8.00000E+00                                           
                                                                       
              5  8.00000E+00                                           
                                                                       
              6  8.00000E+00                                           
                                                                       
                                                                       
     ** *** RESULT VALUES ** **** **                                      
                                                                       
                                                                       
     cmo printatt COARSE_MO amean                                      
                                                                       
     Attribute: amean                                                  
                                                                       
              1  5.00000E+00                                           
                                                                       
              2  5.00000E+00                                           
                                                                       
              3  0.00000E+00                                           
                                                                       
              4  0.00000E+00                                           
                                                                       
                                                                       
     cmo printatt COARSE_MO gmean                                      
                                                                       
     Attribute: gmean                                                  
                                                                       
              1  4.00000E+00                                           
                                                                       
              2  4.00000E+00                                           
                                                                       
              3  0.00000E+00                                           
                                                                       
              4  0.00000E+00                                           
                                                                       
                                                                       
     cmo printatt COARSE_MO hmean                                      
                                                                       
     Attribute: hmean                                                  
                                                                       
              1  3.20000E+00                                           
                                                                       
              2  3.20000E+00                                           
                                                                       
              3  0.00000E+00                                           
                                                                       
              4  0.00000E+00                                           
                                                                     
                                                                     
  +-----------------------------------------------------------------------+
   **Image 1 shows Arithmetic mean result of 5.0**
                      
   Result Sink nodes 1 and 2 are the two lower nodes of the single quad  
   element in image.
                                                    
   Source nodes are on the two adjacent quad elements.                   
                                                                         
       UPSCALE METHOD:     ariave                                        
                                                                         
                  4  Sink Nodes of amean in course mesh: cmoc            
                                                                         
                  2  Selected Set of Nodes will be written               
                                                                         
                  6  Source Nodes of xmean in fine mesh: cmof            
                                                                         
                                                                         
         Source Nodes    Percent Done                                    
                                                                         
                     3       25 %                                        
                                                                         
                     5       50 %                                        
                                                                         
                     6 Total source nodes searched.                      
                                                                         
       ---     Sink id   # of nodes used   calculated value ---          
                                                                         
                     1                4    0.5000000E+01                 
                                                                         
                     2                4    0.5000000E+01                 
                                                                         
                     2 sink nodes out of                 4 assigned valu 
   es.                                                                   
                     2 duplicate nodes on Voronoi boundaries used multip 
   le times.                                                             
       UPSCALE/ariave/ from xmean to amean Done.                         

   **Image 2 shows Geometric mean result of 4.0**
                       
   Result Sink nodes 1 and 2 are the two lower nodes of the single quad  
   element in image.
                                                    
   Source nodes are on the two adjacent quad elements.                   
                                                                         
       UPSCALE METHOD:     geoave                                        
                                                                         
                  4  Sink Nodes of gmean in course mesh: cmoc            
                                                                         
                  2  Selected Set of Nodes will be written               
                                                                         
                  6  Source Nodes of xmean in fine mesh: cmof            
                                                                         
                                                                         
         Source Nodes    Percent Done                                    
                                                                         
                     3       25 %                                        
                                                                         
                     5       50 %                                        
                                                                         
                     6 Total source nodes searched.                      
                                                                         
       ---     Sink id   # of nodes used   calculated value ---          
                                                                         
                     1                4    0.4000000E+01                 
                                                                         
                     2                4    0.4000000E+01                 
                                                                         
                     2 sink nodes out of                 4 assigned valu 
   es.                                                                   
                     2 duplicate nodes on Voronoi boundaries used multip 
   le times.                                                             
       UPSCALE/geoave/ from xmean to gmean Done.                         

+-----------------------------------------------------------------------+
 **Image 3 shows Harmonic mean result of 3.2**
                      
 Result Sink nodes 1 and 2 are the two lower nodes of the single quad  
 element in image.
                                                  
 Source nodes are on the two adjacent quad elements.                   
                                                                       
     UPSCALE METHOD:     harave                                        
                                                                       
                4  Sink Nodes of hmean in course mesh: cmoc            
                                                                       
                2  Selected Set of Nodes will be written               
                                                                       
                6  Source Nodes of xmean in fine mesh: cmof            
                                                                       
                                                                       
       Source Nodes    Percent Done                                    
                                                                       
                   3       25 %                                        
                                                                       
                   5       50 %                                        
                                                                       
                   6 Total source nodes searched.                      
                                                                       
     ---     Sink id   # of nodes used   calculated value ---          
                                                                       
                   1                4    0.3200000E+01                 
                                                                       
                   2                4    0.3200000E+01                 
                                                                       
                   2 sink nodes out of                 4 assigned valu 
 es.                                                                   
                   2 duplicate nodes on Voronoi boundaries used multip 
 le times.                                                             
     UPSCALE/harave/ from xmean to hmean Done.