[Dart-dev] DART/branches Revision: 12526

dart at ucar.edu dart at ucar.edu
Tue Apr 17 11:13:37 MDT 2018


hendric at ucar.edu
2018-04-17 11:13:37 -0600 (Tue, 17 Apr 2018)
348

reviving fortran version of fill_inflation_restart.  New 
namelist options:

   single_file = .false.
   input_state_files = ''
   write_prior_inf = .false.
   write_post_inf  = .false.
   initial_inf     = 1.0
   initial_sd      = 0.0

compiles and runs for single_file = .false. and single domain.
still needs testing for different variations.




Modified: DART/branches/rma_fill_inf/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90
===================================================================
--- DART/branches/rma_fill_inf/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90	2018-04-17 15:45:27 UTC (rev 12525)
+++ DART/branches/rma_fill_inf/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90	2018-04-17 17:13:37 UTC (rev 12526)
@@ -2,43 +2,331 @@
 ! by UCAR, "as is", without charge, subject to all terms of use at
 ! http://www.image.ucar.edu/DAReS/DART/DART_download
 !
-! $Id$ 
+! $Id$
 
-! THIS PROGRAM HAS BEEN OBSOLETED by converting our restart files to
-! NetCDF format.  you can assign a value with 'ncap2', one of the NCO
-! utility program.  for now i'm going to leave the mkmf and path_names
-! files around and the program will just print out a helpful message.
-! in a few months/years we should remove this program entirely.
-!
-! here's an example of using ncap2 to set the T,U and V inf values:
-!  ncap2 -s 'T=1.0;U=1.0;V=1.0' wrfinput_d01 prior_inf.nc
-!  ncap2 -s 'T=0.6;U=0.6;V=0.6' wrfinput_d01 prior_sd.nc 
-!
-! this works as long as you have at least version 4.4.2 of the NCO utils.
-! some earlier versions change the full 3d arrays into a single scalar.
-! if you see this, get a more recent version of the nco tools.
-!
-! nsc 27jul2016
+!----------------------------------------------------------------------
+!> purpose: test model_mod routines.  this version works for models
+!> with any location type.  depends on a location-specific module
+!> for test_interpolate_single and test_interpolate_range.
+!----------------------------------------------------------------------
 
 program fill_inflation_restart
 
-write(*,*) ''
-write(*,*) 'This program is OBSOLETE since DART inflation files are now in NetCDF format.' 
-write(*,*) 'To fill an initial inflation file use one of the standard NCO utilities like "ncap2" with'
-write(*,*) 'a copy of a model restart file to set the initial inflation mean, and a second file'
-write(*,*) 'for the initial inflation standard deviation.  Inflation mean and sd values now'
-write(*,*) 'are formatted in the files exactly like restart values, e.g. arranged by variable'
-write(*,*) 'type like T, U, V, etc.'
-write(*,*) ''
-write(*,*) 'Here is an example using version 4.4.2 or later of the NCO tools:'
-write(*,*) '  ncap2 -s "T=1.0;U=1.0;V=1.0" wrfinput_d01 prior_inf.nc'
-write(*,*) '  ncap2 -s "T=0.6;U=0.6;V=0.6" wrfinput_d01 prior_sd.nc'
-write(*,*) ''
+use             types_mod, only : r8, i8, missing_r8, metadatalength
 
+use         utilities_mod, only : register_module, error_handler, E_MSG, E_ERR, &
+                                  find_namelist_in_file, check_namelist_read,   &
+                                  initialize_utilities, finalize_utilities
+
+use       assim_model_mod, only : static_init_assim_model
+
+use      time_manager_mod, only : time_type, set_time, print_time, print_date, operator(-), &
+                                  get_calendar_type, NO_CALENDAR
+
+use  ensemble_manager_mod, only : init_ensemble_manager, ensemble_type
+
+use   state_vector_io_mod, only : state_vector_io_init, read_state, write_state
+
+use   state_structure_mod, only : get_num_domains, get_model_variable_indices, &
+                                  state_structure_info
+
+use      io_filenames_mod, only : io_filenames_init, file_info_type,       &
+                                  stage_metadata_type, get_stage_metadata, &
+                                  get_restart_filename,                    &
+                                  set_file_metadata, file_info_dump,       &
+                                  set_io_copy_flag, READ_COPY, WRITE_COPY
+
+use             model_mod, only : static_init_model, get_model_size,       &
+                                  get_state_meta_data, model_interpolate
+
+use     mpi_utilities_mod, only : initialize_mpi_utilities, finalize_mpi_utilities
+
+use netcdf
+
+implicit none
+
+! version controlled file description for error handling, do not edit
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len=32 ), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
+
+
+! this is max number of domains times number of ensemble members
+! if you have more than one domain and your ensemble members are
+! in separate files, the names should be listed in this order:
+!  all filenames for ensemble members for domain 1
+!  all filenames for ensemble members for domain 2, etc
+
+integer, parameter :: MAX_FILES = 1000
+
+!------------------------------------------------------------------
+! The namelist variables
+!------------------------------------------------------------------
+
+logical                       :: single_file = .false.
+integer                       :: num_ens = 2 !#! {prior,posterior}_inf_{mean,sd}
+character(len=256)            :: input_state_files(MAX_FILES)  = 'null'


More information about the Dart-dev mailing list