| 1 | = Lorenz-96 model with PDAF = |
| 2 | |
| 3 | [[PageOutline(2-3,Contents of this page)]] |
| 4 | |
| 5 | The implementation of the Loren-96 model coupled to PDAF is in the directory `testsuite/src/lorenz96` of the PDAF package. |
| 6 | Provided is a full implementation of PDAF with the nonlinear Lorenz96 model (E. N. Lorenz (1996) Predictability - a problem partly |
| 7 | solved. Proceedings Seminar on Predictability, ECMWF, READING, UK) providing various filter and smoother methods. We used this implementation for the different publications in which we studies the behavior of different data assimilation methods. |
| 8 | |
| 9 | Next to the implementation of Lorenz-96 with PDAF, the test case provides tool programs and scripts that |
| 10 | allow to run a test case and to display the outputs. |
| 11 | |
| 12 | |
| 13 | == Running the test case == |
| 14 | |
| 15 | Runnning a data assimilation experimnet with the Lorenz-96 model is a two step process: First one runs the model without PDAF to generate a file holding the trajectory of a forward run. Then one generates files with observations and a covariance matrix for the initialization of the initial ensemble. In the second step, one compiles the Lorenz-96 with activated coupling to PDAF and runs the experiments. |
| 16 | |
| 17 | === 1. Compile and run the forward model without assimilation === |
| 18 | |
| 19 | First change in the file `make.arch/linux_gfortran.h` the line |
| 20 | {{{ |
| 21 | CPP_DEFS = -DUSE_PDAF |
| 22 | }}} |
| 23 | to |
| 24 | {{{ |
| 25 | CPP_DEFS = #-DUSE_PDAF |
| 26 | }}} |
| 27 | to deactivate the coupling to PDAF in the model code. Now build the forward model program with |
| 28 | {{{ |
| 29 | cd testsuite/src |
| 30 | make lorenz_96 PDAF_ARCH=linux_gfortran |
| 31 | }}} |
| 32 | in the directory `testsuite/src/` of the PDAF package. You have to ensure |
| 33 | that in the machine-specific make include file `linux_gfortran.h` `-DUSE_PDAF` is not defined |
| 34 | for CPP_DEFS (such that calls to PDAF are not active). The executable |
| 35 | is generated in `testsuite/bin/`. |
| 36 | |
| 37 | '''Note''': The implementation uses the NetCDF library for file outputs. If the compilation above fails, please ensure the netcdf-library ist installed. On computers running Linux, it is usually available as a package of the operating system. |
| 38 | |
| 39 | To run the forward model use |
| 40 | {{{ |
| 41 | cd ../bin |
| 42 | ./lorenz_96 -total_steps 10000 |
| 43 | }}} |
| 44 | This runs Lorenz-96 model for 10000 time steps and the trajectory is written into a file `state.nc`. |
| 45 | |
| 46 | === 2. Generate observations and a covariance matrix === |
| 47 | |
| 48 | To build the executables for the tool programs use |
| 49 | {{{ |
| 50 | cd ../src/lorenz96/tools |
| 51 | make all PDAF_ARCH=linux_gfortran |
| 52 | }}} |
| 53 | |
| 54 | Now run |
| 55 | {{{ |
| 56 | ./generate_obs |
| 57 | }}} |
| 58 | and |
| 59 | {{{ |
| 60 | ./generate_covar |
| 61 | }}} |
| 62 | to generate a file holding observations (`obs.nc` in testsuite/bin/) and |
| 63 | a file holding the covariance matrix information (`covar.nc` in |
| 64 | testsuite/bin/), which is used to generate an initial ensemble for |
| 65 | the data assimilation experiments. |
| 66 | |
| 67 | |
| 68 | === 3. Build and run the assimilation program === |
| 69 | |
| 70 | Change in the `make.arch/linux_gfortran.h` the line |
| 71 | {{{ |
| 72 | CPP_DEFS = #-DUSE_PDAF |
| 73 | }}} |
| 74 | back to |
| 75 | {{{ |
| 76 | CPP_DEFS = -DUSE_PDAF |
| 77 | }}} |
| 78 | to activate the coupling to PDAF in the model code. |
| 79 | |
| 80 | Now compile the Lorenz96 model with activated |
| 81 | PDAF. First clean the directories for the main driver and the lorenz96 |
| 82 | model using |
| 83 | {{{ |
| 84 | cd ../../ |
| 85 | make cleandriver PDAF_ARCH=linux_gfortran |
| 86 | make cleanlorenz_96 PDAF_ARCH=linux_gfortran |
| 87 | }}} |
| 88 | (This removes object files that were compiled without support for PDAF) |
| 89 | Then build the executable using |
| 90 | {{{ |
| 91 | make pdaf_lorenz_96 PDAF_ARCH=linux_gfortran |
| 92 | }}} |
| 93 | The program `pdaf_lorenz_96` is generated in testsuite/bin. |
| 94 | |
| 95 | |
| 96 | To run the assimilation program, do |
| 97 | {{{ |
| 98 | cd ../bin |
| 99 | ../src/lorenz96/tools/runasml.sh |
| 100 | }}} |
| 101 | The script runsasml.sh runs 11 experiments with a fixed ensemble size, but |
| 102 | different covariance inflations (forgetting factors). The execution can |
| 103 | take about 2 minutes. |
| 104 | |
| 105 | === 4. Plot output from the assimilation experiments === |
| 106 | |
| 107 | To display the output of the assimilation experiments we provide several plotting scripts for Matlab and Octave. To use them do |
| 108 | {{{ |
| 109 | cd ../src/lorenz96/plotting/ |
| 110 | }}} |
| 111 | and see the file README there for a description of the available plotting scripts. |
| 112 | |
| 113 | For example, |
| 114 | plot_example.m |
| 115 | plots the true and estimated mean RMS errors as a function of the |
| 116 | forgetting factor. For the usage of the other functions, use 'help' |
| 117 | in Matlab. |
| 118 | |
| 119 | |
| 120 | |