[Dart-dev] [3240] DART/branches/nancy_work/filter: My test branch only! Testing a variant of inflation.

nancy at subversion.ucar.edu nancy at subversion.ucar.edu
Fri Feb 15 11:21:54 MST 2008


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20080215/63d0199d/attachment.html
-------------- next part --------------
Modified: DART/branches/nancy_work/filter/filter.dopplerfold.f90
===================================================================
--- DART/branches/nancy_work/filter/filter.dopplerfold.f90	2008-02-15 16:05:33 UTC (rev 3239)
+++ DART/branches/nancy_work/filter/filter.dopplerfold.f90	2008-02-15 18:21:54 UTC (rev 3240)
@@ -118,6 +118,7 @@
                         inf_diag_file_name(2)     = 'not_initialized'
 real(r8)             :: inf_initial(2)            = 1.0_r8
 real(r8)             :: inf_sd_initial(2)         = 0.0_r8
+real(r8)             :: inf_damping(2)            = 1.0_r8
 real(r8)             :: inf_lower_bound(2)        = 1.0_r8
 real(r8)             :: inf_upper_bound(2)        = 1000000.0_r8
 real(r8)             :: inf_sd_lower_bound(2)     = 0.0_r8
@@ -131,7 +132,7 @@
                       num_output_obs_members, output_interval, num_groups, outlier_threshold, &
                       input_qc_threshold, output_forward_op_errors, output_timestamps, &
                       inf_flavor, inf_initial_from_restart, inf_sd_initial_from_restart, &
-                      inf_output_restart, inf_deterministic, inf_in_file_name, &
+                      inf_output_restart, inf_deterministic, inf_in_file_name, inf_damping, &
                       inf_out_file_name, inf_diag_file_name, inf_initial, inf_sd_initial, &
                       inf_lower_bound, inf_upper_bound, inf_sd_lower_bound, output_inflation
 
@@ -281,17 +282,17 @@
 ! Initialize the output sequences and state files and set their meta data
 if(my_task_id() == 0) then
    call filter_generate_copy_meta_data(seq, prior_inflate, &
-   PriorStateUnit, PosteriorStateUnit, in_obs_copy, output_state_mean_index, &
-   output_state_spread_index, prior_obs_mean_index, posterior_obs_mean_index, &
-   prior_obs_spread_index, posterior_obs_spread_index)
+      PriorStateUnit, PosteriorStateUnit, in_obs_copy, output_state_mean_index, &
+      output_state_spread_index, prior_obs_mean_index, posterior_obs_mean_index, &
+      prior_obs_spread_index, posterior_obs_spread_index)
    if(ds) call smoother_gen_copy_meta_data(num_output_state_members, output_inflation)
 else
-  output_state_mean_index = 0
-  output_state_spread_index = 0
-  prior_obs_mean_index = 0
-  posterior_obs_mean_index = 0
-  prior_obs_spread_index = 0 
-  posterior_obs_spread_index = 0
+   output_state_mean_index = 0
+   output_state_spread_index = 0
+   prior_obs_mean_index = 0
+   posterior_obs_mean_index = 0
+   prior_obs_spread_index = 0 
+   posterior_obs_spread_index = 0
 endif
 
 ! Need to find first obs with appropriate time, delete all earlier ones
@@ -378,6 +379,13 @@
 
    ! Compute mean and spread for inflation and state diagnostics
    call all_vars_to_all_copies(ens_handle)
