Changes between Version 33 and Version 34 of Lorenz_96_model
- Timestamp:
- Jan 29, 2020, 5:50:07 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Lorenz_96_model
v33 v34 3 3 [[PageOutline(2-3,Contents of this page)]] 4 4 5 The implementation of the Lorenz-96 model coupled to PDAF is in the directory ` testsuite/src/lorenz96/` of the PDAF package.5 The implementation of the Lorenz-96 model coupled to PDAF is in the directory `models/lorenz96/` of the PDAF package (from PDAF 1.15, before it was located in `estsuite/src/lorenz96`). 6 6 Provided is a full implementation of PDAF with the nonlinear Lorenz96 model (E. N. Lorenz (1996) Predictability - a problem partly 7 7 solved. Proceedings Seminar on Predictability, ECMWF, READING, UK) providing various filter and smoother methods. We used this implementation for different publications in which we studied the behavior of different data assimilation methods. … … 10 10 allow to run a test case and to display the outputs. Note, that this implementation runs without parallelization. 11 11 12 This description focuses on PDAF version 1.1 3.2 and later as we have revised the Lorenz-96 model case for version 1.13.2.12 This description focuses on PDAF version 1.15 and later as we have moved the Lorenz-96 model case in version 1.15 to the directory `models`. 13 13 14 14 … … 29 29 to deactivate the coupling to PDAF in the model code. Now build the forward model program with 30 30 {{{ 31 cd testsuite/src31 cd models/lorenz96 32 32 make lorenz_96 PDAF_ARCH=linux_gfortran 33 33 }}} 34 in the directory `testsuite/src/` of the PDAF package.You have to ensure34 You have to ensure 35 35 that in the machine-specific make include file `linux_gfortran.h` `-DUSE_PDAF` is not defined 36 36 for CPP_DEFS (such that calls to PDAF are not active). You can replace `linux_gfortran` by any other make include file from `make.arch/`, e.g. specify `macos_gfortran` for compiling on MacOS. The executable 37 is generated in `testsuite/bin/`.37 is generated in this directory. 38 38 39 39 '''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. On MacOS one can install the netcdf library e.g. using Fink or !MacPorts. NetCDF is a self-describing binary output format, but here it is not required that you know details about it. Anyway, if you like to look 'into' a NetCDF file, please try to use `ncdump FILENAME | less`. … … 41 41 To run the forward model use 42 42 {{{ 43 cd ../bin44 43 ./lorenz_96 -total_steps 10000 45 44 }}} … … 50 49 To build the executables for the tool programs use 51 50 {{{ 52 cd ../src/lorenz96/tools51 cd tools 53 52 make all PDAF_ARCH=linux_gfortran 54 53 }}} … … 62 61 ./generate_covar 63 62 }}} 64 to generate a file holding observations (`obs.nc` in testsuite/bin/) and63 to generate a file holding observations (`obs.nc` in models/lorenz96/) and 65 64 a file holding the covariance matrix information (`covar.nc` in 66 testsuite/bin/), which is used to generate an initial ensemble for65 models/lorenz96/), which is used to generate an initial ensemble for 67 66 the data assimilation experiments. 68 67 … … 72 71 Now do 73 72 {{{ 74 cd ../../ ../../make.arch73 cd ../../make.arch 75 74 }}} 76 75 and change in the file `linux_gfortran.h` the line … … 87 86 coupling to PDAF. First clean the directories for the main driver and the Lorenz-96 model using 88 87 {{{ 89 cd ../ testsuite/src88 cd ../models/lorenz96 90 89 make cleandriver PDAF_ARCH=linux_gfortran 91 90 make cleanlorenz_96 PDAF_ARCH=linux_gfortran … … 96 95 make pdaf_lorenz_96 PDAF_ARCH=linux_gfortran 97 96 }}} 98 The program `pdaf_lorenz_96` is generated in testsuite/bin.97 The program `pdaf_lorenz_96` is generated. 99 98 100 99 101 100 To run the assimilation program, do 102 101 {{{ 103 cd ../bin 104 ../src/lorenz96/tools/runasml.sh 102 ./tools/runasml.sh 105 103 }}} 106 104 The script runsasml.sh runs 11 experiments with a fixed ensemble size, but … … 112 110 To display the output of the assimilation experiments we provide plotting scripts for Matlab, Octave and (from PDAF 1.13.2) Python. To use them do 113 111 {{{ 114 cd ../src/lorenz96/plotting/112 cd plotting 115 113 }}} 116 114 … … 139 137 140 138 '''!Matlab/Octave plotting examples:'''[[BR]] 141 `plot_obs('../ ../../bin/obs.nc',100)` plots the observation at time step 100[[BR]]142 `plot_state('../ ../../bin/t1_N30_f0.97.nc',100,'f')` plots the forecast state estimate at the 100th analysis step[[BR]]143 `plot_rms('../ ../../bin/t1_N30_f0.97.nc')` plots the true and estimated RMS errors over time for the chosen experiment[[BR]]144 `plot_state('../ ../../bin/state.nc',1101)` plots the true state at model time step 1101 (= analysis step 100)[[BR]]139 `plot_obs('../obs.nc',100)` plots the observation at time step 100[[BR]] 140 `plot_state('../t1_N30_f0.97.nc',100,'f')` plots the forecast state estimate at the 100th analysis step[[BR]] 141 `plot_rms('../t1_N30_f0.97.nc')` plots the true and estimated RMS errors over time for the chosen experiment[[BR]] 142 `plot_state('../state.nc',1101)` plots the true state at model time step 1101 (= analysis step 100)[[BR]] 145 143 146 144 '''Python plotting'''[[BR]] … … 149 147 The module can either be imported, e.g. to use its functions interactively:[[BR]] 150 148 `>>> import plot_l96`[[BR]] 151 `>>> plot_l96.plot_obs('../ ../../bin/obs.nc', 4)`[[BR]]149 `>>> plot_l96.plot_obs('../obs.nc', 4)`[[BR]] 152 150 153 151 Alternatively the script can be run from the command line, providing the function 154 152 name and its argument as command line parameters:[[BR]] 155 `./plot_l96.py plot_obs ../ ../../bin/obs.nc 4`[[BR]]153 `./plot_l96.py plot_obs ../obs.nc 4`[[BR]] 156 154 (If this fails you can also try to run the script as 157 `python plot_l96.py plot_obs ../ ../../bin/obs.nc 4`). To plot only the Analysis RMS error one can use[[BR]]158 `plot_rms ../ ../../bin/t1_N30_f0.95.nc False True`155 `python plot_l96.py plot_obs ../obs.nc 4`). To plot only the Analysis RMS error one can use[[BR]] 156 `plot_rms ../t1_N30_f0.95.nc False True` 159 157 160 158