[Dart-dev] DART/branches Revision: 11849
dart at ucar.edu
dart at ucar.edu
Mon Jul 31 11:21:36 MDT 2017
nancy at ucar.edu
2017-07-31 11:21:33 -0600 (Mon, 31 Jul 2017)
272
added gamma, inverse gamma, and exponential distributions to the
random number generator code. includes updated documentation
and a range of test programs to verify correctness.
also updated the CHANGELOG in preparation for pushing these
changes to the release branch.
Modified: DART/branches/rma_trunk/CHANGELOG
===================================================================
--- DART/branches/rma_trunk/CHANGELOG 2017-07-28 17:02:45 UTC (rev 11848)
+++ DART/branches/rma_trunk/CHANGELOG 2017-07-31 17:21:33 UTC (rev 11849)
@@ -476,7 +476,7 @@
in the repository. (Remove it from any private path_names_* files.)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-+ July 18 2017 :: bug fixes, documentation updates. $Revision$
++ July 18 2017 :: bug fixes, documentation updates. Revision: 11830
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- fixed bug in obs_impact_tool when generating the run-time table. specifying
@@ -491,9 +491,30 @@
names changed from 'restart' to 'state' for input and output files.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-+ MMMM DD 2017 :: next revision summary. Revision:
++ July 31 2017 :: single filenames, random distributions, bug fixes. $Revision$
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+- added code to support listing input and output filenames directly in the
+ namelist instead of having to go through an indirect text file. most useful
+ for programs that take a single input and output file, but works for all cases.
+
+- bug fix in location_io_mod.f90 that affected obs_seq_to_netcdf (error in adding
+ vertical location types to output file).
+
+- fix to convert_gpsro_bufr.f90 converter (GPS obs from BUFR files) that failed
+ if r8 defined to be r4.
+
+- added draws from gamma, inverse gamma, and exponential distributions to the
+ random sequence module.
+
+- various updates to the CAM scripts to work more smoothly with the most
+ recent CIME changes and DART Manhattan updates.
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ MMM DD 2017 :: next revision summary. Revision:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
# <next few lines under version control, do not edit>
# $URL$
# $Revision$
Modified: DART/branches/rma_trunk/assimilation_code/modules/utilities/random_seq_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/utilities/random_seq_mod.f90 2017-07-28 17:02:45 UTC (rev 11848)
+++ DART/branches/rma_trunk/assimilation_code/modules/utilities/random_seq_mod.f90 2017-07-31 17:21:33 UTC (rev 11849)
@@ -4,6 +4,10 @@
!
! $Id$
+!> Random number and random sequence routines. Can generate random draws
+!> from a uniform distribution or random draws from differently shaped
+!> distributions (e.g. gaussian, gamma, exponential)
+
module random_seq_mod
! This module now contains both the original contents and the routines
@@ -15,8 +19,15 @@
implicit none
private
-public :: random_seq_type, init_random_seq, random_gaussian, &
- several_random_gaussians, random_uniform, twod_gaussians
+public :: random_seq_type, &
+ init_random_seq, &
+ random_uniform, &
+ random_gaussian, &
+ several_random_gaussians, &
+ twod_gaussians, &
+ random_gamma, &
+ random_inverse_gamma, &
+ random_exponential
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
@@ -35,7 +46,8 @@
integer :: seq_number = -1
! the following routines were transcribed from C to F90, originally
-! from the GNU scientific library: init_ran, ran_unif, ran_gauss
+! from the GNU scientific library: init_ran, ran_unif, ran_gauss,
+! ran_gamma
integer, parameter :: N = 624 ! period parameters
integer, parameter :: M = 397
@@ -51,7 +63,7 @@
type random_seq_type
private
integer :: mti
- integer(i8) :: mt(0:N-1) ! FIXME: move this to 1:N once its working
+ integer(i8) :: mt(0:N-1)
real(r8) :: lastg
logical :: gset
end type random_seq_type
@@ -62,20 +74,21 @@
contains
More information about the Dart-dev
mailing list