+
+   ! TRY RELAXING THE INFLATION HERE; HAVE ALL COPIES SO EASY TO CODE DAMPING
+   ens_handle%copies(PRIOR_INF_COPY, :) = 1.0_r8 + &
+      inf_damping(1) * (ens_handle%copies(PRIOR_INF_COPY, :) - 1.0_r8) 
+   ens_handle%copies(POST_INF_COPY, :) = 1.0_r8 + &
+      inf_damping(2) * (ens_handle%copies(POST_INF_COPY, :) - 1.0_r8) 
+
    call compute_copy_mean_sd(ens_handle, 1, ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
 
    if(do_single_ss_inflate(prior_inflate) .or. do_varying_ss_inflate(prior_inflate)) then
@@ -504,34 +512,34 @@
       !  sd < 0, then bypass this entire code block altogether for speed.
       if ((inf_sd_initial(2) >= 0.0_r8) .or. inf_sd_initial_from_restart(2)) then
 
-      ! Ship the ensemble mean to the model; some models need this for computing distances
-      ! Who stores the ensemble mean copy
-      call get_copy_owner_index(ENS_MEAN_COPY, mean_owner, mean_owners_index)
-      ! Broadcast it to everybody else
-      if(my_task_id() == mean_owner) then
-         ens_mean = ens_handle%vars(:, mean_owners_index)
-         call broadcast_send(mean_owner, ens_mean)
-      else
-         call broadcast_recv(mean_owner, ens_mean)
-      endif
-   
-      ! Now send the mean to the model in case it's needed
-      call ens_mean_for_model(ens_mean)
+         ! Ship the ensemble mean to the model; some models need this for computing distances
+         ! Who stores the ensemble mean copy
+         call get_copy_owner_index(ENS_MEAN_COPY, mean_owner, mean_owners_index)
+         ! Broadcast it to everybody else
+         if(my_task_id() == mean_owner) then
+            ens_mean = ens_handle%vars(:, mean_owners_index)
+            call broadcast_send(mean_owner, ens_mean)
+         else
+            call broadcast_recv(mean_owner, ens_mean)
+         endif
 
-      ! Need obs to be copy complete for assimilation: IS NEXT LINE REQUIRED???
-      call all_vars_to_all_copies(obs_ens_handle)
-      if (output_timestamps) then
-         if (do_output()) call timestamp("Before posterior inflation", pos='debug')
-      endif
-      call filter_assim(ens_handle, obs_ens_handle, seq, keys, ens_size, num_groups, &
-         obs_val_index, post_inflate, ENS_MEAN_COPY, ENS_SD_COPY, &
-         POST_INF_COPY, POST_INF_SD_COPY, OBS_KEY_COPY, OBS_GLOBAL_QC_COPY, &
-         OBS_PRIOR_MEAN_START, OBS_PRIOR_MEAN_END, OBS_PRIOR_VAR_START, &
-         OBS_PRIOR_VAR_END, inflate_only = .true.)
-      if (output_timestamps) then
-         if (do_output()) call timestamp("After posterior inflation", pos='debug')
-      endif
-      call all_copies_to_all_vars(ens_handle)
+         ! Now send the mean to the model in case it's needed
+         call ens_mean_for_model(ens_mean)
+  
+         ! Need obs to be copy complete for assimilation: IS NEXT LINE REQUIRED???
+         call all_vars_to_all_copies(obs_ens_handle)
+         if (output_timestamps) then
+            if (do_output()) call timestamp("Before posterior inflation", pos='debug')
+         endif
+         call filter_assim(ens_handle, obs_ens_handle, seq, keys, ens_size, num_groups, &
+            obs_val_index, post_inflate, ENS_MEAN_COPY, ENS_SD_COPY, &
+            POST_INF_COPY, POST_INF_SD_COPY, OBS_KEY_COPY, OBS_GLOBAL_QC_COPY, &
+            OBS_PRIOR_MEAN_START, OBS_PRIOR_MEAN_END, OBS_PRIOR_VAR_START, &
+            OBS_PRIOR_VAR_END, inflate_only = .true.)
+         if (output_timestamps) then
+            if (do_output()) call timestamp("After posterior inflation", pos='debug')
+         endif
+         call all_copies_to_all_vars(ens_handle)
 
       endif  ! sd >= 0 or sd from restart file
    endif  ! if doing state space posterior inflate

Modified: DART/branches/nancy_work/filter/filter.f90
===================================================================
--- DART/branches/nancy_work/filter/filter.f90	2008-02-15 16:05:33 UTC (rev 3239)
+++ DART/branches/nancy_work/filter/filter.f90	2008-02-15 18:21:54 UTC (rev 3240)
@@ -118,6 +118,7 @@
                         inf_diag_file_name(2)     = 'not_initialized'
 real(r8)             :: inf_initial(2)            = 1.0_r8
 real(r8)             :: inf_sd_initial(2)         = 0.0_r8
+real(r8)             :: inf_damping(2)            = 1.0_r8
 real(r8)             :: inf_lower_bound(2)        = 1.0_r8
 real(r8)             :: inf_upper_bound(2)        = 1000000.0_r8
 real(r8)             :: inf_sd_lower_bound(2)     = 0.0_r8
@@ -131,7 +132,7 @@
                       num_output_obs_members, output_interval, num_groups, outlier_threshold, &
                       input_qc_threshold, output_forward_op_errors, output_timestamps, &
                       inf_flavor, inf_initial_from_restart, inf_sd_initial_from_restart, &
-                      inf_output_restart, inf_deterministic, inf_in_file_name, &
+                      inf_output_restart, inf_deterministic, inf_in_file_name, inf_damping, &
                       inf_out_file_name, inf_diag_file_name, inf_initial, inf_sd_initial, &
                       inf_lower_bound, inf_upper_bound, inf_sd_lower_bound, output_inflation
 
@@ -374,6 +375,13 @@
 
    ! Compute mean and spread for inflation and state diagnostics
    call all_vars_to_all_copies(ens_handle)
+
+   ! TRY RELAXING THE INFLATION HERE; HAVE ALL COPIES SO EASY TO CODE DAMPING
+   ens_handle%copies(PRIOR_INF_COPY, :) = 1.0_r8 + &
+      inf_damping(1) * (ens_handle%copies(PRIOR_INF_COPY, :) - 1.0_r8) 
+   ens_handle%copies(POST_INF_COPY, :) = 1.0_r8 + &
+      inf_damping(2) * (ens_handle%copies(POST_INF_COPY, :) - 1.0_r8) 
+
    call compute_copy_mean_sd(ens_handle, 1, ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
 
    if(do_single_ss_inflate(prior_inflate) .or. do_varying_ss_inflate(prior_inflate)) then

Modified: DART/branches/nancy_work/filter/filter.html
===================================================================
--- DART/branches/nancy_work/filter/filter.html	2008-02-15 16:05:33 UTC (rev 3239)
+++ DART/branches/nancy_work/filter/filter.html	2008-02-15 18:21:54 UTC (rev 3240)
@@ -175,6 +175,7 @@
    inf_diag_file_name,
    inf_initial,
    inf_sd_initial,
+   inf_damping,
    inf_lower_bound,
    inf_upper_bound,
    inf_sd_lower_bound
@@ -376,6 +377,11 @@
                         values will adapt through time, so they are time-varying.
                         Default: (/0.0_r8, 0.0_r8/)</TD></TR>
 
+ <TR><!--contents--><TD valign=top>inf_damping</TD>
+     <!--  type  --><TD valign=top>real(r8) (len=2)</TD>
+     <!--descript--><TD>Damping factor for inflation mean values.
+                        Default: (/1.0_r8, 1.0_r8/)</TD></TR>
+
  <TR><!--contents--><TD valign=top>inf_lower_bound</TD>
      <!--  type  --><TD valign=top>real(r8) (len=2)</TD>
      <!--descript--><TD>Lower bound for inflation value.

Modified: DART/branches/nancy_work/filter/filter.nml
===================================================================
--- DART/branches/nancy_work/filter/filter.nml	2008-02-15 16:05:33 UTC (rev 3239)
+++ DART/branches/nancy_work/filter/filter.nml	2008-02-15 18:21:54 UTC (rev 3240)
@@ -34,6 +34,7 @@
    inf_diag_file_name          = 'not_initialized',       'not_initialized',
    inf_initial                 = 1.0,                     1.0,
    inf_sd_initial              = 0.0,                     0.0,
+   inf_damping                 = 1.0,                     1.0,
    inf_lower_bound             = 1.0,                     1.0,
    inf_upper_bound             = 1000000.0,               1000000.0,
    inf_sd_lower_bound          = 0.0,                     0.0


More information about the Dart-dev mailing list