Additions to NEWFIT

Information on the Model Validation Kit | Notes on ASTM procedure

Note of November 14, 2003:
This is a set of notes prepared by H.R. Olesen of NERI, Denmark. It is meant only for readers who wish to dive deeply into working with the ASTM procedure. Much of the information found here is not any longer relevant, as the software related to the methodology has changed since I wrote the notes.


Additions to NEWFIT
This file describes changes and additions to NEWFIT as made by H.R.
Olesen, NERI, Denmark.
The point of departure is the NEWFIT version dated February 12, 1999,
and the resulting code is available as NF.FOR, dated March 5, 1999.

Note 1: the indication of date in the NEWFIT code is ambiguous, as
        the following statements are found in the program:
        *                   PROGRAM NEWFIT (VERSION 021299)
        *        DATE          : 1999-02-04
                 VERSION = 021299

Note 2: In previous versions of John Irwin's NEWFIT programme
        (including the version dated October 24, 1997) there was an error
        concerning division by 100.  This has been corrected in John's
        1999-version of NEWFIT.
        If you are in doubt whether you have a corrected verison then
        check the following statements in subroutine ARC
           INCORRECT VERSION:
               if( iplt.ne.6 ) then
               cmin = max(Omax,cmin)
               end if
           CORRECT VERSION
               if( iplt.ne.6 ) then
               cmin = max(Omax/100.,cmin)
               end if
      This serious error meant that only runs with IPLT=6 made sense.



The changes made by H.R. Olesen to NEWFIT concern:

1. New facility: Correct conversion from ppt to microgrammes/m3.
---------------------------------------------
A subroutine is added which reads additional information (a conversion
factor for each experiment) from the file ADD_INFO.DAT.

In order for the subroutine to work, the following changes must be made
to NEWFIT:
Add the new subroutine ADD_INFO.
Add a block of dimension and common statements in the main programme and
in subroutine PLOT

In subroutine PLOT this factor is used in the following cases:
1) When IPLT=4
2) When IPLT=5 or 6  (this changes results from those obtained by
John).


2. New facility: Input of plot option from command line.
---------------------------------------------
This addition is compiler specific. It works with Lahey Fortran, and
possibly also other compilers.
A declaration and a block of executable statements is included in
subroutine SETUP. One of the statements is a call of the Lahey routine
GETCL() which reads characters from the command line.

If the user calls NEWFIT.EXE file with a value for IPLT indicated
on the command line, this value will override the one supplied in
the large input data file, INPUT.DAT

Thus, issue the command
   NEWFIT 4
in order to force IPLT to a value of 4 (implying that output will be
sent to NEARCNTR.DAT and be in normalised concentration units.

3. Correction: Bringing TSTFIT to work as before with options IPLOT=3 and 4.
---------------------------------------------
John has moved a check whether the fitting has been succesful
(IERR > 0 and SIGY positive).
It used to be in the main program just before the call of PLOT, but has
been moved to routine PLOT. Furthermore, the check is only made if
ICOORD is 0 or 1.
I only want to write a line to NEARCNTR.DAT if fitting has been
succesful, so I have added a check before writing the line.
In subroutine PLOT, I have also added a couple of statements to
ensure that the programme does not attempt to divide by zero when the
ratios R1 and R2 are computed.

4. Handling experiments with no meteorology
---------------------------------------------
The Model Validation Kit only includes the experiments with numbers from
1 to 171. John has included experiments with numbers from 172 to 197,
but there is no meteorology for these.
Also, there is no entries in ADD_INFO.DAT (my new file with conversion
factors)
In the beginning of routine PLOT, I check whether the information from
ADD_INFO.DAT is missing, and in that case I immediately return to the
main programme.

5. New facility: Including observations further away from the centerline
   than 0.67 sigma
---------------------------------------------
New option:  IPLT = 7 and 8 implies that output goes to file
FULLARCS.DAT.
This output resembles output for IPLT = 3 and 4. However, for IPLT=7 and
8, ALL observations output, irrespective of their distance from the
center line.  Unit 9 is used for FULLARCS.DAT.

Information on the Model Validation Kit | Notes on ASTM procedure

Homepage of "Harmonisation..." initiative

This page is maintained by Helge Rørdam Olesen

Document date: March 5, 1999.

[Dep. Homepage] Department of Atmospheric Environment, NERI