Changes between Version 33 and Version 34 of Lorenz_96_model


Ignore:
Timestamp:
Jan 29, 2020, 5:50:07 PM (5 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Lorenz_96_model

    v33 v34  
    33[[PageOutline(2-3,Contents of this page)]]
    44
    5 The implementation of the Lorenz-96 model coupled to PDAF is in the directory `testsuite/src/lorenz96/` of the PDAF package.
     5The 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`).
    66Provided is a full implementation of PDAF with the nonlinear Lorenz96 model (E. N. Lorenz (1996) Predictability - a problem partly
    77solved. 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.
     
    1010allow to run a test case and to display the outputs. Note, that this implementation runs without parallelization.
    1111
    12 This description focuses on PDAF version 1.13.2 and later as we have revised the Lorenz-96 model case for version 1.13.2.
     12This 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`.
    1313
    1414
     
    2929to deactivate the coupling to PDAF in the model code. Now build the forward model program with
    3030{{{
    31   cd testsuite/src
     31  cd models/lorenz96
    3232  make lorenz_96 PDAF_ARCH=linux_gfortran
    3333}}}
    34 in the directory `testsuite/src/` of the PDAF package. You have to ensure
     34You have to ensure
    3535that in the machine-specific make include file `linux_gfortran.h` `-DUSE_PDAF` is not defined
    3636for 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/`.
     37is generated in this directory.
    3838
    3939'''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`. 
     
    4141To run the forward model use
    4242{{{
    43   cd ../bin
    4443  ./lorenz_96 -total_steps 10000
    4544}}}
     
    5049To build the executables for the tool programs use
    5150{{{
    52   cd ../src/lorenz96/tools
     51  cd tools
    5352  make all PDAF_ARCH=linux_gfortran
    5453}}}
     
    6261  ./generate_covar
    6362}}}
    64 to generate a file holding observations (`obs.nc` in testsuite/bin/) and
     63to generate a file holding observations (`obs.nc` in models/lorenz96/) and
    6564a file holding the covariance matrix information (`covar.nc` in
    66 testsuite/bin/), which is used to generate an initial ensemble for
     65models/lorenz96/), which is used to generate an initial ensemble for
    6766the data assimilation experiments.
    6867
     
    7271Now do
    7372{{{
    74   cd ../../../../make.arch
     73  cd ../../make.arch
    7574}}}
    7675and change in the file `linux_gfortran.h` the line
     
    8786coupling to PDAF. First clean the directories for the main driver and the Lorenz-96 model using
    8887{{{
    89   cd ../testsuite/src
     88  cd ../models/lorenz96
    9089  make cleandriver PDAF_ARCH=linux_gfortran
    9190  make cleanlorenz_96 PDAF_ARCH=linux_gfortran
     
    9695  make pdaf_lorenz_96 PDAF_ARCH=linux_gfortran
    9796}}}
    98 The program `pdaf_lorenz_96` is generated in testsuite/bin.
     97The program `pdaf_lorenz_96` is generated.
    9998
    10099
    101100To run the assimilation program, do
    102101{{{
    103   cd ../bin
    104   ../src/lorenz96/tools/runasml.sh
     102  ./tools/runasml.sh
    105103}}}
    106104The script runsasml.sh runs 11 experiments with a fixed ensemble size, but
     
    112110To 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
    113111{{{
    114 cd ../src/lorenz96/plotting/
     112cd plotting
    115113}}}
    116114
     
    139137
    140138'''!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]]
    145143
    146144'''Python plotting'''[[BR]]
     
    149147The module can either be imported, e.g. to use its functions interactively:[[BR]]
    150148`>>> import plot_l96`[[BR]]
    151 `>>> plot_l96.plot_obs('../../../bin/obs.nc', 4)`[[BR]]
     149`>>> plot_l96.plot_obs('../obs.nc', 4)`[[BR]]
    152150
    153151Alternatively the script can be run from the command line, providing the function
    154152name 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]]
    156154(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`
    159157
    160158