[Dart-dev] DART/trunk Revision: 12124

dart at ucar.edu dart at ucar.edu
Mon Nov 20 14:27:16 MST 2017


nancy at ucar.edu
2017-11-20 14:27:14 -0700 (Mon, 20 Nov 2017)
62
added forward operator for raising the obs value
to a power.




Modified: DART/trunk/obs_def/obs_def_1d_state_mod.f90
===================================================================
--- DART/trunk/obs_def/obs_def_1d_state_mod.f90	2017-11-20 17:34:32 UTC (rev 12123)
+++ DART/trunk/obs_def/obs_def_1d_state_mod.f90	2017-11-20 21:27:14 UTC (rev 12124)
@@ -7,31 +7,41 @@
 ! BEGIN DART PREPROCESS KIND LIST
 ! RAW_STATE_VARIABLE,    KIND_RAW_STATE_VARIABLE, COMMON_CODE
 ! RAW_STATE_1D_INTEGRAL, KIND_1D_INTEGRAL
+! RAW_STATE_VAR_POWER,   KIND_STATE_VAR_POWER
 ! END DART PREPROCESS KIND LIST
 
 ! BEGIN DART PREPROCESS USE OF SPECIAL OBS_DEF MODULE
 !   use obs_def_1d_state_mod, only : write_1d_integral, read_1d_integral, &
-!                                     interactive_1d_integral, get_expected_1d_integral
+!                                     interactive_1d_integral, get_expected_1d_integral, &
+                                     write_power, read_power, interactive_power, get_expected_power
 ! END DART PREPROCESS USE OF SPECIAL OBS_DEF MODULE
 
 ! BEGIN DART PREPROCESS GET_EXPECTED_OBS_FROM_DEF
 !         case(RAW_STATE_1D_INTEGRAL)                                                         
 !            call get_expected_1d_integral(state, location, obs_def%key, obs_val, istatus)  
+!         case(RAW_STATE_VAR_POWER)
+!            call get_expected_power(state, location, obs_def%key, obs_val, istatus)  
 ! END DART PREPROCESS GET_EXPECTED_OBS_FROM_DEF
 
 ! BEGIN DART PREPROCESS READ_OBS_DEF
 !      case(RAW_STATE_1D_INTEGRAL)
 !         call read_1d_integral(obs_def%key, ifile, fform)
+!      case(RAW_STATE_VAR_POWER)
+!         call read_power(obs_def%key, ifile, fform)
 ! END DART PREPROCESS READ_OBS_DEF
 
 ! BEGIN DART PREPROCESS WRITE_OBS_DEF
 !      case(RAW_STATE_1D_INTEGRAL)
 !         call write_1d_integral(obs_def%key, ifile, fform)
+!      case(RAW_STATE_VAR_POWER)
+!         call write_power(obs_def%key, ifile, fform)
 ! END DART PREPROCESS WRITE_OBS_DEF
 
 ! BEGIN DART PREPROCESS INTERACTIVE_OBS_DEF
 !      case(RAW_STATE_1D_INTEGRAL)
 !         call interactive_1d_integral(obs_def%key)
+!      case(RAW_STATE_VAR_POWER)
+!         call interactive_power(obs_def%key)
 ! END DART PREPROCESS INTERACTIVE_OBS_DEF
 
 ! BEGIN DART PREPROCESS MODULE CODE
@@ -47,6 +57,7 @@
                              ! nmlfileunit, do_nml_file, do_nml_term
                              !! Routines only needed for namelist support. NML1
 use     location_mod, only : location_type, set_location, get_location 
+use     obs_kind_mod, only : KIND_RAW_STATE_VARIABLE
 use  assim_model_mod, only : interpolate
 use   cov_cutoff_mod, only : comp_cov_factor
 
@@ -55,16 +66,22 @@
 ! These are the required interfaces for an obs_def module.  
 public :: write_1d_integral, read_1d_integral, &
           interactive_1d_integral, get_expected_1d_integral, &
-          set_1d_integral
+          set_1d_integral, &
+          write_power, read_power, interactive_power, get_expected_power, set_power
 
 ! Storage for the special information required for observations of this type
-integer               :: num_1d_integral_obs = 0     ! current count of obs
-integer               :: max_1d_integral_obs = 1000  ! allocation size limit
-real(r8), allocatable :: half_width(:)         ! metadata storage
-integer,  allocatable :: num_points(:)         ! ditto
-integer,  allocatable :: localization_type(:)  ! ditto
+integer               :: num_1d_integral_obs = 0       ! current count of obs
+integer               :: max_1d_integral_obs = 100000  ! allocation size limit
+real(r8), allocatable :: half_width(:)                 ! metadata storage
+integer,  allocatable :: num_points(:)                 ! ditto
+integer,  allocatable :: localization_type(:)          ! ditto
 
+! Storage for the power forward operator
+integer               :: num_power_obs = 0           ! current count of obs
+integer               :: max_power_obs = 100000      ! allocation size limit
+real(r8), allocatable :: power(:)                    ! metadata storage
 
+
 ! Set to .true. to get debugging output
 logical :: debug = .false.
 
@@ -78,7 +95,7 @@
 logical, save :: module_initialized = .false.
 
 !! To enable the namelist, comment this in.  NML2
-!namelist /one_d_integral_nml/  debug, max_1d_integral_obs
+!namelist /one_d_integral_nml/  debug, max_1d_integral_obs, max_power_obs
 
 contains
 
@@ -113,10 +130,12 @@
 !if (do_nml_file()) write(nmlfileunit, nml=one_d_integral_nml)
 !if (do_nml_term()) write(     *     , nml=one_d_integral_nml)
 
-! Allocate space for the metadata
+! Allocate space for the metadata for the integral observation
 allocate(half_width(max_1d_integral_obs),  &
          num_points(max_1d_integral_obs),  &


More information about the Dart-dev mailing list