[Dart-dev] DART/releases Revision: 12937
dart at ucar.edu
dart at ucar.edu
Mon Nov 26 16:01:09 MST 2018
nancy at ucar.edu
2018-11-26 16:01:09 -0700 (Mon, 26 Nov 2018)
131
commit all my changes to the private mpas branch; once validated
at least some of these should be merged back onto the rma trunk.
Modified: DART/releases/Manhattan/assimilation_code/location/threed_cartesian/xyz_location_mod.f90
===================================================================
--- DART/releases/Manhattan/assimilation_code/location/threed_cartesian/xyz_location_mod.f90 2018-11-26 22:20:04 UTC (rev 12936)
+++ DART/releases/Manhattan/assimilation_code/location/threed_cartesian/xyz_location_mod.f90 2018-11-26 23:01:09 UTC (rev 12937)
@@ -21,9 +21,18 @@
implicit none
private
-public :: xyz_location_type, xyz_get_location, xyz_set_location, &
- xyz_get_close_maxdist_init, xyz_get_close_obs_init, xyz_get_close_type, &
- xyz_find_nearest, xyz_get_close_obs_destroy, xyz_get_dist, xyz_get_ll_location
+public :: xyz_location_type, &
+ xyz_get_location, &
+ xyz_set_location, &
+ xyz_get_close_type, &
+ xyz_get_close_init, &
+ xyz_get_close_destroy, &
+ xyz_find_nearest, &
+ xyz_find_nearest_N, &
+ xyz_use_great_circle_dist, &
+ xyz_get_dist, &
+ xyz_get_ll_location, &
+ xyz_write_location
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
@@ -36,34 +45,20 @@
real(r8) :: x, y, z
end type xyz_location_type
-! This version supports both regularly spaced boxes, and octree division
-! of the space. for octrees, divide each dim in half until N numbers of filled
-! boxes, or octree reaches some depth? give some threshold where you don't
-! divide a box with less than N points in it?
+! This version supports regularly spaced boxes.
-! contrast with kD-trees (divide along dimensions, not points), and there are
-! two types of octrees - PR (point region) where the regions split at an
-! explicit point, vs MX tree where the split is defined to be at the center
-! of the region.
-
-! if the underlying geometry is spherical, there will be many many empty boxes
-! if we uniformly divide up space, and worse, existing locations will be
-! clustered in a few boxes.
-
-
type box_type
private
- integer, pointer :: obs_box(:) ! (nobs); List of obs indices in boxes
- integer, pointer :: count(:, :, :) ! (nx, ny, nz); # of obs in each box
- integer, pointer :: start(:, :, :) ! (nx, ny, nz); Start of list of obs in this box
+ integer, pointer :: loc_box(:) ! (nloc); List of loc indices in boxes
+ integer, pointer :: count(:, :, :) ! (nx, ny, nz); # of loc in each box
+ integer, pointer :: start(:, :, :) ! (nx, ny, nz); Start of list of loc in this box
real(r8) :: bot_x, top_x ! extents in x, y, z
real(r8) :: bot_y, top_y
real(r8) :: bot_z, top_z
real(r8) :: x_width, y_width, z_width ! widths of boxes in x,y,z
- real(r8) :: nboxes_x, nboxes_y, nboxes_z ! based on maxdist how far to search
end type box_type
-! Type to facilitate efficient computation of observations close to a given location
+! Type to facilitate efficient computation of locations close to a given location
type xyz_get_close_type
private
integer :: num
@@ -73,10 +68,11 @@
logical, save :: module_initialized = .false.
+real(r8) :: sphere_radius = -1.0_r8
+logical :: line_of_sight_distance = .true. ! alternative: great circle
+
character(len = 512) :: errstring
-!real(r8) :: radius ! used only for converting points on a sphere into x,y,z and back
-
!-----------------------------------------------------------------
! Namelist with default values
@@ -85,16 +81,7 @@
integer :: ny = 20
integer :: nz = 20
-! tuning options
-integer :: filled = 10 ! threshold at which you quit splitting
-logical :: use_octree = .false. ! if false, use regular boxes
-
-! extensible options - these may be useful for tuning the octree
-! integer :: nboxes = 1000 ! suggestion for max number of nodes
-! integer :: maxdepth = 4 ! suggestion for max tree depth
-
namelist /xyz_location_nml/ &
- filled, use_octree, &
nx, ny, nz
!-----------------------------------------------------------------
@@ -101,7 +88,7 @@
interface xyz_set_location
module procedure set_location_single
More information about the Dart-dev
mailing list