[Dart-dev] DART/branches Revision: 10763
dart at ucar.edu
dart at ucar.edu
Fri Nov 18 08:50:53 MST 2016
nancy at ucar.edu
2016-11-18 08:50:53 -0700 (Fri, 18 Nov 2016)
this is a version that i had on a private branch which
has the option to be a full mpi program and advance multiple
ensembles at the same time. it should be completely backwards
compatible with the version that only advanced a single state
at a time. if we're going to have to port this to use
read_state() and write_state() to do netcdf i/o, maybe we
should start with this version?
--- DART/branches/rma_fixed_filenames/integrate_model/integrate_model_parallel.f90 (rev 0)
+++ DART/branches/rma_fixed_filenames/integrate_model/integrate_model_parallel.f90 2016-11-18 15:50:53 UTC (rev 10763)
@@ -0,0 +1,359 @@
+! DART software - Copyright 2004 - 2013 UCAR. This open source software is
+!> Program to integrate assimilation model forward without assimilation.
+!> Can be used for forecasts after an assimilation, spinning a model up
+!> before assimilation, or for advancing subroutine-callable models from
+!> a separate executable during an assimilation.
+!> Stop time can be set either by the 'advance_to' time in the restart file,
+!> or by namelist control.
+!> Usually only advances a single ensemble member, but with namelist control
+!> can cycle through multiple members.
+use time_manager_mod, only : time_type, operator(<), print_time, get_time, &
+ set_time, set_time_missing
+use utilities_mod, only : register_module, &
+ error_handler, E_MSG, nmlfileunit, &
+ do_nml_file, do_nml_term, &
+ find_namelist_in_file, check_namelist_read
+use assim_model_mod, only : static_init_assim_model, get_model_size, &
+ open_restart_read, open_restart_write, close_restart, &
+ awrite_state_restart, aread_state_restart
+use obs_model_mod, only : advance_state
+use ensemble_manager_mod, only : init_ensemble_manager, ensemble_type, &
+use mpi_utilities_mod, only : initialize_mpi_utilities, finalize_mpi_utilities, &
+ task_count, iam_task0
+! version controlled file description for error handling, do not edit
+character(len=256), parameter :: source = &
+character(len=32 ), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate = "$Date$"
+character(len=128), parameter :: id = "$Id$"
+type(ensemble_type) :: ens_handle
+type(time_type) :: target_time, init_time
+integer :: iunit, model_size, rc, member
+character(len = 32) :: write_format
+logical :: one_by_one, override_init
+character(len=256) :: ifile, ofile
+! to overwrite the target time, set these to something >= 0
+! via the namelist. to overwrite the time in the restart file itself,
+! set the init_time to >= 0 (less common).
+integer :: target_days = -1
+integer :: target_seconds = -1
+integer :: init_days = -1
+integer :: init_seconds = -1
+! args for the advance_state call. if this executable was
+! invoked by a script that was originally called by advance_state()
+! in filter there is no need to get recursive here.
+! if you want to use this outside of the dart advance
+! you could comment these in and add them to the namelist below.
+character (len=129) :: adv_ens_command = ''
+integer :: async = 0
+integer :: tasks_per_model_advance = 1 ! unsupported for now
+integer :: ens_size = 1
+logical :: single_restart_file_in = .false.
+logical :: single_restart_file_out = .false.
+! for use outside dart, or to call after dart finishes and
+! writes a restart file (without a target time), set this
+! to .false. and supply a target time with target_days, secs
+logical :: input_is_model_advance_file = .true.
+! for debugging, status
+logical :: trace_execution = .false.
+character(len=128) :: errstring
+! for speed, accuracy - write model_advance files in binary
+! both ways. for debugging make this 'formatted' instead
+! of 'unformatted' and you can see what's in the ud file.
+logical :: write_binary_restart_files = .true.
+! Input and output filenames. The defaults match what filter
+! expects when using this to advance ensemble members in async 2.
+character(len = 256) :: input_filename = "temp_ic"
+character(len = 256) :: output_filename = "temp_ud"
+! to enable the use of the namelist, change this to .true. and recompile.
+logical :: use_namelist = .true.
+! only read in if use_namelist is .true. -- ignored otherwise.
More information about the Dart-dev