-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: force standard gamma and beta in distribution in qceff table read
issues #717 #786 Added developer test to check forced values are set correctly Required changes to run_all.sh for qceff tests to deal with input.nml
- Loading branch information
1 parent
538d238
commit e0fb360
Showing
8 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
! DART software - Copyright UCAR. This open source software is provided | ||
! by UCAR, "as is", without charge, subject to all terms of use at | ||
! http://www.image.ucar.edu/DAReS/DART/DART_download | ||
|
||
program test_force_bounds | ||
|
||
use algorithm_info_mod, only : init_algorithm_info_mod, end_algorithm_info_mod, probit_dist_info | ||
use distribution_params_mod, only : GAMMA_DISTRIBUTION, BETA_DISTRIBUTION, NORMAL_DISTRIBUTION | ||
use utilities_mod, only : initialize_utilities, finalize_utilities | ||
use obs_kind_mod, only : QTY_AQUIFER_WATER, QTY_AMMONIUM_SULPHATE | ||
use types_mod, only : r8, MISSING_R8 | ||
|
||
use test | ||
|
||
implicit none | ||
|
||
logical :: is_state, is_inflation | ||
logical :: bounded_below, bounded_above | ||
real(r8) :: lower_bound, upper_bound | ||
integer :: dist_type | ||
|
||
|
||
call initialize_utilities('test_table_read') | ||
|
||
call init_algorithm_info_mod() | ||
|
||
! QTY1 | ||
! inflation GAMMA | ||
call probit_dist_info(QTY_AQUIFER_WATER, .false., .true., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == GAMMA_DISTRIBUTION) | ||
call ok(bounded_below) | ||
call ok(.not. bounded_above) | ||
call ok(lower_bound == 0.0_r8) | ||
call ok(upper_bound == MISSING_R8) | ||
|
||
! state BETA | ||
call probit_dist_info(QTY_AQUIFER_WATER, .true., .false., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == BETA_DISTRIBUTION) | ||
call ok(bounded_below) | ||
call ok(bounded_above) | ||
call ok(lower_bound == 0.0_r8) | ||
call ok(upper_bound == 1.0_r8) | ||
|
||
! extended state NORMAL | ||
call probit_dist_info(QTY_AQUIFER_WATER, .false., .false., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == NORMAL_DISTRIBUTION) | ||
call ok(.not. bounded_below) | ||
call ok(.not. bounded_above) | ||
call ok(lower_bound == MISSING_R8) | ||
call ok(upper_bound == MISSING_R8) | ||
|
||
|
||
! QTY2 | ||
! inflation BETA | ||
call probit_dist_info(QTY_AMMONIUM_SULPHATE , .false., .true., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == BETA_DISTRIBUTION) | ||
call ok(bounded_below) | ||
call ok(bounded_above) | ||
call ok(lower_bound == 0.0_r8) | ||
call ok(upper_bound == 1.0_r8) | ||
|
||
! state GAMMA | ||
call probit_dist_info(QTY_AMMONIUM_SULPHATE , .true., .false., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == GAMMA_DISTRIBUTION) | ||
call ok(bounded_below) | ||
call ok(.not. bounded_above) | ||
call ok(lower_bound == 0.0_r8) | ||
call ok(upper_bound == MISSING_R8) | ||
|
||
! extended state BETA | ||
call probit_dist_info(QTY_AMMONIUM_SULPHATE , .false., .false., dist_type, & | ||
bounded_below, bounded_above, lower_bound, upper_bound) | ||
|
||
call ok(dist_type == BETA_DISTRIBUTION) | ||
call ok(bounded_below) | ||
call ok(bounded_above) | ||
call ok(lower_bound == 0.0_r8) | ||
call ok(upper_bound == 1.0_r8) | ||
|
||
|
||
call end_algorithm_info_mod() | ||
|
||
call finalize_utilities() | ||
|
||
end program test_force_bounds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
&utilities_nml | ||
TERMLEVEL = 1, | ||
module_details = .false. | ||
logfilename = 'dart_log.out' | ||
/ | ||
|
||
# pick a random set of inputs | ||
&preprocess_nml | ||
overwrite_output = .true. | ||
input_obs_qty_mod_file = '../../../assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90' | ||
output_obs_qty_mod_file = '../../../assimilation_code/modules/observations/obs_kind_mod.f90' | ||
input_obs_def_mod_file = '../../../observations/forward_operators/DEFAULT_obs_def_mod.F90' | ||
output_obs_def_mod_file = '../../../observations/forward_operators/obs_def_mod.f90' | ||
obs_type_files = '../../../observations/forward_operators/obs_def_reanalysis_bufr_mod.f90', | ||
'../../../observations/forward_operators/obs_def_radar_mod.f90', | ||
'../../../observations/forward_operators/obs_def_metar_mod.f90', | ||
'../../../observations/forward_operators/obs_def_dew_point_mod.f90', | ||
'../../../observations/forward_operators/obs_def_rel_humidity_mod.f90', | ||
'../../../observations/forward_operators/obs_def_altimeter_mod.f90', | ||
'../../../observations/forward_operators/obs_def_gps_mod.f90', | ||
'../../../observations/forward_operators/obs_def_vortex_mod.f90', | ||
'../../../observations/forward_operators/obs_def_gts_mod.f90', | ||
'../../../observations/forward_operators/obs_def_QuikSCAT_mod.f90' | ||
quantity_files = '../../../assimilation_code/modules/observations/default_quantities_mod.f90', | ||
/ | ||
|
||
&obs_kind_nml | ||
/ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
QCEFF table version: 1,obs_error_info,,,,probit_inflation,,,,,probit_state,,,,,probit_extended_state,,,,,obs_inc_info,,,, | ||
QTY_NAME,bounded_below,bounded_above,lower_bound,upper_bound,dist_type,bounded_below,bounded_above,lower_bound,upper_bound,dist_type,bounded_below,bounded_above,lower_bound,upper_bound,dist_type,bounded_below,bounded_above,lower_bound,upper_bound,filter_kind,bounded_below,bounded_above,lower_bound,upper_bound | ||
QTY_AQUIFER_WATER,.false.,.false.,-888888,-888888,GAMMA_DISTRIBUTION,.false.,.true.,-888888,1234,BETA_DISTRIBUTION,.false.,.false.,-888888,-888888,NORMAL_DISTRIBUTION,.false.,.false.,-888888,-888888,EAKF,.false.,.false.,-888888,-888888 | ||
QTY_AMMONIUM_SULPHATE ,.false.,.false.,-888888,-888888,BETA_DISTRIBUTION,.false.,.true.,-888888,-145.6,GAMMA_DISTRIBUTION,.false.,.false.,45,44,BETA_DISTRIBUTION,.false.,.false.,-888888,-888888,EAKF,.false.,.false.,-888888,-888888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters