source: flexpart.git/flexpart-testing/doc/QuickStartDistroTesting.md @ 29feaef

FPv9.3.1FPv9.3.1b_testingFPv9.3.2fp9.3.1-20161214-nc4grib2nc4_repair
Last change on this file since 29feaef was 496c607, checked in by Don Morton <Don.Morton@…>, 8 years ago

Initial commit of FPv9.3.1

Currently, this is a clone of snapshot FPv9.3.0

  • Property mode set to 100644
File size: 5.5 KB
Line 
1
2#  Quick Start Notes for Distribution Testing System
3
4
5These are quick and dirty notes that describe the system meant to "quick test" (or, in a longer time frame, "comprehensively test") one or more FLEXPART distributions on real data and test cases.
6
7## Quick Start
8
9First, here is the cookbook approach to running a set of small, comprehenstive tests on the current FLEXPART distribution.  These are run to insure that your current distribution works correctly, whether you recently downloaded it and want to test it in your environment, or whether you recent made some changes and want to make sure you didn't break anything.
10
11In short, you will set the **PYTHONPATH** environment variable to the root location of the testing routines, which is directory *flexpart-testing*.   You will make sure that you have a working *Makefile* customized for your environment, and then in the directory *flexpart-testing/check/*, you will run the Python program *run_selected_cases.py*, giving it two arguments
12
13* The location of the makefile you want to use
14* The location of a file that contains the list of test cases you want to run
15
16Setting up the PYTHONPATH, and invoking the test command would look something like the following
17
18
19***
20               
21               
22        $ export PYTHONPATH=~/fp/flexpart-testing
23        $ python run_selected_cases.py -f list_simple_cases.lst -m ~/makefile.gfortran
24                         
25        [INFO]      The following cases will be executed:
26                                     -) test_ecmwf_06hr_1p0deg_tinymetgrid_1species_1emission_fwd.xml
27                                     -) test_ecmwf_06hr_1p0deg_tinymetgrid_1species_1emission_bwd.xml
28                                     -) test_ncep_02hr_1p0deg_1species_1emission_fwd_bwd.xml
29        [INFO]      Start execution of the test cases
30                                     ... the time invested on running
31                                         these tests is variable, from 2
32                                         minutes to 30 with all cases
33                         ----------------------------------
34                       
35                       
36                EXECUTING TEST :  test_ecmwf_06hr_1p0deg_tinymetgrid_1species_1emission_fwd.xml
37                .
38                .
39                .
40               
41***
42
43and the final lines of a successful run of tests would look something like
44
45***
46
47        .
48        .
49        .
50        Test performed.  Error = 0.0E+00
51        Test passed
52        -----------------------
53       
54        All tests passed, erasing temporary directories
55        /tmp/distrotest_36074af1-fca6-485c-ad93-36b486c6092b
56        /tmp/caserun_11519fd4-5255-4176-8e25-3c6455a514de
57        /tmp/caserun_75bf076d-e1c7-4b1d-bba6-8409820bb4ec
58       
59         ********************************************
60       
61        [INFO]      -------------- SUMMARY-----------------
62        [INFO]      Failing compilations:  []
63        [INFO]      Failing runs:  []
64        [INFO]      Failing cases:  []
65        [INFO]      Cases raising exceptions:  []
66       
67       
68        [INFO]      Time invested in running the tests:
69                    134.037215948  seconds
70       
71***
72
73
74
75There is also a larger set of test cases in file list_complex_cases.lst, which may be run something like
76
77
78
79
80        $ python run_selected_cases.py -f list_complex_cases.lst -m ~/makefile.gfortran
81
82
83
84The path to the Makefile is necessary when running the check, and should be located outside the distribution, because many people will have widely varying Makefiles so, at least for the time being, it's impossible to put a "one-makefile-fits-all" into the source code distribution, and you'll never know if a working Makefile got overwritten in the distribution by somebody else.   
85
86## Brief description of XML specification file
87
88The XML specification file represents a test of a single FLEXPART distribution with a specific *par_mod.f90*.  When specifying the distribution, it's necessary to specify where the source code is (relative to the directory in which *check.py* is being run), the full path to the *par_mod.f90* that will be used for compiling, and the name of the expected executable. 
89
90The path to *par_mod.f90* specification is optional and, if not present, the one that's in the distribution will be used.  It's recommended, however, that the user have their own, again, because you'll never know what got uploaded in the latest distribution.  Note that in my current distribution, the XML files reference the distribution that's in the repository.  It's set up this way so that changes to the source code can be easily tested over and over again.
91
92A single *distribution* will have one or more *metcase* sections.  In this way, we can test a distribution with a number of different datasets.  A *metcase* section is defined by a path to the directory of met files, which **must contain a valid AVAILABLE file with local pathnames**.   
93
94Note that in the current setup, using *generic1.xml*, the following tests are in directory *flexpart-testing/case_data/ecmwf_tiny/* which is a small ECMWF "patch" domain over Austria, intended for quick testing.  Inside this directory is the *met_data* directory.
95A single *metcase* will have one or more *runcase* sections.  A *runcase* is a specific simulation defined by a specific set of FLEXPART configurations files.  In this
96
97In the current setup for the simplest tests, the example *runcase* is set up in *flexpart-testing/case_data/ecmwf_tiny/complex_fwd/*, which contains the run directory
98
99Finally, a *runcase* may contain one or more *basictest* sections, which compare the output of the *runcase* with a pre-specified expected control output for the simul
100
101* mother_all_vars_maxabserr
102* mother_all_vars_rmse
103* nest_all_vars_maxabserr
104* nest_all_vars_rmse
105
106These four tests will compare the entire temporal and spatial domain (including all releases, all species, etc.) of the recent simulation and the control data.  It will not, currently, check deposition grids, but lower level methods in the testing environment will do that.
107
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG