[Dart-dev] [5685] DART/branches/development/models/template: minor fiddles to make the skeletal model_mod_check run.
nancy at ucar.edu
nancy at ucar.edu
Tue Apr 10 16:31:32 MDT 2012
Revision: 5685
Author: nancy
Date: 2012-04-10 16:31:31 -0600 (Tue, 10 Apr 2012)
Log Message:
-----------
minor fiddles to make the skeletal model_mod_check run.
the model_mod isn't a fully fleshed out file (intentionally)
so it's tricky to have a program checking it.
Modified Paths:
--------------
DART/branches/development/models/template/model_mod_check.f90
DART/branches/development/models/template/work/input.nml
-------------- next part --------------
Modified: DART/branches/development/models/template/model_mod_check.f90
===================================================================
--- DART/branches/development/models/template/model_mod_check.f90 2012-04-10 22:11:43 UTC (rev 5684)
+++ DART/branches/development/models/template/model_mod_check.f90 2012-04-10 22:31:31 UTC (rev 5685)
@@ -24,7 +24,7 @@
use assim_model_mod, only : open_restart_read, open_restart_write, close_restart, &
aread_state_restart, awrite_state_restart, &
netcdf_file_type, aoutput_diagnostics, &
- init_diag_output, finalize_diag_output
+ init_diag_output, finalize_diag_output, static_init_assim_model
use time_manager_mod, only : time_type, set_calendar_type, NO_CALENDAR, &
read_time, get_time, set_time, &
print_time, write_time, operator(-)
@@ -87,7 +87,7 @@
call check_namelist_read(iunit, io, "model_mod_check_nml")
! This harvests all kinds of initialization information
-call static_init_model()
+call static_init_assim_model()
x_size = get_model_size()
write(*,'(''state vector has length'',i10)') x_size
@@ -103,7 +103,7 @@
write(*,*)'Writing a trivial restart file.'
statevector = 1.0_r8;
-model_time = set_time(21600, 149446) ! 06Z 4 March 2010
+model_time = set_time(0, 10)
iunit = open_restart_write('allones.ics')
call awrite_state_restart(model_time, statevector, iunit)
@@ -114,7 +114,7 @@
!----------------------------------------------------------------------
!model_time = get_state_time('../testdata1')
-model_time = set_time(0,0)
+model_time = set_time(0, 10)
call print_time( model_time,'model_mod_check:model time')
!----------------------------------------------------------------------
@@ -154,7 +154,7 @@
call nc_check( finalize_diag_output(ncFileID), 'model_mod_check:main', 'finalize')
-if ( x_ind > 0 .and. x_ind <= x_size ) call check_meta_data( x_ind )
+!if ( x_ind > 0 .and. x_ind <= x_size ) call check_meta_data( x_ind )
!----------------------------------------------------------------------
! Trying to find the state vector index closest to a particular ...
@@ -198,7 +198,7 @@
call get_state_meta_data( iloc, loc, var_type)
-call write_location(42, loc, fform='formatted', charstring=string1)
+call write_location(0, loc, charstring=string1)
write(*,*)' indx ',iloc,' is type ',var_type,trim(string1)
end subroutine check_meta_data
@@ -216,16 +216,17 @@
character(len=129) :: string1
real(r8), allocatable, dimension(:) :: thisdist
+loc0 = set_location(loc_of_interest)
+
write(*,*)
-write(*,'(''Checking for the indices into the state vector that are at'')')
-call write_location(42, loc, fform='formatted', charstring=string1)
+write(*,'(''Checking for the index in the state vector that is closest to '')')
+call write_location(0, loc0, charstring=string1)
write(*,*) trim(string1)
allocate( thisdist(get_model_size()) )
thisdist = 9999999999.9_r8 ! really far away
-loc0 = set_location(loc_of_interest)
! Since there can be multiple variables with
! identical distances, we will just cruise once through
Modified: DART/branches/development/models/template/work/input.nml
===================================================================
--- DART/branches/development/models/template/work/input.nml 2012-04-10 22:11:43 UTC (rev 5684)
+++ DART/branches/development/models/template/work/input.nml 2012-04-10 22:31:31 UTC (rev 5685)
@@ -197,6 +197,15 @@
model_restart_filename = 'modelfile'
/
+&model_mod_check_nml
+ input_file = 'allones.ics'
+ output_file = 'check_me'
+ advance_time_present = .false.
+ x_ind = 1
+ loc_of_interest = 0.42
+ kind_of_interest = 'ANY'
+ verbose = .false.
+/
&obs_diag_nml
obs_sequence_name = 'obs_seq.final',
More information about the Dart-dev
mailing list