[Dart-dev] DART/branches Revision: 11875
dart at ucar.edu
dart at ucar.edu
Thu Aug 3 15:13:36 MDT 2017
nancy at ucar.edu
2017-08-03 15:13:36 -0600 (Thu, 03 Aug 2017)
490
make the column and channel versions compatible with the updated
manhattan interfaces. these hadn't worked before. remove all the
octree code from the channel version - it was never working and isn't
needed in this type of location module.
fix the routine name in 2 error messages in the threed_sphere
version, and remove a reference to nc_check() which isn't used anymore.
remove an unused integer from the threed_cartesian derived type
and remove an unused subroutine from the code.
Modified: DART/branches/rma_trunk/assimilation_code/location/channel/location_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/location/channel/location_mod.f90 2017-08-03 21:08:34 UTC (rev 11874)
+++ DART/branches/rma_trunk/assimilation_code/location/channel/location_mod.f90 2017-08-03 21:13:36 UTC (rev 11875)
@@ -11,7 +11,7 @@
! Implements location interfaces for a 3d channel in X,Y,Z where X is periodic,
! Y has walls (limited domain), and Z is infinite
-use types_mod, only : r8, MISSING_R8, MISSING_I, PI, RAD2DEG, DEG2RAD
+use types_mod, only : r8, i8, MISSING_R8, MISSING_I, PI, RAD2DEG, DEG2RAD
use utilities_mod, only : register_module, error_handler, E_ERR, ascii_file_format, &
nc_check, E_MSG, open_file, close_file, set_output, &
logfileunit, nmlfileunit, find_namelist_in_file, &
@@ -20,7 +20,12 @@
use random_seq_mod, only : random_seq_type, init_random_seq, random_uniform
use obs_kind_mod, only : get_num_types_of_obs, get_name_for_type_of_obs
use mpi_utilities_mod, only : my_task_id, task_count
+use ensemble_manager_mod, only : ensemble_type
+use default_location_mod, only : has_vertical_choice, vertical_localization_on, &
+ get_vertical_localization_coord, &
+ set_vertical_localization_coord
+
implicit none
private
@@ -27,16 +32,13 @@
public :: location_type, get_location, set_location, &
set_location_missing, is_location_in_region, &
write_location, read_location, interactive_location, query_location, &
- LocationDims, LocationName, LocationLName, get_close_obs, &
- get_close_maxdist_init, get_close_obs_init, get_close_type, &
- operator(==), operator(/=), get_dist, get_close_obs_destroy, &
- nc_write_location_atts, nc_get_location_varids, nc_write_location, &
- vert_is_height, vert_is_pressure, vert_is_undef, vert_is_level, &
- vert_is_surface, vert_is_scale_height, has_vertical_localization, &
- print_get_close_type, find_nearest, &
- set_vert, get_vert, set_which_vert
+ LocationDims, LocationName, LocationLName, LocationStorageOrder, LocationUnits, &
+ get_close_type, get_close_init, get_close_obs, get_close_state, get_close_destroy, &
+ operator(==), operator(/=), get_dist, has_vertical_choice, vertical_localization_on, &
+ set_vertical, is_vertical, get_vertical_localization_coord, &
+ set_vertical_localization_coord, convert_vertical_obs, convert_vertical_state, &
+ print_get_close_type, find_nearest
-
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
"$URL$"
@@ -48,43 +50,10 @@
real(r8) :: x, y, z
end type 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?
-
-! 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.
-
-
-! fortran doesn't let you make arrays of pointers, but you can make a
-! derived type containing a pointer, and then make arrays of that derived type.
-! i'm sure if i think about this hard enough i'll figure out why this is so,
-! but for now i'll just believe the great google which tells me it's this way.
-type octree_ptr
+type get_close_type
private
- type(octree_type), pointer :: p
-end type octree_ptr
-
-type octree_type
- private
- integer :: count ! count in this cube, -1 for non-terminal cube
- integer, pointer :: index(:) ! list of indices in this cube, count long
- type(octree_ptr), allocatable :: children(:,:,:) ! subcubes
- type(octree_type), pointer :: parent ! who made you
- type(location_type) :: llb ! xyz of lower left bottom
- type(location_type) :: split ! xyz of split point
- type(location_type) :: urt ! xyz of upper right top
-end type octree_type
-
-type box_type
- private
+ integer :: num
+ real(r8) :: maxdist
integer, pointer :: loc_box(:) ! (nloc); List of loc indices in boxes
integer, pointer :: count(:, :, :) ! (nx, ny, nz); # of locs in each box
integer, pointer :: start(:, :, :) ! (nx, ny, nz); Start of list of locs in this box
@@ -93,15 +62,6 @@
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
More information about the Dart-dev
mailing list