[Dart-dev] [6183] DART/branches/development/models/forced_barot: start of cleaning up this model.
nancy at ucar.edu
nancy at ucar.edu
Wed May 29 10:11:59 MDT 2013
Revision: 6183
Author: nancy
Date: 2013-05-29 10:11:59 -0600 (Wed, 29 May 2013)
Log Message:
-----------
start of cleaning up this model. it still is calling some
NAG functions that we don't have, and it hasn't been updated
completely to match the current model_mod interface specs.
but it's closer.
Modified Paths:
--------------
DART/branches/development/models/forced_barot/barot_obs_random.f90
DART/branches/development/models/forced_barot/model_mod.f90
DART/branches/development/models/forced_barot/obs/real_obs.f90
Added Paths:
-----------
DART/branches/development/models/forced_barot/work/
DART/branches/development/models/forced_barot/work/input.nml
DART/branches/development/models/forced_barot/work/mkmf_filter
DART/branches/development/models/forced_barot/work/mkmf_perfect_model_obs
DART/branches/development/models/forced_barot/work/mkmf_preprocess
DART/branches/development/models/forced_barot/work/mkmf_wakeup_filter
DART/branches/development/models/forced_barot/work/path_names_filter
DART/branches/development/models/forced_barot/work/path_names_perfect_model_obs
DART/branches/development/models/forced_barot/work/path_names_preprocess
DART/branches/development/models/forced_barot/work/path_names_wakeup_filter
DART/branches/development/models/forced_barot/work/quickbuild.csh
-------------- next part --------------
Modified: DART/branches/development/models/forced_barot/barot_obs_random.f90
===================================================================
--- DART/branches/development/models/forced_barot/barot_obs_random.f90 2013-05-29 16:08:55 UTC (rev 6182)
+++ DART/branches/development/models/forced_barot/barot_obs_random.f90 2013-05-29 16:11:59 UTC (rev 6183)
@@ -11,10 +11,10 @@
! $Date$
use types_mod, only : r8
-use nag_wrap_mod, only : g05ddf_wrap
+use random_seq_mod, only : random_seq_type, init_random_seq, random_gaussian
-! Currently uses NAG, must be modified to use available random sequence
-! generators.
+! this routine used to call a special NAG subroutine but we have a
+! replacement one in the system now.
! Places a given number of observations randomly uniformly on the sphere
! Used to test barotropic model ability to deal with increasingly sparse
@@ -32,16 +32,19 @@
real(r8), parameter :: variance = (1e6)**2_r8
real(r8) :: x, y, z, lon, length, lat
integer :: i
+type(random_seq_type) :: s
+call init_random_sequence(s)
+
write(*, *) 'input the number of observations'
read(*, *) num_obs
write(*, *) num_obs
do i = 1, num_obs
! Compute a random point in a volume and then compute direction to surface
- 11 x = g05ddf_wrap(0.0_r8, 1.0_r8)
- y = g05ddf_wrap(0.0_r8, 1.0_r8)
- z = g05ddf_wrap(0.0_r8, 1.0_r8)
+11 x = random_gaussian(0.0_r8, 1.0_r8)
+ y = random_gaussian(0.0_r8, 1.0_r8)
+ z = random_gaussian(0.0_r8, 1.0_r8)
! Begin by computing longitude in degrees
lon = atan2(y, x) * 360.0 / (2.0 * 3.14159) + 180.0
if(lon < 0.0 .or. lon > 360.0) then
Modified: DART/branches/development/models/forced_barot/model_mod.f90
===================================================================
--- DART/branches/development/models/forced_barot/model_mod.f90 2013-05-29 16:08:55 UTC (rev 6182)
+++ DART/branches/development/models/forced_barot/model_mod.f90 2013-05-29 16:11:59 UTC (rev 6183)
@@ -10,24 +10,26 @@
! $Revision$
! $Date$
-! This is a non-divergent barotropic model on the sphere. Currently makes
-! use of NAG based transforms which are not available on NCAR systems.
+! This is a non-divergent barotropic model on the sphere.
+! use the 2d sphere locations mod to compile
use types_mod, only : r8
+use location_mod, only : location_type, set_location, get_location
+use kinds_mod, only : KIND_VERTICAL_VORTICITY
+
+! FIXME: we don't have these in the repos
use transforms_mod
use ncd_file_mod
-use nag_wrap_mod, only : g05ddf_wrap
-use loc_and_dist_mod, only : loc_type, get_dist, set_loc
implicit none
private
public :: init_model, get_model_size, lat_max, num_lon, init_conditions, &
adv_1step, advance, &
- output, barot_to_dp, dp_to_barot, delta_t, adv_true_state, &
- dp_to_grid, lon, lat, model_state_location, diag_output_index, &
+ barot_to_dp, dp_to_barot, delta_t, &
+ dp_to_grid, lon, lat, get_state_meta_data, diag_output_index, &
num_fourier, num_spherical, model_output, trans_spherical_to_grid, &
- get_close_pts, grid_to_dp, state_loc
+ grid_to_dp
! version controlled file description for error handling, do not edit
character(len=128), parameter :: &
@@ -35,9 +37,6 @@
revision = "$Revision$", &
revdate = "$Date$"
-! Flag for using real data or perfect model
-logical, parameter :: use_real_data = .false.
-
! Truncation for T42 follows:
! Reduced grid
!integer, parameter :: num_windows = 1, lat_max = 44, num_lon = 84
@@ -58,19 +57,23 @@
real, parameter :: radius = 6.4e6, omega = 7.292e-5
-real :: dif_days, delta_t, real_time
+real :: dif_days, delta_t, real_time
complex :: force(0:num_fourier, 0:num_spherical)
integer :: fourier_lim, spherical_lim
! Following is for standard dynamical systems interface; physical space
+! FIXME: why not times 2 here?
integer, parameter :: model_size = lat_max * num_lon
+! FIXME: i believe the variable here is psi, which is a complex.
+! we need real values in the state vector. papers say the equations
+! solve for vorticity (nu) and psi is the streamfunction.
+! but don't we need a pair of values then for each location?
+
! Definitions of lats and lons
real(r8) :: lat(lat_max), lon(num_lon)
-! Define the location of the state variables in module storage
-type(loc_type) :: state_loc(model_size)
! Define output indices for diagnostics
integer :: diag_output_index(9)
@@ -79,54 +82,43 @@
- subroutine output(x, time)
-!---------------------------------------------------------------------
-! subroutine output(x, time)
-implicit none
-
-real, intent(in) :: x(model_size)
-real, intent(in) :: time
-
-end subroutine output
-
-
-
- function model_state_location()
+ suboutine get_state_meta_data(index_in, location, var_type)
!---------------------------------------------------------------------
-! function model_state_location()
-implicit none
+integer, intent(in) :: index_in
+type(location_type), intent(out) :: location
+integer, optional, intent(out) :: var_type
-type (loc_type) :: model_state_location(model_size)
integer :: i, j, index
-real :: rlat(lat_max), rlon(num_lon)
-! Compute the lat and lons for the Gaussian grid and put them in storage
+! apparently this code expects lat to vary fastest
+! in the linear state vector array
+i = (index_in / lat_max) + 1
+j = index_in - ((i-1) * lat_max)
-call get_deg_lat(rlat)
-call get_deg_lon(rlon)
+location = set_location(lon(i), lat(j))
-lat = rlat
-lon = rlon
+! original code, going other way - here j is the fastest
+! index which is C order, not Fortran:
+!do i = 1, num_lon
+! do j = 1, lat_max
+! index = j + (i - 1)*lat_max
+! call set_loc(model_state_location(index), lon(i), lat(j))
+! end do
+!end do
-! Load these into structure
+if (present(var_type)) then
+ var_type = KIND_VERTICAL_VORTICITY ! FIXME - complex? U,V velocity? flux?
+endif
-do i = 1, num_lon
- do j = 1, lat_max
- index = j + (i - 1)*lat_max
- call set_loc(model_state_location(index), lon(i), lat(j))
- end do
-end do
+end subroutine get_state_meta_data
-end function model_state_location
-
- subroutine barot_init(dif_days_in, delt, force_in, fourier_lim_in, spherical_lim_in)
+ subroutine barot_init(force_in)
!---------------------------------------------------------------------
-! subroutine barot_init(dif_days_in, delt, force_in, fourier_lim_in, spherical_lim_in)
!
! Calls the initialization routines for the spherical harmonic transforms.
! Sets del8 diffusion time on smallest wave, forcing coefficient and
@@ -134,43 +126,16 @@
implicit none
-real, intent(in) :: dif_days_in, delt
complex, intent(in) :: force_in(0:num_fourier, 0:num_spherical)
-integer, intent(in) :: fourier_lim_in, spherical_lim_in
-real :: rlat(lat_max), rlon(num_lon)
integer :: i, j
call initialize_transforms(radius, num_windows, lat_max, num_lon, &
num_fourier, fourier_inc, num_spherical, .false., .true., .true., 0.0)
-dif_days = dif_days_in
-delta_t = delt
real_time = 0.0
force = force_in
-fourier_lim = fourier_lim_in
-spherical_lim = spherical_lim_in
-! Compute the lat and lons for the Gaussian grid and put them in storage
-
-call get_deg_lat(rlat)
-call get_deg_lon(rlon)
-
-lat = rlat
-lon = rlon
-
-! Quick temporary output of model grid
-!do i = 1, num_lon
-! do j = 1, lat_max
-! if(j /= 1 .and. j /= lat_max) then
-! write(*, *) rlon(i), rlat(j), 1e11
-! else
-! write(*, *) rlon(i), 0.99 * rlat(j), 1e11
-! endif
-! end do
-!end do
-!if(1 == 1) stop
-
end subroutine barot_init
@@ -487,39 +452,21 @@
-subroutine init_model()
!-------------------------------------------------------------------------
-!
-! For historical reasons, init_conditions does the model initialization
-! for the barotropic model. This should be rewritten at some point.
-! WARNING: If barotropic model is given a run-time resolution
-! setting capability this will have to be changed.
-
-end subroutine init_model
-
-
-
-
-!-------------------------------------------------------------------------
! Following subroutines are for standard dynamical systems interface.
! WARNING: The dynamical systems routines all use real(r8),
! the barot model uses real.
!-------------------------------------------------------------------------
-
- subroutine init_conditions(x)
+ subroutine static_init_model()
!-------------------------------------------------------------------------
-! subroutine init_conditions(x)
-implicit none
-
-real(r8), intent(out) :: x(model_size)
-
complex, dimension(0:num_fourier, 0:num_spherical) :: psisp, force_in
complex :: temp
integer :: m, n
real :: delt, dif_days_in
+real :: rlat(lat_max), rlon(num_lon)
! Define the interesting indexes for variables to do diag output; span lats
@@ -527,10 +474,45 @@
diag_output_index(m) = (m - 1) * (lat_max / 9.0) + 1
end do
+! Compute the lat and lons for the Gaussian grid and put them in storage
+
+call get_deg_lat(rlat)
+call get_deg_lon(rlon)
+
+lon = rlon
+lat = rlat
+
+! add in some del8 diffusion and forcing
+! Used for t21 and t42 reduced grid with forcing
+dif_days = 2.0
+! Used for t21 or t42 unforced for real data
+!dif_days = 100.0
+
+
+! Set timestep
+! For t21 reduced grid
+!delta_t = 3600.0
+! For t42 reduced grid, t42 unforced or t21 unforced with real data
+delta_t = 1800.0
+
+fourier_lim = 4
+spherical_lim = 10
+
+end subroutine static_init_model
+
+
+ subroutine init_conditions(x)
+!-------------------------------------------------------------------------
+
+real(r8), intent(out) :: x(model_size)
+
+complex, dimension(0:num_fourier, 0:num_spherical) :: psisp, force_in
+complex :: temp
+integer :: m, n
+
! Let's read in one of the old format files to act as an initial condition
!open(unit = 10, file = '/home/jla/psi/t21psijan80sp')
!open(unit = 11, file = '/home/jla/psi/t21psijan14sp')
-!open(unit = 11, file = '/net/jla/t21psijan14sp')
! Unit 81 is used for real data runs;
@@ -541,37 +523,17 @@
force_in = 0.0; psisp = 0.0
do n = 0, 21
do m = 0, n
-! read(10, 31) temp
31 format(1x, 2(e10.4, 1x))
-! if(n <= num_fourier) force_in(m, n - m) = temp
-! read(11, 31) temp
read(81, 31) temp
if(n <= num_fourier) psisp(m, n - m) = temp
end do
end do
-!close(unit = 11)
force_in = psisp
-! add in some del8 diffusion and forcing
-!dif_days_in = 1.0
-!dif_days_in = 0.95
-!dif_days_in = 0.80
-! Used for t21 and t42 reduced grid with forcing
-dif_days_in = 2.0
-! Used for t21 or t42 unforced for real data
-!dif_days_in = 100.0
-
-
-! Set timestep
-! For t21 reduced grid
-!delt = 3600.0
-! For t42 reduced grid, t42 unforced or t21 unforced with real data
-delt = 1800.0
-
! initialize the triangular model; limits on fourier and spherical
-call barot_init(dif_days_in, delt, force_in, 4, 10)
+call barot_init(force_in)
! Convert the psisp field for ics to format for dynamical systems
x = barot_to_dp(psisp)
@@ -689,57 +651,6 @@
- subroutine adv_true_state(x)
-!-------------------------------------------------------------------------
-! subroutine adv_true_state(x)
-
-implicit none
-
-real(r8), intent(inout) :: x(model_size)
-
-integer :: m, n
-real(r8) :: x_grid(num_lon, lat_max)
-complex, dimension(0:num_fourier, 0:num_spherical) :: psisp
-
-if(.not. use_real_data) then
- call adv_1step(x)
-else
-
- ! Have real data every day
-
- real_time = real_time + delta_t * 48.0
-
- write(*, *) 'real time is ', real_time
-
- if(int(real_time / (24. * 3600.)) * (24. * 3600.) == real_time) then
- write(*, *) 'updating observed state'
-
- ! WARNING: Remember that old model uses TOTAL wavenumber
-
- psisp = 0.0
- do n = 0, 21
- do m = 0, n
- 31 format(1x, 2(e10.4, 1x))
- read(81, 31) psisp(m, n - m)
- end do
- end do
-
- write(*, *) 'Observed 4, 4 is ', psisp(4, 4)
-
- ! Next need to convert this to current model resolution single dimension state
-
- x_grid = dble(dp_to_grid(barot_to_dp(psisp)))
-
- ! RETURN X as FULL STATE SPACE STATE
-
- x = barot_to_dp(psisp)
- endif
-endif
-
-end subroutine adv_true_state
-
-
-
subroutine adv_1step(x)
!-------------------------------------------------------------------------
! subroutine adv_1step(x)
@@ -757,13 +668,8 @@
psisp = dp_to_barot(x) ! Convert to spectral, advance for 24 steps
! TEMPORARY KLUGE TO GET 24 hours for real data at T42: additional 24 steps
+psisp = forwrd(psisp, 24)
-if(use_real_data) then
- psisp = forwrd(psisp, 48)
-else
- psisp = forwrd(psisp, 24)
-endif
-
x = barot_to_dp(psisp) ! Convert back to grid dp
end subroutine adv_1step
@@ -813,89 +719,7 @@
end subroutine filter
-!subroutine get_close_pts(list, num)
!-------------------------------------------------------------------------
-!subroutine get_close_pts(list, num)
-
-! In the long run, this is too big for big models, will need another way?
-
-!implicit none
-
-!integer, intent(in) :: num
-!integer, intent(out) :: list(model_size, num)
-!real(r8):: dist(num)
-!integer :: lon_id(num), lat_id(num)
-!integer :: i, j, k, ii, jj, ind, ind2, j_lo, j_hi, base_index, index
-!real(r8) :: tdist
-!real :: rlat(lat_max), rlon(num_lon)
-!type (loc_type) :: a, b
-
-
-! Get lats and longs
-!call get_deg_lat(rlat)
-!call get_deg_lon(rlon)
-!lat = dble(rlat)
-!lon = dble(rlon)
-
-! Get distances for each latitude row, lons are just uniform offset
-!do j = 1, lat_max
-
-! Initialize the temporary list
-! dist(:) = huge(dist)
-! lon_id = 0
-! lat_id = 0
-
-! a%lon = 0.0
-! a%lat = lat(j)
-! do ii = 0, num_lon - 1
-! For efficiency, limit number of latitudes searched
-! j_lo = j - (sqrt(1.0 * num) / 2.0 + 1.0)
-! if(j_lo < 1) j_lo = 1
-! j_hi = j + (sqrt(1.0 * num) / 2.0 + 1.0)
-! if(j_hi > lat_max) j_hi = lat_max
-
-! do jj = j_lo, j_hi
-! b%lon = lon(ii + 1)
-! b%lat = lat(jj)
-! tdist = get_dist(a, b)
-! Insert this distance into the list that holds num
-! do ind = 1, num
-! if(tdist < dist(ind)) then
-! do ind2 = num, ind + 1, -1
-! dist(ind2) = dist(ind2 - 1)
-! lon_id(ind2) = lon_id(ind2 - 1)
-! lat_id(ind2) = lat_id(ind2 - 1)
-! end do
-! dist(ind) = tdist
-! lon_id(ind) = ii
-! lat_id(ind) = jj
-! goto 10
-! endif
-! end do
-! 10 end do
-! end do
-! Now load up close points for each lon point in this lat row
-! do i = 1, num_lon
-! base_index = j + (i - 1) * lat_max
-! write(*, *) 'base i, j, index ', i, j, base_index
-! do k = 1, num
-! ii = i + lon_id(k)
-! if(ii > num_lon) ii = ii - num_lon
-! jj = lat_id(k)
-! index = jj + (ii - 1) * lat_max
-!! write(*, *) 'neighbor ', k, ' lon lat ind ', ii, jj, index
-! list(base_index, k) = index
-! end do
-! end do
-!end do
-
-!end subroutine get_close_pts
-
-
-
-
-
-!-------------------------------------------------------------------------
! End of model_mod.f90
!-------------------------------------------------------------------------
Modified: DART/branches/development/models/forced_barot/obs/real_obs.f90
===================================================================
--- DART/branches/development/models/forced_barot/obs/real_obs.f90 2013-05-29 16:08:55 UTC (rev 6182)
+++ DART/branches/development/models/forced_barot/obs/real_obs.f90 2013-05-29 16:11:59 UTC (rev 6183)
@@ -16,7 +16,7 @@
use model_mod, only : lat_max, num_lon, location_type, dp_to_grid, lon, lat, &
num_fourier, num_spherical, barot_to_dp
-use nag_wrap_mod
+use random_sequence_mod, only : init_random, random_gaussian
private
public :: num_obs, obs_var, take_obs, ens_ics, obs_location, state_to_obs
@@ -30,11 +30,8 @@
revision = "$Revision$", &
revdate = "$Date$"
-!integer, parameter :: num_x_obs = 32, num_y_obs = 16
-!integer, parameter :: num_x_obs = 20, num_y_obs = 16
integer, parameter :: num_x_obs = 40, num_y_obs = 32
integer, parameter :: num_obs = num_x_obs * num_y_obs
-!!!integer, parameter :: num_obs = lat_max * num_lon
! Global storage for obs locations
double precision obs_lon(num_obs), obs_lat(num_obs)
@@ -259,15 +256,17 @@
double precision, intent(in) :: x(:)
double precision, intent(out) :: as(:, :)
integer :: i, j
+type(random_type), save :: r
+logical, save :: first = .true.
+if (first) then
+ call init_random(r)
+ first = .false.
+endif
-!WARNING: MANY CHANGES
do i = 1, size(x)
do j = 1, size(as, 2)
-! as(i, j) = x(i) + 1e3 * g05ddf_wrap(dble(0.0), dble(1.0))
-!!! as(i, j) = x(i) + 1e2 * g05ddf_wrap(dble(0.0), dble(1.0))
- as(i, j) = x(i) + 2e5 * g05ddf_wrap(dble(0.0), dble(1.0))
-! as(i, j) = x(i) + 5e5 * g05ddf_wrap(dble(0.0), dble(1.0))
+ as(i, j) = x(i) + 2e5 * random_gaussian(r, 0.0, 1.0)
! write(*, *) 'as ', i, j, x(i), as(i, j)
end do
end do
Added: DART/branches/development/models/forced_barot/work/input.nml
===================================================================
--- DART/branches/development/models/forced_barot/work/input.nml (rev 0)
+++ DART/branches/development/models/forced_barot/work/input.nml 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,238 @@
+&perfect_model_obs_nml
+ start_from_restart = .true.,
+ output_restart = .true.,
+ async = 0,
+ init_time_days = 0,
+ init_time_seconds = 0,
+ first_obs_days = -1,
+ first_obs_seconds = -1,
+ last_obs_days = -1,
+ last_obs_seconds = -1,
+ output_interval = 1,
+ restart_in_file_name = "perfect_ics",
+ restart_out_file_name = "perfect_restart",
+ obs_seq_in_file_name = "obs_seq.in",
+ obs_seq_out_file_name = "obs_seq.out",
+ adv_ens_command = "./advance_model.csh",
+ trace_execution = .false.,
+ output_timestamps = .false.,
+ print_every_nth_obs = -1,
+ output_forward_op_errors = .false.,
+ silence = .false.,
+ /
+
+&filter_nml
+ async = 0,
+ adv_ens_command = "./advance_model.csh",
+ ens_size = 20,
+ start_from_restart = .true.,
+ output_restart = .true.,
+ obs_sequence_in_name = "obs_seq.out",
+ obs_sequence_out_name = "obs_seq.final",
+ restart_in_file_name = "filter_ics",
+ restart_out_file_name = "filter_restart",
+ init_time_days = 0,
+ init_time_seconds = 0,
+ first_obs_days = -1,
+ first_obs_seconds = -1,
+ last_obs_days = -1,
+ last_obs_seconds = -1,
+ num_output_state_members = 20,
+ num_output_obs_members = 20,
+ output_interval = 1,
+ num_groups = 1,
+ input_qc_threshold = 3.0,
+ outlier_threshold = 3.0,
+ enable_special_outlier_code = .false.,
+ output_forward_op_errors = .false.,
+ output_inflation = .true.,
+ output_timestamps = .false.,
+ trace_execution = .false.,
+ silence = .false.,
+
+ inf_flavor = 2, 0,
+ inf_initial_from_restart = .false., .false.,
+ inf_sd_initial_from_restart = .false., .false.,
+ inf_output_restart = .true., .true.,
+ inf_deterministic = .true., .true.,
+ inf_in_file_name = 'prior_inflate_ics', 'post_inflate_ics',
+ inf_out_file_name = 'prior_inflate_restart', 'post_inflate_restart',
+ inf_diag_file_name = 'prior_inflate_diag', 'post_inflate_diag',
+ inf_initial = 1.0, 1.0,
+ inf_sd_initial = 0.6, 0.0,
+ inf_damping = 0.9, 1.0,
+ inf_lower_bound = 1.0, 1.0,
+ inf_upper_bound = 1000000.0, 1000000.0,
+ inf_sd_lower_bound = 0.6, 0.0,
+ /
+
+&smoother_nml
+ num_lags = 0,
+ start_from_restart = .false.,
+ output_restart = .true.,
+ restart_in_file_name = 'ics',
+ restart_out_file_name = 'restart',
+ /
+
+&ensemble_manager_nml
+ single_restart_file_in = .true.,
+ single_restart_file_out = .true.,
+ perturbation_amplitude = 0.2,
+ verbose = .false.
+ /
+
+&assim_tools_nml
+ filter_kind = 1,
+ cutoff = 0.02,
+ sort_obs_inc = .false.,
+ spread_restoration = .false.,
+ sampling_error_correction = .false.,
+ adaptive_localization_threshold = -1,
+ output_localization_diagnostics = .false.,
+ localization_diagnostics_file = 'localization_diagnostics',
+ print_every_nth_obs = 0,
+ rectangular_quadrature = .true.,
+ gaussian_likelihood_tails = .false.,
+ /
+
+&cov_cutoff_nml
+ select_localization = 1,
+ /
+
+®_factor_nml
+ select_regression = 1,
+ input_reg_file = "time_mean_reg",
+ save_reg_diagnostics = .false.,
+ reg_diagnostics_file = "reg_diagnostics",
+ /
+
+&obs_sequence_nml
+ write_binary_obs_sequence = .false.,
+ /
+
+&obs_kind_nml
+ assimilate_these_obs_types = 'RAW_STATE_VARIABLE',
+ /
+
+&assim_model_nml
+ write_binary_restart_files = .false.,
+ netCDF_large_file_support = .false.,
+ /
+
+&model_nml
+ model_size = 40,
+ forcing = 8.00,
+ delta_t = 0.05,
+ time_step_days = 0,
+ time_step_seconds = 3600,
+ /
+
+&utilities_nml
+ termlevel = 1,
+ module_details = .false.,
+ logfilename = 'dart_log.out',
+ nmlfilename = 'dart_log.nml',
+ write_nml = 'file',
+ print_debug = .false.,
+ /
+
+&mpi_utilities_nml
+ /
+
+&preprocess_nml
+ overwrite_output = .true.,
+ input_obs_def_mod_file = '../../../obs_def/DEFAULT_obs_def_mod.F90',
+ output_obs_def_mod_file = '../../../obs_def/obs_def_mod.f90',
+ input_obs_kind_mod_file = '../../../obs_kind/DEFAULT_obs_kind_mod.F90',
+ output_obs_kind_mod_file = '../../../obs_kind/obs_kind_mod.f90',
+ input_files = '../../../obs_def/obs_def_1d_state_mod.f90',
+ /
+
+&restart_file_tool_nml
+ input_file_name = "filter_restart",
+ output_file_name = "filter_updated_restart",
+ ens_size = 1,
+ single_restart_file_in = .true.,
+ single_restart_file_out = .true.,
+ write_binary_restart_files = .true.,
+ overwrite_data_time = .false.,
+ new_data_days = -1,
+ new_data_secs = -1,
+ input_is_model_advance_file = .false.,
+ output_is_model_advance_file = .false.,
+ overwrite_advance_time = .false.,
+ new_advance_days = -1,
+ new_advance_secs = -1,
+ gregorian_cal = .false.
+ /
+
+&obs_sequence_tool_nml
+ filename_seq = 'obs_seq.final',
+ filename_seq_list = '',
+ filename_out = 'obs_seq.processed',
+ first_obs_days = -1,
+ first_obs_seconds = -1,
+ last_obs_days = -1,
+ last_obs_seconds = -1,
+ print_only = .false.,
+ gregorian_cal = .false.,
+ /
+
+# other possible obs tool namelist items:
+#
+# keep only the U and V radiosonde winds:
+# obs_types = 'RADIOSONDE_U_WIND_COMPONENT',
+# 'RADIOSONDE_V_WIND_COMPONENT',
+# keep_types = .true.,
+#
+# remove the U and V radiosonde winds:
+# obs_types = 'RADIOSONDE_U_WIND_COMPONENT',
+# 'RADIOSONDE_V_WIND_COMPONENT',
+# keep_types = .false.,
+#
+# keep only observations with a DART QC of 0:
+# qc_metadata = 'Dart quality control',
+# min_qc = 0,
+# max_qc = 0,
+#
+# keep only radiosonde temp obs between 250 and 300 K:
+# copy_metadata = 'NCEP BUFR observation',
+# copy_type = 'RADIOSONDE_TEMPERATURE',
+# min_copy = 250.0,
+# max_copy = 300.0,
+
+&obs_diag_nml
+ obs_sequence_name = 'obs_seq.final',
+ bin_width_days = -1,
+ bin_width_seconds = -1,
+ init_skip_days = 0,
+ init_skip_seconds = 0,
+ Nregions = 3,
+ lonlim1 = 0.00, 0.00, 0.50, -1.0,
+ lonlim2 = 1.01, 0.50, 1.01, -1.0,
+ reg_names = 'whole', 'yin', 'yang', 'bogus',
+ create_rank_histogram = .true.,
+ outliers_in_histogram = .true.,
+ verbose = .false.
+ /
+
+&schedule_nml
+ calendar = 'Gregorian',
+ first_bin_start = 1601, 1, 1, 0, 0, 0,
+ first_bin_end = 2999, 1, 1, 0, 0, 0,
+ last_bin_end = 2999, 1, 1, 0, 0, 0,
+ bin_interval_days = 1000000,
+ bin_interval_seconds = 0,
+ max_num_bins = 1000,
+ print_table = .true.
+ /
+
+&obs_seq_to_netcdf_nml
+ obs_sequence_name = 'obs_seq.final',
+ obs_sequence_list = '',
+ append_to_netcdf = .false.,
+ lonlim1 = 0.0,
+ lonlim2 = 1.0,
+ verbose = .true.
+ /
+
Property changes on: DART/branches/development/models/forced_barot/work/input.nml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: DART/branches/development/models/forced_barot/work/mkmf_filter
===================================================================
--- DART/branches/development/models/forced_barot/work/mkmf_filter (rev 0)
+++ DART/branches/development/models/forced_barot/work/mkmf_filter 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,64 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+#
+# usage: mkmf_filter [ -mpi | -nompi ]
+#
+# without any args, builds filter without mpi libraries, and it will run
+# as a normal executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
+
+if ( $#argv > 0 ) then
+ if ("$argv[1]" == "-mpi") then
+ setenv usingmpi 1
+ else if ("$argv[1]" == "-nompi") then
+ setenv usingmpi 0
+ else
+ echo "Unrecognized argument to mkmf_filter: $argv[1]"
+ echo "Usage: mkmf_filter [ -mpi | -nompi ]"
+ echo " default is to generate a Makefile without MPI support."
+ exit -1
+ endif
+else
+ setenv usingmpi 0
+endif
+
+
+# make a backup copy of the path_names file, and then use
+# sed to make sure it includes either the non-mpi subroutines,
+# or the subroutines which really call mpi.
+cp -f path_names_filter path_names_filter.back
+
+if ( $usingmpi ) then
+
+ echo "Making Makefile with MPI"
+ touch using_mpi_for_filter
+ sed -e 's;/null_mpi_util;/mpi_util;' path_names_filter.back >! path_names_filter
+ setenv wrapper_arg -w
+
+else
+
+ echo "Making Makefile without MPI"
+ rm -f using_mpi_for_filter
+ sed -e 's;/mpi_util;/null_mpi_util;' path_names_filter.back >! path_names_filter
+ setenv wrapper_arg ""
+
+endif
+
+# remove temp file and now really call mkmf to generate makefile
+rm -f path_names_filter.back
+
+../../../mkmf/mkmf -p filter -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." ${wrapper_arg} path_names_filter
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Property changes on: DART/branches/development/models/forced_barot/work/mkmf_filter
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/forced_barot/work/mkmf_perfect_model_obs
===================================================================
--- DART/branches/development/models/forced_barot/work/mkmf_perfect_model_obs (rev 0)
+++ DART/branches/development/models/forced_barot/work/mkmf_perfect_model_obs 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+
+../../../mkmf/mkmf -p perfect_model_obs -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_perfect_model_obs
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Property changes on: DART/branches/development/models/forced_barot/work/mkmf_perfect_model_obs
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/forced_barot/work/mkmf_preprocess
===================================================================
--- DART/branches/development/models/forced_barot/work/mkmf_preprocess (rev 0)
+++ DART/branches/development/models/forced_barot/work/mkmf_preprocess 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,18 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+
+../../../mkmf/mkmf -p preprocess -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." path_names_preprocess
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Property changes on: DART/branches/development/models/forced_barot/work/mkmf_preprocess
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/forced_barot/work/mkmf_wakeup_filter
===================================================================
--- DART/branches/development/models/forced_barot/work/mkmf_wakeup_filter (rev 0)
+++ DART/branches/development/models/forced_barot/work/mkmf_wakeup_filter 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,64 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+#
+# usage: mkmf_wakeup_filter [ -mpi | -nompi ]
+#
+# without any args, builds wakeup_filter without mpi libraries, and it will run
+# as a normal executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
+
+if ( $#argv > 0 ) then
+ if ("$argv[1]" == "-mpi") then
+ setenv usingmpi 1
+ else if ("$argv[1]" == "-nompi") then
+ setenv usingmpi 0
+ else
+ echo "Unrecognized argument to mkmf_wakeup_filter: $argv[1]"
+ echo "Usage: mkmf_wakeup_filter [ -mpi | -nompi ]"
+ echo " default is to generate a Makefile without MPI support."
+ exit -1
+ endif
+else
+ setenv usingmpi 0
+endif
+
+
+# make a backup copy of the path_names file, and then use
+# sed to make sure it includes either the non-mpi subroutines,
+# or the subroutines which really call mpi.
+cp -f path_names_wakeup_filter path_names_wakeup_filter.back
+
+if ( $usingmpi ) then
+
+ echo "Making Makefile with MPI"
+ touch using_mpi_for_wakeup_filter
+ sed -e 's;/null_mpi_util;/mpi_util;' path_names_wakeup_filter.back >! path_names_wakeup_filter
+ setenv wrapper_arg -w
+
+else
+
+ echo "Making Makefile without MPI"
+ rm -f using_mpi_for_wakeup_filter
+ sed -e 's;/mpi_util;/null_mpi_util;' path_names_wakeup_filter.back >! path_names_wakeup_filter
+ setenv wrapper_arg ""
+
+endif
+
+# remove temp file and now really call mkmf to generate makefile
+rm -f path_names_wakeup_filter.back
+
+../../../mkmf/mkmf -p wakeup_filter -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
+ -a "../../.." ${wrapper_arg} path_names_wakeup_filter
+
+exit $status
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Property changes on: DART/branches/development/models/forced_barot/work/mkmf_wakeup_filter
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Added: DART/branches/development/models/forced_barot/work/path_names_filter
===================================================================
--- DART/branches/development/models/forced_barot/work/path_names_filter (rev 0)
+++ DART/branches/development/models/forced_barot/work/path_names_filter 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,21 @@
+adaptive_inflate/adaptive_inflate_mod.f90
+assim_model/assim_model_mod.f90
+assim_tools/assim_tools_mod.f90
+common/types_mod.f90
+cov_cutoff/cov_cutoff_mod.f90
+ensemble_manager/ensemble_manager_mod.f90
+filter/filter.f90
+location/twod_sphere/location_mod.f90
+models/forced_barot/barot_obs_random.f90
+models/forced_barot/model_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+obs_def/obs_def_mod.f90
+obs_kind/obs_kind_mod.f90
+obs_model/obs_model_mod.f90
+obs_sequence/obs_sequence_mod.f90
+random_seq/random_seq_mod.f90
+reg_factor/reg_factor_mod.f90
+smoother/smoother_mod.f90
+sort/sort_mod.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
Added: DART/branches/development/models/forced_barot/work/path_names_perfect_model_obs
===================================================================
--- DART/branches/development/models/forced_barot/work/path_names_perfect_model_obs (rev 0)
+++ DART/branches/development/models/forced_barot/work/path_names_perfect_model_obs 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,20 @@
+adaptive_inflate/adaptive_inflate_mod.f90
+assim_model/assim_model_mod.f90
+assim_tools/assim_tools_mod.f90
+common/types_mod.f90
+cov_cutoff/cov_cutoff_mod.f90
+ensemble_manager/ensemble_manager_mod.f90
+location/twod_sphere/location_mod.f90
+models/forced_barot/barot_obs_random.f90
+models/forced_barot/model_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+obs_def/obs_def_mod.f90
+obs_kind/obs_kind_mod.f90
+obs_model/obs_model_mod.f90
+obs_sequence/obs_sequence_mod.f90
+perfect_model_obs/perfect_model_obs.f90
+random_seq/random_seq_mod.f90
+reg_factor/reg_factor_mod.f90
+sort/sort_mod.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
Added: DART/branches/development/models/forced_barot/work/path_names_preprocess
===================================================================
--- DART/branches/development/models/forced_barot/work/path_names_preprocess (rev 0)
+++ DART/branches/development/models/forced_barot/work/path_names_preprocess 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,5 @@
+common/types_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+preprocess/preprocess.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
Added: DART/branches/development/models/forced_barot/work/path_names_wakeup_filter
===================================================================
--- DART/branches/development/models/forced_barot/work/path_names_wakeup_filter (rev 0)
+++ DART/branches/development/models/forced_barot/work/path_names_wakeup_filter 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,5 @@
+common/types_mod.f90
+filter/wakeup_filter.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
Added: DART/branches/development/models/forced_barot/work/quickbuild.csh
===================================================================
--- DART/branches/development/models/forced_barot/work/quickbuild.csh (rev 0)
+++ DART/branches/development/models/forced_barot/work/quickbuild.csh 2013-05-29 16:11:59 UTC (rev 6183)
@@ -0,0 +1,155 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+#
+# Script to manage the compilation of all components for this model;
+# executes a known "perfect model" experiment using an existing
+# observation sequence file (obs_seq.in) and initial conditions appropriate
+# for both 'perfect_model_obs' (perfect_ics) and 'filter' (filter_ics).
+# There are enough initial conditions for 80 ensemble members in filter.
+# Use ens_size = 81 and it WILL bomb. Guaranteed.
+# The 'input.nml' file controls all facets of this execution.
+#
+# 'create_obs_sequence' and 'create_fixed_network_sequence' were used to
+# create the observation sequence file 'obs_seq.in' - this defines
+# what/where/when we want observations. This script does not run these
+# programs - intentionally.
+#
+# 'perfect_model_obs' results in a True_State.nc file that contains
+# the true state, and obs_seq.out - a file that contains the "observations"
+# that will be assimilated by 'filter'.
+#
+# 'filter' results in three files (at least): Prior_Diag.nc - the state
+# of all ensemble members prior to the assimilation (i.e. the forecast),
+# Posterior_Diag.nc - the state of all ensemble members after the
+# assimilation (i.e. the analysis), and obs_seq.final - the ensemble
+# members' estimate of what the observations should have been.
+#
+# Once 'perfect_model_obs' has advanced the model and harvested the
+# observations for the assimilation experiment, 'filter' may be run
+# over and over by simply changing the namelist parameters in input.nml.
+#
+# The result of each assimilation can be explored in model-space with
+# matlab scripts that directly read the netCDF output, or in observation-space.
+# 'obs_diag' is a program that will create observation-space diagnostics
+# for any result of 'filter' and results in a couple data files that can
+# be explored with yet more matlab scripts.
+
+#----------------------------------------------------------------------
+# 'preprocess' is a program that culls the appropriate sections of the
+# observation module for the observations types in 'input.nml'; the
+# resulting source file is used by all the remaining programs,
+# so this MUST be run first.
+#----------------------------------------------------------------------
+
+\rm -f preprocess *.o *.mod
+\rm -f ../../../obs_def/obs_def_mod.f90
+\rm -f ../../../obs_kind/obs_kind_mod.f90
+
+set MODEL = "forced_barot"
+
+@ n = 1
+
+echo
+echo
+echo "---------------------------------------------------------------"
+echo "${MODEL} build number ${n} is preprocess"
+
+csh mkmf_preprocess
+make || exit $n
+
+./preprocess || exit 99
+
+#----------------------------------------------------------------------
+# Build all the single-threaded targets
+#----------------------------------------------------------------------
+
+foreach TARGET ( mkmf_* )
+
+ set PROG = `echo $TARGET | sed -e 's#mkmf_##'`
+
+ switch ( $TARGET )
+ case mkmf_preprocess:
+ breaksw
+ default:
+ @ n = $n + 1
+ echo
+ echo "---------------------------------------------------"
+ echo "${MODEL} build number ${n} is ${PROG}"
+ \rm -f ${PROG}
+ csh $TARGET || exit $n
+ make || exit $n
+ breaksw
+ endsw
+end
+
+\rm -f *.o *.mod input.nml*_default
+
+if ( $#argv == 1 && "$1" == "-mpi" ) then
+ echo "Success: All single task DART programs compiled."
+ echo "Script now compiling MPI parallel versions of the DART programs."
+else if ( $#argv == 1 && "$1" == "-nompi" ) then
+ echo "Success: All single task DART programs compiled."
+ echo "Script is exiting without building the MPI version of the DART programs."
+ exit 0
+else
+ echo ""
+ echo "Success: All DART programs compiled."
+ echo "Script is exiting before building the MPI version of the DART programs."
+ echo "Run the quickbuild.csh script with a -mpi argument or"
+ echo "edit the quickbuild.csh script and remove the exit line"
+ echo "to compile with MPI to run in parallel on multiple cpus."
+ echo ""
+ exit 0
+endif
+
+#----------------------------------------------------------------------
+# to enable an MPI parallel version of filter for this model,
+# call this script with the -mpi argument, or if you are going to build
+# with MPI all the time, remove or comment out the entire section above.
@@ Diff output truncated at 40000 characters. @@
More information about the Dart-dev
mailing list