[Dart-dev] DART/branches Revision: 12798
dart at ucar.edu
dart at ucar.edu
Fri Aug 31 09:23:20 MDT 2018
nancy at ucar.edu
2018-08-31 09:23:20 -0600 (Fri, 31 Aug 2018)
251
move the namelist from the module code to the program code
where it probably always belonged. update the namelist and
docs. create an example input to the tool showing how to
avoid chemistry obs from impacting the rest of the state
and vice versa.
Modified: DART/branches/recam/assimilation_code/modules/utilities/obs_impact_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/utilities/obs_impact_mod.f90 2018-08-30 21:28:37 UTC (rev 12797)
+++ DART/branches/recam/assimilation_code/modules/utilities/obs_impact_mod.f90 2018-08-31 15:23:20 UTC (rev 12798)
@@ -16,9 +16,7 @@
use types_mod, only : r8, obstypelength, missing_r8
use utilities_mod, only : register_module, error_handler, E_ERR, E_MSG, &
- open_file, close_file, get_next_filename, &
- find_namelist_in_file, check_namelist_read, &
- do_nml_file, do_nml_term, nmlfileunit, to_upper
+ open_file, close_file, get_next_filename, to_upper
use obs_kind_mod ! all qtys/types, so impossible to enumerate them here
use parse_args_mod, only : get_args_from_string
@@ -25,9 +23,10 @@
implicit none
private
-public :: create_impact_table, &
- allocate_impact_table, read_impact_table, free_impact_table, &
- get_impact_table_name
+public :: create_impact_table, &
+ allocate_impact_table, &
+ read_impact_table, &
+ free_impact_table
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
@@ -116,25 +115,18 @@
character(len=512) :: msgstring, msgstring2, msgstring3
-! namelist: input/output names, values, etc
-character(len=512) :: input_filename = ''
-character(len=512) :: output_filename = ''
-logical :: allow_any_impact_values = .false.
-logical :: debug = .false. ! .true. for more output
+! .true. gives more output
+logical :: debug = .false.
-! namelist
-namelist /obs_impact_tool_nml/ &
- input_filename, &
- output_filename, &
- allow_any_impact_values, &
- debug
-
contains
!----------------------------------------------------------------------
! TOOL:
-subroutine create_impact_table()
+subroutine create_impact_table(input_filename, output_filename, debug_flag)
+character(len=*), intent(in) :: input_filename
+character(len=*), intent(in) :: output_filename
+logical, intent(in), optional :: debug_flag
! this is the routine that reads in the config file
! and creates an output file that's suitable for reading
@@ -146,7 +138,7 @@
integer :: funit
! initialization and setup
-call initialize_module()
+call initialize_module(debug)
! set up space for the output table
call allocate_impact_table(table)
@@ -234,9 +226,6 @@
integer :: qty_count, type_count
-! initialization and setup
-!call initialize_module()
-
! output table is dimensioned (numtypes, 0:numqtys)
! space for results, and initial values
! default to 'unset'. at the end, anything unset will be
@@ -264,11 +253,12 @@
! type or qty names without a dictionary or state machine.
! RUNTIME:
-subroutine read_impact_table(sourcefile, table, allow_any_values)
+subroutine read_impact_table(sourcefile, table, allow_any_values, anyvals_string)
character(len=*), intent(in) :: sourcefile
real(r8), intent(inout) :: table(:,0:)
logical, intent(in) :: allow_any_values
+character(len=*), intent(in), optional :: anyvals_string
integer :: i, j
integer :: funit
@@ -305,7 +295,7 @@
endif
!print *, trim(typename)//' '//trim(qtyname)//' ', rvalue
- call set_impact(table, typename, qtyname, rvalue, allow_any_values)
+ call set_impact(table, typename, qtyname, rvalue, allow_any_values, anyvals_string)
More information about the Dart-dev
mailing list