[Dart-dev] DART/trunk Revision: 10949
dart at ucar.edu
dart at ucar.edu
Wed Jan 25 14:05:22 MST 2017
thoar at ucar.edu
2017-01-25 14:05:22 -0700 (Wed, 25 Jan 2017)
358
Removing a broken soft link that has existed since time began.
The data file is actually dynamo/data/obsval.dat (which is there and is unchanged)
but can now be referenced by a namelist. It looks like the model_mod.f90
has a hardcoded reference to 'obsval.dat' but it is not clear to me
how that is actually used since I cannot test the run-time sripting.
Modified: DART/trunk/models/dynamo/model_mod.f90
===================================================================
--- DART/trunk/models/dynamo/model_mod.f90 2017-01-25 19:09:26 UTC (rev 10948)
+++ DART/trunk/models/dynamo/model_mod.f90 2017-01-25 21:05:22 UTC (rev 10949)
@@ -16,7 +16,7 @@
use utilities_mod, only : register_module, error_handler, E_ERR, E_MSG, nmlfileunit, &
do_output, find_namelist_in_file, check_namelist_read, &
- do_nml_file, do_nml_term
+ do_nml_file, do_nml_term, open_file, close_file
use random_seq_mod, only : random_seq_type, init_random_seq, random_uniform, random_gaussian
use mpi_utilities_mod, only : my_task_id
@@ -56,21 +56,24 @@
real(r8) :: r = 28.0_r8
real(r8) :: b = 8.0_r8 / 3.0_r8
real(r8) :: deltat = 0.01_r8
-real(r8) :: our_time = 0.0_r8
-real(r8) :: obs_loc(nobs), x_obs(nobs), obs_x(nobs), dobsdx(nobs)
-integer :: counter = 0
-type(random_seq_type), save :: sr
integer :: time_step_days = 1
integer :: time_step_seconds = 0
-logical :: perfect_model = .FALSE.
+character(len=256) :: obsval_filename = '../data/obsval.dat'
-namelist /model_nml/ sigma, r, b, deltat, time_step_days, time_step_seconds
+namelist /model_nml/ sigma, r, b, deltat, &
+ time_step_days, time_step_seconds, obsval_filename
+
!---------------------------------------------------------------
+! Define the location of the state variables in module storage
-! Define the location of the state variables in module storage
type(location_type) :: state_loc(model_size)
type(time_type) :: time_step
+type(random_seq_type), save :: sr
+real(r8) :: our_time = 0.0_r8
+integer :: counter = 0
+logical :: perfect_model = .FALSE.
+real(r8) :: obs_loc(nobs), x_obs(nobs), obs_x(nobs), dobsdx(nobs)
contains
@@ -100,12 +103,12 @@
if (do_nml_term()) write( * , nml=model_nml)
! Define the locations of the model state variables
-open(99,file='../dynamo/obsval.dat')
+iunit = open_file(obsval_filename,form='formatted')
do i = 1, model_size
- read(99,*) x_loc
+ read(iunit,*) x_loc
state_loc(i) = set_location(x_loc)
end do
-close(99)
+call close_file(iunit)
! The time_step in terms of a time type must also be initialized. Need
! to determine appropriate non-dimensionalization conversion for L93
Deleted: DART/trunk/models/dynamo/work/dynamo
===================================================================
--- DART/trunk/models/dynamo/work/dynamo 2017-01-25 19:09:26 UTC (rev 10948)
+++ DART/trunk/models/dynamo/work/dynamo 2017-01-25 21:05:22 UTC (rev 10949)
@@ -1 +0,0 @@
-link ../data
\ No newline at end of file
Modified: DART/trunk/models/dynamo/work/input.nml
===================================================================
--- DART/trunk/models/dynamo/work/input.nml 2017-01-25 19:09:26 UTC (rev 10948)
+++ DART/trunk/models/dynamo/work/input.nml 2017-01-25 21:05:22 UTC (rev 10949)
@@ -122,6 +122,7 @@
deltat = 0.01,
time_step_days = 1,
time_step_seconds = 0
+ obsval_filename = '../data/obsval.dat'
/
&utilities_nml
Deleted: DART/trunk/models/dynamo/work/obsval.dat
===================================================================
--- DART/trunk/models/dynamo/work/obsval.dat 2017-01-25 19:09:26 UTC (rev 10948)
+++ DART/trunk/models/dynamo/work/obsval.dat 2017-01-25 21:05:22 UTC (rev 10949)
@@ -1 +0,0 @@
-link ../dynamo/obsval.dat
\ No newline at end of file
More information about the Dart-dev
mailing list