[Dart-dev] DART/branches Revision: 11971
dart at ucar.edu
dart at ucar.edu
Fri Oct 6 17:04:11 MDT 2017
thoar at ucar.edu
2017-10-06 17:04:11 -0600 (Fri, 06 Oct 2017)
294
Reads the lat/lon arrays for the nests from the hdf5 file.
Generating the correct horizontal indices when given a known lat/lon
for mass-point variables. Have not checked staggered vars yet.
The interpolation of the test quantity is failing. Debugging statements
are committed at this point.
Modified: DART/branches/coamps/assimilation_code/programs/model_mod_check/model_mod_check.f90
===================================================================
--- DART/branches/coamps/assimilation_code/programs/model_mod_check/model_mod_check.f90 2017-10-06 17:22:24 UTC (rev 11970)
+++ DART/branches/coamps/assimilation_code/programs/model_mod_check/model_mod_check.f90 2017-10-06 23:04:11 UTC (rev 11971)
@@ -35,7 +35,7 @@
use state_vector_io_mod, only : state_vector_io_init, read_state, write_state
-use state_structure_mod, only : get_num_domains
+use state_structure_mod, only : get_num_domains, get_model_variable_indices
use io_filenames_mod, only : io_filenames_init, file_info_type, &
stage_metadata_type, get_stage_metadata, &
@@ -60,6 +60,8 @@
character(len=32 ), parameter :: revision = "$Revision$"
character(len=128), parameter :: revdate = "$Date$"
+character(len=512) :: string1, string2, string3
+
!------------------------------------------------------------------
! The namelist variables
!------------------------------------------------------------------
@@ -68,6 +70,7 @@
integer :: num_ens = 1
character(len=256) :: input_state_files(MAX_NUM_DOMS) = 'null'
character(len=256) :: output_state_files(MAX_NUM_DOMS) = 'null'
+character(len=256) :: all_metadata_file = 'null'
integer(i8) :: x_ind = -1
real(r8), dimension(3) :: loc_of_interest = -1.0_r8
@@ -97,7 +100,8 @@
interp_test_dy, interp_test_yrange, &
interp_test_dz, interp_test_zrange, &
verbose, test1thru, interp_test_vertcoord, &
- single_file, input_state_files, output_state_files
+ single_file, input_state_files, output_state_files, &
+ all_metadata_file
! io variables
integer :: iunit, io
@@ -229,7 +233,8 @@
io_flag = WRITE_COPY)
enddo
-!call file_info_dump(file_info_input, 'mmc')
+! call file_info_dump(file_info_input, 'mmc input')
+! call file_info_dump(file_info_output,'mmc output')
!----------------------------------------------------------------------
! Open a test netcdf initial conditions file.
@@ -294,6 +299,8 @@
endif
endif
+if (all_metadata_file .ne. 'null') call check_all_meta_data()
+
call print_test_message('FINISHED TEST 3')
write(*,'(A)') 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
write(*,'(A)') 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
@@ -300,8 +307,12 @@
if ( test1thru == 3 ) call exit(0)
+
+!>@todo possibly add a check to find the i,j,k of the gridcell closest
+!> to the location of interest.
+
!----------------------------------------------------------------------
-! Check the interpolation - print initially to STDOUT
+! Check interpolation at a single point
!----------------------------------------------------------------------
call print_test_message('RUNNING TEST 4', &
@@ -329,6 +340,10 @@
if ( test1thru == 4 ) call exit(0)
+!----------------------------------------------------------------------
+! Check interpolation for every point in a regular grid
+!----------------------------------------------------------------------
+
call print_test_message('RUNNING TEST 5', &
'Testing range of data for model_interpolate')
write(*,'(A)') ''
@@ -384,6 +399,56 @@
!----------------------------------------------------------------------
+subroutine check_all_meta_data()
+
+integer(i8) :: iloc
+type(location_type) :: loc
+integer :: ix, iy, iz, dom_id, qty_index, var_type, fid
+character(len=256) :: qty_string, metadata_qty_string
+
+write(string1,*)'Exhaustive test of get_state_meta_data - please be patient.'
+write(string2,*)'There are ',get_model_size(),' items in the state vector.'
+call print_test_message('RUNNING TEST 3.1', msg1=string1, msg2=string2)
+
+fid = open_file(all_metadata_file)
+
More information about the Dart-dev
mailing list