15 December 2003
MONITORING OF
PHYSICAL TENDENCIES
Tomislav Kovacic
The main idea of monitoring the physical tendencies is
to find out those cases when they cause blow up of the model or just a bad
score. The monitoring system consists of three parts,
these are: computation of frequency distributions, finding the points with
absolute values of physical tendencies exceeding prescribed threshold value and
output of 1D profiles at those points.
The description of the
physical parameterisations in the ARPAGE-ALADIN model is given in model
documentation (Gerard, 2001). Here, only those aspects of it will be presented
which are connected with implementation of diagnostic of physical tendencies.
The effect of physical
processes is introduced in the model by addition of physical tendencies to the
time changes of the model variables. A physical tendency for each variable is a
sum of effects of all parameterised physical processes.
Calculations of the
physical parameterisations take place in the part of the model where the
calculations in the grid points are made, and this is a subroutine CPG. CPG
calls the subroutine MF_PHYS which contains all calculations of physical
parameterisations and physical tendencies. These calculations are made by calls
to subroutines APLPAR, CPFHPFS and CPTEND. At the end of the calls to these
subroutines following physical tendencies are available:
U component of wind
tendency (PTENDU),
V component of wind
tendency (PTENDV),
enthalpy tendency
(ZTENDH),
specific moisture
tendency (ZTENDQ),
specific content of ice
tendency (ZTENDQI),
specific content of
liquid water tendency (ZTENDQL).
The names in the
brackets are those used in MF_PHYS.
The monitoring and
diagnostics of physical tendencies is done on these six tendencies.
The first stage in
recognising the unusual cases is to find statistical characteristic of physical
tendencies. As for our purpose only those cases with great absolute values of
physical tendencies are interesting, frequency distributions of absolute values
of physical tendencies are the statistical characteristic we are interested in.
As values of the
physical tendencies spread over several decimal orders of magnitude, decimal
logarithms of their absolute values must be used for frequency distribution
curve. This defines the variable x for which the frequency distribution curve
is calculated as
where j is any variable of the model.
If x1 is
the lowest value and xN the highest value of x we define the
WIDTH of frequency distribution as
This interval is devided
in equal classes. We define precision of classes as
(PREC-1)*100
gives percent of maximal change of tendency within the classe. Number of
classes is given with
There is a one class
more for all values x greater then xN.
Computation of
frrequenci distributions will not be used in operational work of the model, but
only for finding threshold values for high values of tendencies.
Extraction of points with physical tendencies
exceeding the threshold value
On the bases of
frequency distributions for all tendencies, for each one of them, we can chose
a threshold values and find those points in the 3D space of the model whert at
least one of tendencies eqceedes its thrershold value. Such points will be
saved for each time step and analysed later. This diagnostics will be used in
operational work of the model.
Extraction of profiles
For further investigation of physical
parametrisations, the 1D vertical profiles at the geographycal position of
extracted points are extracted for all those fields needed for SCM (Single
Column Model).
Application in the code
The ways of usage of the system for monitoring of
physical tendencies is controlled by variables put in the namelist NAMCHET,
which is declared in heather file namchet.h. It is declared as follows
NAMELIST /NAMCHET/ LCTFREQ,
LCTCOOR, LCTPROF, CTHRVALS, WIDTH, APREC, &
& STARTCLASS, NPROFMAX
The variables included in the namelist are declared in module YOMCHET and their meanings and default values are explained here.
LCTFREQ is a logical variable. When it’s value is
.TRUE. the calculation of frequency distributions is enabled. For each time
step the frequency distributions will be calculated and written to the file
CHET.FREQ.lfa .
LCTCOOR is a logical variable. When it’s value is
.TRUE. searching for points with at least one of phys. tend. exceeding the
threshold value is enabled. At each time step these points will be written to
the file CHET.COORD.lfa
LCTPROF is a logical variable. When it’s value is
.TRUE. It enables the extraction of 1-D
vertical profiles at points with at least one tendency exceeding its threshold
values. The profiles are extracted for each time step and written to the file
ChetProfile.p+nnnn, where p stays for the point number and
nnnn for the number of the time step.
CTHRVALS is a character array with descriptions of
threshold values for physical tendencies. A description of threshold value
consists of two fields. The first field is for entering the tendency name, and
the second field is for precision. The lengths of fields are given with
parameters NAMELENTH and NCTHLEN, which are defined in module YOMCHET. Present
values are 20 and 7. If the name is shorter than length of its field, field
must be filled with blanks to reach its given length. The position of
description in the array is essential because each tendency has fixed index in
array.
WIDTH is a real variable containing the number of
decimal orders over which the values of the physical tendencies are spread (see
A.3.).
APREC is a real variable that contains the
antilogarithm of class width on log-scale (see PREC in A.3.), it defines a
precision of dividing the data in classes.
STARTCLASS is
a real array and it contains the values of tendencies at the upper limit of the
first class, the value at lower limit is zero. The position in the array is
essential because each tendency has fixed index in array. Although all
variables have same number of decimal orders and precision, their values can be
shifted several orders of magnitude one to another, as they are themselves not
of the same order.
NPROFMAX is an integer variable in which the maximal
number of SCM profiles is written. The number of profiles must be limited
because in the case that some tendencies have too low thresholds too many
output files are produced vesting a space on disk. In the case when the number
of points in which threshold was exceeded is greater then this limit the
execution of program is aborted, and threshold values in namelist must be
increased.
The inices of the tendencies in the arrays are
following:
Phys. tend. of U component of wind 1
Phys. tend. of V component of wind 2
Phys. tend. of enthalpy 3
Phys. tend. of specific moisture 4
Phys. tend. of ice specific contend 5
Phys. tend. of water specific contend 6
This indeces have name KVAR when they are used as the
arguments of subroutines.
The default values for the variables in the namelist
NAMCHET are listed here
LCTFREQ= .FALSE.
LCTCOOR= .FALSE.
LCTPROF= .FALSE.
CTHRVALS(1)= 'PTENDU 2.6E-3'
CTHRVALS(2)= 'PTENDV 2.6E-3'
CTHRVALS(3)= 'PTENDH 2.369 '
CTHRVALS(4)= 'PTENDQ 8.2E-7'
CTHRVALS(5)= 'PTENDQI 8.2E-7'
CTHRVALS(6)= 'PTENDQL 8.2E-7'
WIDTH= 8.0_JPRB
APREC= 1.1_JPRB
STARTCLASS(1)= 1.0E-9_JPRB
STARTCLASS(2)= 1.0E-9_JPRB
STARTCLASS(3)= 1.0E-6_JPRB
STARTCLASS(4)= 1.0E-13_JPRB
STARTCLASS(5)= 1.0E-13_JPRB
STARTCLASS(6)= 1.0E-13_JPRB
NPROFMAX= 10
All global data needed for monitoringof physical
tendencies are contained in this module. Two new data types are
introduced to keep all information about physical tendencies in one global
variable GCHET.
New types TYPE_CHET and TY_PHYS_TEND_PT
A new type TYPE_CHET, with the structure shown bellow, contains all the
information about physical tendencies.
TYPE TYPE_CHET
LOGICAL ::
LCHET
LOGICAL ::
LCOORD
LOGICAL :: LGPROF
CHARACTER(4) :: CEXPNM
CHARACTER(NAMELENTH), POINTER, &
& DIMENSION(:) :: CVARNA
INTEGER_M :: NVPHT
INTEGER_M ::
NWIDTH
INTEGER_M :: NPHTEXTH
REAL_B ::
ATIMEST
REAL_B ::
APREC
REAL_B ::
AWIDTH
REAL_B,POINTER, &
& DIMENSION(:,:) :: ACLASS
REAL_B,POINTER, &
& DIMENSION(:,:) :: FQDIST
REAL_B,POINTER, &
& DIMENSION(:,:) :: ACUMFQ
REAL_B,POINTER, &
& DIMENSION(:) :: TENDTHRESH
TYPE(TY_PHYS_TEND_PT), POINTER, &
& DIMENSION(:) :: APOINT
END TYPE TYPE_CHET
The meaning of the components of TYPE_CHET is as follows:
LCHET
: switch for freq. distr.
calculations, it is assigned the value
of
LCTFREQ from NAMCHET, and has the same
meaning.
LCOORD :
switch for extraction of points, it is assigned the value of
LCTCOOR from NAMCHET, and has the same
meaning.
LGPROF
: switch for extraction of
profiles, it is assigned the value of
LCTCOOR from NAMCHET, and has the same
meaning.
CEXPNM :
the name of the ARPAGE/ALADIN job, the same as
CNMEX from module YOMSSA
CVARNA :
the array with names of variables, used for output. Its
values are assigned in SUCHED, and can be a
default name
or the name from CTHRVALS variable from
namelist
NVPHT :
number of variables for which phys. tendency diagnostics
is done, it is set in SUQCHET
NWIDT :
number of classes for frequency distributions (see A.3)
NPHTEXTH : number of points with phys. tend. exceeding
the threshold
ATIMEST :
the time step
APREC :
precision (see A.3)
AWIDTH :
number of decimal orders of magnitude for interval in
which frequency distribution is calculated
(see A.3)
FQDIST : array with frequency distributions of
phys. tend.
ACUMFQ :
array with cumulative frequency distribution
APOINT :
array with points where threshold value is exceeded
The points with absolute values of tendencies
exceeding a threshold value are described with structure given with the type TY_PHYS_TEND_PT, and its definition is given bellow:
TYPE TY_PHYS_TEND_PT
REAL_B ::
ALAT ! latitude
in radians
REAL_B ::
ALONG ! longitude in radians
REAL_B ::
HEIGHT ! height in
meters
REAL_B ::
TEND_VAL ! value of
exceeded tendency
INTEGER_M ::
NCHETLONG ! the index of point
in the work space
END TYPE TY_PHYS_TEND_PT
The global
variable GCHET
The global variable GCHET of type TYPE_CHET is the central point in monitoring of physical
tendencies. The yob done by all subroutines in monitoring of phys. tend. is
mainly to something with its components.
Set up and reset, SUCHET and RESETCHET
SUCHET
Subroutine SUCHET prepares the global variable GCHET
for computations. It first initialises namelist NAMCHET variables assigning
them default values and then reads namelist. After that, values of GCHET’s
components are assigned, and pointers are allocated.
It is called from SU0YOMA, and must be called before
time step loop.
RESETCHET
Subroutine RESETCHET resets some of the GCHET’s
component for calculations in a next time step. It is called from CNT4.
Frequency distribution, CPCHET and WRITECHET
CPCHET
Within subroutine CPCHET frequency distributions for
six physical tendencies are calculated. It calls CPCHET_1, which calculates
frequency distribution for each physical tendency
.Arguments of CPCHET are:
KPROMA :
horizontal dimension
KSTART
: first element of work
KPROF
: last element of work.
KFLEV
: number of levels in grid point
space
PTENDU
: "U"-wind tendency
due to physics.
PTENDV
: "V"-wind tendency
due to physics.
PTENDH
: Enthalpy tendency.
PTENDQ
: Moisture tendency.
PTENDQI
: Ice tendency.
PTENDQL : Liquid water tendency.
CPCHET_1
Subroutine CPCHET_1 calculates frequency distribution
for one physical tendency. It is called from CPCHET
Arguments of CPCHET_1 are:
KVAR :
index of physical tendency (see B.1)
KPROMA :
horizontal dimension
KSTART :
first element of work
KPROF :
last element of work.
KFLEV :
number of levels in grid point space
PTEND
: array with physical tendency
for chosen variable (KVAR).
WRITECHET
Subroutine WRITECHET
writes frequency distributions to the file CHET.FREQ.lfa. It is called from
subroutine CNT4, from the main time loop.
Argument of WRITECHET is:
KTSNO : number of the time step
Extraction of points, CHETEXTH
Within CHETEXTH points in which at least one of total
tendencies exceeds its threshold value are found and written to file. This is
achieved by calls to subroutine CHETEXTH_1 for the each one of total tendencies
Arguments of
CHETEXTH:
KPROMA :
horizontal dimension
KSTART
: first element of work
KPROF
: last element of work.
KFLEV
: number of levels in grid point
space
KTSNO : time-step number
PTENDU
: "U"-wind tendency
due to physics.
PTENDV
: "V"-wind tendency
due to physics.
PTENDH
: Enthalpy tendency.
PTENDQ
: Moisture tendency.
PTENDQI
: Ice tendency.
PTENDQL : Liquid water tendency.
PHI : geopotential height on
interlayers at time t.
PHIF : geopotential height
on layers at time t.
Extraction of
points, CHETEXTH_1
Subroutine CHETEXTH_1 searches over all points of
working space for points where tendency that is passed as an argument exceeds
its threshold value. The points are stored in GCHET%APOINT, and written to file
CHET.KOORD.lfa.
Arguments of
CHETEXTH_1:
KVAR : index of physical
tendency
KPROMA :
horizntal dimension
KSTART : first element of work
KPROF
: last element of work.
KFLEV
: number of levels in grid point
space
PTEND : array with physical tendency, must be that
one to which
belongs index KVAR
Extraction of profiles, PROFILECHET
Subroutine PROFILECHET writes to the file ChetProfile.p+nnnn
all values in the column over the geographical coordinates of the point needed
for run of SCM (Single Column Model). PROFILECHET is called from the subroutine
MF_PHYS, and aborts the program execution if the number of points exceeds
NPROFMAX (B.1).
Arguments of PROFILECHET are two numerous to be listed
here. They are mainly the same as those of WRITEPYSIO, except for second to
tenth argument in WRITEPYSIO, which are not needed in PROFILECHET, the first argument, although it ‘s
name is different in two subroutines, has the same meaning, it is a horizontal
dimension.
Modification of WRITEPHYSIO
A part of subroutine WRITEPHYSIO was extracted to new
subroutine WRITEPROFILE. And at that place a call to WRITEPROFILE is
inserted.
WRITEPROFILE
Subroutine WRITEPROFILE extracts from the models 3D
fields 1D fields for SCM calculations. The names of files have the form CDNAME.p+nnnn,
where p stays for the point number and nnnn for the number of the
time step and CDNAME is an argument of
subroutine.
First six arguments are:
CDNAME : the first part of the output file
name
KLON
: position of the nearest grid point in horizontal direction
PLAT_MODELE : latitude of the geographical point
PLON_MODELE : longitude of the geographical point
PD
: orthodromic distance to the nearest grid point
PHOUR
: time since the beginning of the prediction in hours.
Other arguments are the same as the corresponding
arguments in WRITEPHYSIO.
Output files
All output files are
written in the LFA format.
10.1 Description of the file CHET.FREQ.lfa
CLASSES1
CLASSES2
…
…
…
CLASSES6
FREQENCY DISTRIBUTIONS FOR TIME STEP 1
FREQENCY DISTRIBUTIONS FOR TIME STEP 2
…
…
…
FREQENCY DISTRIBUTIONS FOR TIME STEP last step
CLASSESi are written in subroutine SYCHET, and
frequency distributions in
WRITECHET.
CLASSESi are written for each variable, and each is a
series of NWIDT numbers which are the
values of tendency at the limits of classes.
The FREQENCY DISTRIBUTIONS FOR TIME STEP has following
fields:
INDEXP
TIME_STEP
FREQUENCY DISTRIBUTION 1
FREQUENCY DISTRIBUTION 2
…
…
…
FREQUENCY DISTRIBUTION last tendency
INDEXP is the name of experiment, it to CNMEXP
TIME_STEP is the time step length in seconds
The FREQUENCY DISTRIBUTION contains frequency
distribution for one
tendency, at
the given time step. It is a series of
NWIDT+1 numbers, that
are
frequencies for each class, and one more, the frequency for tendencies
greater then
value at the limit of the highest class.
10. 2
Description of file the file CHET.COORD.lfa
INDEXP
TIME_STEP
POINTS AT TIME STEP 1
POINTS AT TIME STEP 2
…
…
…
POINTS AT TIME STEP last time step
INDEXP is the name of experiment, it to CNMEXP
TIME_STEP is the time step length in seconds
POINTS AT TIME STEP is a series of points:
POINT 1
POINT 2
…
…
…
POINT n
POINT has following structure :
DESCRIPTOR
LONGITUDE
LATITUDE
HEIGHT OVER SEA
HEIGHT OVER OROGRAPHY
TIME STEP NUMBER
TENDENCY VALUE
DESCRIPTOR is a character string with tendency name
and number of class to which belongs
the value of tendency
Modification in SU0YOMA, CNT4 and MF_PHYS
In SU0YOMA the call to SUCHET is added.
In CNT4 calls to WRITECHET and RESETCHET are added.
In MF_PHYS CP calls to CHET, CHETEXTH and PROFILECHET
are added.