16 #include <boost/lexical_cast.hpp>    17 #include <boost/scoped_ptr.hpp>    18 #include <boost/test/unit_test.hpp>    21 #include "eckit/config/LocalConfiguration.h"    32 #include "oops/util/DateTime.h"    49   boost::scoped_ptr<const eckit::LocalConfiguration> 
file_;
    50   boost::scoped_ptr<lorenz95::Resolution> 
resol_;
    52   boost::scoped_ptr<util::DateTime> 
time_;
    53   boost::scoped_ptr<oops::Variables> 
vars_;
    61     boost::scoped_ptr<lorenz95::StateL95> xx(
new lorenz95::StateL95(*resol_, *vars_, *time_));
    62     BOOST_CHECK(xx.get() != 
NULL);
    66     boost::scoped_ptr<lorenz95::StateL95> xx(
new lorenz95::StateL95(*resol_, *vars_, *file_));
    67     BOOST_CHECK(xx.get() != 
NULL);
    73     BOOST_CHECK(xx2.get() != 
NULL);
    79     BOOST_CHECK(xx2.get() != 
NULL);
    97     BOOST_CHECK_EQUAL(xx.
validTime().toString(), date_str_);
   101     util::DateTime tt(file_->getString(
"date"));
   106     std::string date_string2(
"2014-09-14T09:35:00Z");
   107     util::DateTime dt2(date_string2);
   114     BOOST_CHECK_EQUAL(xx1.validTime(), xx2.
validTime());
   115     BOOST_CHECK_EQUAL(xx1.getField().resol(), xx2.
getField().
resol());
   116     for (
int i = 0; 
i < xx1.getField().resol(); ++
i) {
   117       BOOST_CHECK_EQUAL(xx1.getField()[
i], xx2.
getField()[
i]);
   122     util::DateTime tt(file_->getString(
"date"));
   134     for (
int i = 0; 
i < xx.getField().resol(); ++
i) {
   135       BOOST_CHECK_EQUAL(xx.getField()[
i], 2.0 * dx.
getField()[
i]);
   140     util::DateTime tt(file_->getString(
"date"));
   146     const std::string filename(file_->getString(
"filename"));
   147     std::ifstream inStream(filename.c_str());
   148     if (!inStream.is_open()) {
   149       BOOST_ERROR(
"read functionality cannot be determined");
   153     inStream >> resolInt;
   158     std::vector<double> doubleVec(resolInt);
   159     for (
int i = 0; 
i < resolInt; ++
i) {
   160       inStream >> doubleVec[
i];
   164     for (
int i = 0; 
i < resol_->npoints(); ++
i) {
   165       BOOST_CHECK_EQUAL((xx.getField())[
i], doubleVec[
i]);
   267 BOOST_AUTO_TEST_SUITE_END()
 l_size ! loop over number of fields ke do je do i
 
Increment Class: Difference between two states. 
 
const util::DateTime & validTime() const
 
const FieldL95 & getField() const
 
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************! this routine is used to retrieve scalar boundary data for symmetric domain. subroutine MPP_GET_BOUNDARY_2D_(field, domain, ebuffer, sbuffer, wbuffer, nbuffer, flags, &position, complete, tile_count) type(domain2D), intent(in) ::domain MPP_TYPE_, intent(in) ::field(:,:) MPP_TYPE_, intent(inout), optional ::ebuffer(:), sbuffer(:), wbuffer(:), nbuffer(:) integer, intent(in), optional ::flags, position, tile_count logical, intent(in), optional ::complete MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_, allocatable, dimension(:,:) ::ebuffer2D, sbuffer2D, wbuffer2D, nbuffer2D integer ::xcount, ycount integer ::ntile logical ::need_ebuffer, need_sbuffer, need_wbuffer, need_nbuffer integer(LONG_KIND), dimension(MAX_DOMAIN_FIELDS, MAX_TILES), save ::f_addrs=-9999 integer(LONG_KIND), dimension(4, MAX_DOMAIN_FIELDS, MAX_TILES), save ::b_addrs=-9999 integer, save ::bsize(4)=0, isize=0, jsize=0, ksize=0, pos, list=0, l_size=0, upflags integer ::buffer_size(4) integer ::max_ntile, tile, update_position, ishift, jshift logical ::do_update, is_complete, set_mismatch character(len=3) ::text MPP_TYPE_ ::d_type type(overlapSpec), pointer ::bound=> NULL() ntile
 
const FieldL95 & getField() const
Access to data. 
 
const int & resol() const
Set and get. 
 
boost::scoped_ptr< util::DateTime > time_
 
boost::scoped_ptr< lorenz95::Resolution > resol_
 
boost::scoped_ptr< const eckit::LocalConfiguration > file_
 
BOOST_AUTO_TEST_CASE(test_GomL95_constructor)
 
void read(const eckit::Configuration &)
Utilities. 
 
static const eckit::Configuration & config()
 
boost::scoped_ptr< oops::Variables > vars_