[Dart-dev] DART/branches Revision: 13001
dart at ucar.edu
dart at ucar.edu
Mon Mar 4 11:47:38 MST 2019
nancy at ucar.edu
2019-03-04 11:47:38 -0700 (Mon, 04 Mar 2019)
318
incorporate kevin's changes to create input inflation files
that have names consistent with what filter expects. fix up
the nml file to have a trailing /; add info to the documentation
about what filenames it will create; remove unused code from
the source and add some more comments about what's there and
working.
Modified: DART/branches/recam/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90
===================================================================
--- DART/branches/recam/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90 2019-03-04 18:20:14 UTC (rev 13000)
+++ DART/branches/recam/assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.f90 2019-03-04 18:47:38 UTC (rev 13001)
@@ -169,7 +169,9 @@
file_array_output = file_array_input
endif
-! Test the read portion.
+! set up the files to be read - the data will not be used.
+! the variables and shape of them are a template for the
+! inflation values.
call io_filenames_init(file_info_input, &
ncopies = num_ens, &
cycling = single_file, &
@@ -191,25 +193,12 @@
cnum = 1, &
io_flag = READ_COPY)
-!#! write(my_base,'(A)') 'sd_template'
-!#! write(my_desc,'(A)') 'sd template'
-!#! call set_file_metadata(file_info_input, &
-!#! cnum = 2, &
-!#! fnames = file_array_input(2,:), &
-!#! basename = my_base, &
-!#! desc = my_desc)
-!#!
-!#! call set_io_copy_flag(file_info_input, &
-!#! cnum = 2, &
-!#! io_flag = READ_COPY)
-
input_restart_files = get_stage_metadata(file_info_input)
do idom = 1, num_domains
- ! do imem = 1, num_ens
- imem = 1
- write(*, *) '- Reading File : ', trim(get_restart_filename(input_restart_files, copy=imem, domain=idom))
- ! enddo
+ imem = 1
+ write(*, *) '- Reading File : ', &
+ trim(get_restart_filename(input_restart_files, copy=imem, domain=idom))
enddo
call read_state(ens_handle, file_info_input, read_time_from_file, model_time)
@@ -218,15 +207,6 @@
call nc_insert_variable('filter_input.nc', varname='prior_inf_mean', copynum=1)
else
-
- !#! call write_extra_variables(file_info_input%ncFileID, model_state, copyname, curr_ens_time, timeindex)
- !#! if (single_file) then
- !#! write(*, *) '- Writting Augmented State : '
- !#! call write_augmented_state(ens_handle, file_info_input)
- !#! return
- !#! endif
-
- ! Test the write portion.
call io_filenames_init(file_info_output, &
ncopies = num_ens, &
cycling = single_file, &
@@ -233,6 +213,13 @@
single_file = single_file, &
restart_files = file_array_output)
+ ! The inflation file names should match the hardcoded names
+ ! that filter requires. (We no longer allow the user to specify
+ ! the inflation names, to simplify the number of namelist items.)
+ !
+ ! We will create input_priorinf_mean.nc and input_priorinf_sd.nc
+ ! and/or input_postinf_mean.nc and input_postinf_sd.nc
+
if(write_prior_inf) then
call fill_inflation_files(prior_inf_mean, prior_inf_sd, 'prior')
endif
@@ -240,6 +227,7 @@
if(write_post_inf) then
call fill_inflation_files(post_inf_mean, post_inf_sd, 'post')
endif
+
endif
deallocate(file_array_input, file_array_output)
@@ -250,6 +238,7 @@
contains
!======================================================================
+!----------------------------------------------------------------------
!> fill inflation values in a separate file
subroutine fill_inflation_files(inf_mean, inf_sd, stage)
@@ -266,7 +255,7 @@
ens_handle%copies(ss_inflate_index , :) = prior_inf_mean
ens_handle%copies(ss_inflate_sd_index, :) = prior_inf_sd
-write(my_stage,'(2A)') stage, '_inflation'
+write(my_stage,'(3A)') 'input_',stage,'inf'
write(my_base, '(A)') 'mean'
write(my_desc, '(2A)') stage, ' inflation mean'
call set_file_metadata(file_info_output, &
@@ -301,9 +290,14 @@
enddo
More information about the Dart-dev
mailing list