OPUR  


Experimental data processing

Data fitting by least squares method

The purpose of the fitting is to obtain the values of the adjustment parameters T0 , k and g (see our article). For the given T0 , a set of the optimal values for k and g is recorded for each day in the file k&g.txt, which is the main result of the data fitting procedure.
    To perform this data processing sequence, one needs the data files of homogeneous format. This concerns both the file name and its contents. The file format conventions (except for YYMMDDvi.txt) are very strict. We give examples for each file format that we use. All data files are ASCII (text) files. All of them are organized into tab-separated columns.

Four data files are needed as input: 

To start the processing, one needs to download seven executables available for Windows 98/NT4/2000/XP:

Algorithm of the data fitting:

  1. Put all files D_YYMMDDvi.txt into the same working directory <workdir>.

  2. Run in the MS-DOS window commands
    cd <workdir>
    dir >> list.txt
    The file list.txt is created. It contains the names of all the files as well as plenty of other information. Edit it by using the column block function (Alt+left mouse) of MS Word in order to clean up all other information and leave only the names of files which you put into <workdir>. Arrange these names into one column. Desired result

  3. Move n.txt and nebulo.exe into <workdir>. Edit list.txt using the Replace (Ctrl+H) function of MS Word, replacing (Replace All) ^p by ^pnebulo .
    NB: Type a space after "nebulo"! Edit the result and save it in n.bat. Run n.bat in the MS-DOS window. Check the date corresponding to each data file, confirm it by pressing <Enter>. The linearly interpolated cloud cover data is inserted into files D_YYMMDDvi.txt instead of zeros. The resulting file is saved as DN_YYMMDD.txt for each date. Instead of creating n.bat, you can run nebulo.exe many times opening one of your D_YYMMDDvi.txt files at a time.

  4. Edit the file list.txt using the column block function (Alt+left mouse) of MS Word to delete the columns with D_ and vi.txt. Desired result

  5. Move Mv_File.exe into <workdir>. Run it. The directory structure is created. Each newly formed directory <datedir> has a name YYMMDD. The files D_YYMMDDvi.txt and DN_YYMMDD.txt are moved into corresponding <datedir>.

  6. Move both Condenser7.2.exe and 2.txt into <workdir>. Find the optimal k value for each date from list.txt by fitting the condenser temperatures: run Condenser7.2.exe. Use DN_YYMMDD.txt as "File for Unit 1" and 2.txt as "File for Unit 2". Save "File for Unit 3" and "File for Unit 4" under the names 3.txt and FN_YYMMDD.txt in the corresponding <datedir>.

  7. Move Modif_File.exe into <workdir>. Run it. It will create 3_11.txt for each date.

  8. By now, each <datedir> should contain 3.txt, 3_11.txt, D_YYMMDDvi.txt, DN_YYMMDD.txt, and FN_YYMMDD.txt. Create the directory <workdir>\Testo. Move all the Testo data files YYMMDDvi.txt into it. Move Assm_File.exe into <workdir>. Run it.
    Assm_File.exe moves each YYMMDDvi.txt from <workdir>\Testo to <datedir>. Then it takes the measured water mass data from YYMMDDvi.txt, the k value from FN_YYMMDD.txt and inserts them into DN_YYMMDD.txt. The result is saved as M_YYMMDDvi.txt in <datedir>. Assm_File.exe requires list.txt as input.

  9. Find the optimal g value for each date by fitting the condensed water mass: move Condens11.exe into a <datedir>, run it; move it to the next <datedir>, etc. The files FM_YYMMDDvi.txt are created for each date. They contain all results of the fits: the measured and simulated time evolution of the water mass and condenser temperature calculated for the optimal values of k and g. These optimal values of k and g are recorded in the header.

  10. Move Extract kg.exe into <workdir>. Run it. It will create k&g.txt that will contain the values of k and g for each date.

Author: Vadim S. Nikolayev


International Organization For Dew Utilization                                                          To contact us
2001 O P U R. All rights reserved
Last Revision: 01.26.2006 .                                                                  [TO THE TOP]