The program can either be used to select from a pre-existing set of microwindows, or to select new microwindows, or both. Selection is based on maximising a Figure of Merit (FOM), a scalar quantity which quantifies both the random and systematic error components of the retrieval.
An existing set of microwindows (in a `microwindow database' file) can be incorporated in three ways. In order of increasing complexity, these are
Searching for new microwindows, either from scratch or following on after incorporating an existing microwindow database, is a two-stage process
A related use of the program is to generate different `occupation matrices', optimal subsets of microwindows selected for a particular retrieval ranges and/or situations when measurements are missing in particular bands or tangent altitudes.
Then the module namfil.for should be edited so that the string constant PTBDIR (initially set to '/home/crun/eodg/mipas/spectra/') points to the top level directory that will contain the input spectra for the various atmospheres. The length of the character constant (C*30 initially) also has to be adjusted according to the new directory name (max of C*54).
NB: The subroutine dattim.for calls a FORTRAN 90 function DATE_AND_TIME in order to return the current date and time, written to some output files. This is not implemented for Sun systems, so a replacement subroutine date_and_time.for is supplied ( see Additional Software) and should be included in the directory before compilation.
The code can then simply be compiled as an executable mwmake using
f77 *.for -o mwmake
Jacobian spectra have names including "jac", e.g.
ptb_d06000.bin_day_jac_h2owhere d is the band, 06000 is the tangent height (6km), day is the atmosphere, h2o is the retrieved species.
Error spectra have names excluding "jac", e.g
ptb_d06000.bin_day_var_h2owhere var_h2o is the error source (variability of H2O, in this case),
Spectra exist for all 17 altitudes 6-68km represented in the nominal MIPAS scan pattern, but not all bands (eg there are no CH4 Jacobian or error spectra for the A band since there are no CH4 spectral features in the A band). The full list of spectra is given in the Appendix.
All these spectra should be placed in a subdirectories of the
top level directory (as defined by PTBDIR,
see section on Compiling MWMAKE).
./day/jac
day atmosphere, Jacobian spectra (anything with "jac" in the
filename)
./day/err
day atmosphere, error spectra (anything without "jac" in the
filename)
similarly for the other atmospheres ngt,
sum, win and equ
The spectra are generated as ASCII files (using the RFM), but, in order to save space and increase access speeds, stored as binary files (see binasc.f conversion program).
If it is necessary to access the spectra as ASCII files, just edit the filenames in namfil.for. The subroutine which actually opens the files (getspc.for) already checks for a string ".bin" in the filename and treats the file as binary/ASCII appropriately.
Back to Contents
On execution, MWMAKE
will prompt the user for information defining the task
to be performed, most of which have reasonable defaults (ie the user can type
a carriage return, indicated as <CR>).
Input can either be via a terminal, or using a driver file.
The driver file option can be invoked either by specifying the file name
in response to the first prompt, or directly using the Unix construction,
e.g.
mwmake < mwmake.drv
The terminal dialogue/prompts are described in sequence below, together with possible user responses and defaults.
or
Temp Accuracy requirement? [<CR>=3.0K]:
(if pT selected as the (first) target species.)
(v14MAY02 onwards) if a wavenumber range is specified, it is assumed
that this only applies to the search range for new microwindows.
However, if bands are specified it is assumed that this applies to
new microwindows and to included microwindows
(in earlier versions a specified wavenumber range also applied to both)
I-MWMAKE: No more MWs found
Increasing the minimum number of trials increases the
likelihood of a better MW being found at each stage, but also increases the
program time. 99 is the maximum that fits the 2-digit representation of
trial# in the diagnostics file.
['0001' in the prompt message will be replaced by
N+1 if an `included database' containing
microwindows up to number #N has been specified]
! MWMAKE Driver File ! Target species: ch4 ! Atmosphere: [day,ngt,sum,win,equ,glo,glw]: glw ! Temp Accuracy requirement? [ =3.0K]: ! Waveno.range or bands [ =all]: ab c d ! Merit(0:7), CPU Cost(0:9) and Mask(0:3) Fns? [ = 0 0 0]: 0 0 3 ! List of retrieval altitudes [km] [ =6,9,..68]: ! List of missing altitudes [km] [ =none]: ! NB: If any missing altitude specified, next entry should be response to ! prompt for missing bands ! Termination criteria Npt,NMW,DMrt,ReqF? [ = 5000 10 0.0 0.0]: ! Minimum ctm info/level [ =0 bits]: 5 ! Min,Max Trials for each new MW? [ = 30 99]: ! Exclude database: ! Include database: MW_CH4_103.DAT ! sort (only applies if an Include Database has been specified previously) N ! New MW#i from i=? (0=none) [ =0001]: 26 ! End
! Microwindow diag. 1020.200:2409.800 MRT=1 CPU=0 MSK=3 glw MWMAKE v.01MAR02 ! Sweep range= 6.0:68.0 Missing band=none Missing alt=none
CH4_0022 1607.750 1610.750 15 60 1573 918 2308 1225 19.802 4.405 12.036
34.4 38.2 41.0 35.5 32.3 32.0 36.0 42.7 41.9 40.6 45.1 49.6 48.3 59.8 86.7100.0
44.6 41.9 43.1 26.4 19.4 16.1 14.7 15.8 12.3 14.4 20.8 14.9 12.0 20.2 80.4 0.0
56.3 56.7 59.5 44.2 37.7 35.8 38.9 45.6 43.7 43.1 49.6 51.7 49.8 63.2118.2100.0
Trial# 5 Wno=1305.500[1305.750]1306.150 Alt=52[60]68 Npt= 81 Mer= 2.544*
I-OPTMSK: Iter# 0 Merit: 1.642324 NMask: 500
I-OPTMSK: Iter# 5 Merit: 1.655388 NMask: 495
I-MWMWRT: Terminated due to No.MWs = limit ( 5)
! MWMAKE error analysis 1020.200:2409.800 MRT=1 CPU=0 MSK=3 glw MWMAKE v.01MAR02 ! Sweep range= 6.0:68.0 Missing band=none Missing alt=none
3 17
tem pre h2o
6.0 9.0 12.0 15.0 18.0 21.0 24.0 27.0 30.0 33.0 36.0 39.0 42.0 47.0 52.0 60.0 68.0
hitran 6.5 13.4 5.7 4.7 3.2 4.6 3.4 1.8 1.2 1.2 1.4 1.2 1.2 2.2 2.5 0.0 0.0
! Microwindow list 1020.200:2409.800 MRT=1 CPU=0 MSK=3 glw MWMAKE v.01MAR02 ! Sweep range= 6.0:68.0 Missing band=none Missing alt=none
3 CH4_0022 1607.750 1610.750 15 60 6 1 3 4 10 8 11
27-MAR-2001 16:06:13.046000 # Oxf Occupation matrix 1020.200:2409.800 MRT=1 CPU=0 MSK=3 glw MWMAKE v.01MAR02
# OM label: OM_CH4_023
# Figure of Merit= 56.00363
# No of altitudes: 16
# Altitude bands: 51.50 54.50 48.50 51.50 .... 6.50 9.50
# Number of MWs: 10
CH4_0006 CH4_0004 CH4_0007 CH4_0001 CH4_0008 CH4_0009 CH4_0005 CH4_0002 CH4_0003 CH4_0010
# Occupation matrix: #B B B B B B B B B B 1 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 0 ... 1 1 1 1 1 1 1 1 0 1
# Retrieval vector: 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
# No. sweeps for which profile fitted 16
This value is determined within the function fmerit.for
Merit Functions
MWMAKE uses a merit function with the general form
The CPU time T required to perform a retrieval is (somewhat arbitrarily) represented by
The user-selected value of the CPU cost-function j (an integer in the range 0:9) determines how this time T is converted to CPU Cost C according to
For existing microwindows which have associated SVD-decomposed look-up tables (so that the total number of singular values, Nsv, is written in the database) there are additional CPU-cost functions which may be used to sort a database. These are used for values of j = A, B, C ... F (i.e. 10-15 in hexadecimal notation). In these cases, the CPU cost is modified so that Npt is now scaled by Nsv/100:
There are two methods for growing microwindows
Apart from lack of improvement, growth can also be truncated by specified altitude/wavenumber boundaries, or by a maximum width requirement of 3cm-1 (w=121 spectral points @ 0.025cm-1 resolution).
Note that the Edgewise algorithm will only produce contiguous microwindows (all points set `True', meaning `use all points withing boundaries'), while the Pointwise algorithm will generally produce perforated algorithms by choosing to omit certain points (set `False').
For microwindows grown pointwise, there are two further steps which can be applied to optimise the mask (applied to the finally selected microwindow only:
(v14MAY02 onwards) Remask: for included microwindows, there is a further option which is to reapply mask optimisation plus uniformity. This creates new microwindows but constrained to have the same altitude/wavenumber boundaries as the old microwindow. Any subsequent microwindows which are grown are then generated pointwise, also applying mask optimisation plus mask uniformity.
The particular growth algorithm used is determined by a user-supplied Mask Function, a parameter in the range 0-3.
When sets of microwindows are to be `excluded' or `included', these have to be contained in a single database file (use imkmrg.for).
Errors due to Gain, ILS and HITRAN uncertainties are assumed uncorrelated between microwindows. Errors due to temperature and pointing are assumed uncorrelated between tangent altitudes.