Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It describes the blacklist language as well as its usage in IFS

Contents

 

  • 1 Introduction User's Guide to Blacklisting
  • 2 User's Guide to Blacklisting2 The Blacklist language
    • 2.1 Variables
      • 2.1.1 Report characteristics
      • 2.1.2 Model/first guess characteristics
      • 2.1.3 Observation characteristics
    • 2.2 Keywords
    • 2.3 Statements and operators
      • 2.3.1 IF-statement syntax
      • 2.3.2 List of the simple operators
      • 2.3.3 List of more complex operators
    • 2.4 Built-in functions
    • 2.5 Actions
    • 2.6 Variable declaration
  • 3 Operational and experimental use of blacklist
    • 3.1 Location of blacklist files
    • 3.2 Some guidelines
  • 4 Creating new blacklist file
    • 4.1 Usage of the blcomp
    • 4.2 Conversion from old to new blacklist
    • 4.3 C-code generation
    • 4.4 Linking with an application
    • 4.5 Combining conversion and object generation
    • 4.6 User interface
  • 5 Examples
    • 5.1 A simple example
    • 5.2 A more complex example
    • 5.3 Adding completely new variable to the system

 

1 Introduction

 

In the operational suite on Cray computer, the blacklist was basically a list of undesired stations to be excluded from the analysis in operations, and usually in prepan experiments, too, based on monthly monitoring by the Operations Department. The technique for blacklisting has been streamlined as a part of the migration of operational codes from Cray to Fujitsu.

...

This guide comprehensively describes the format of the blacklist language developed at ECMWF during the migration project in 1995-96 based on initial idea by Mats Hamrud.

 

2 The Blacklist language

 

The way the blacklisting now works in the IFS context is as follows. One edits a blacklist file which is written in a specific format. That file is then converted into a subroutine (C language) using the blacklist compiler. The subroutine is then compiled and linked into the executable. This external routine is called from the IFS with a list of arguments in the observation screening run. IFS then receives a few flags telling whether to reject or accept this station or variable for assimilation. The following example will clarify the consepts used in blacklisting.

...

Variables get their values from IFS. These are compared against the keywords or values given in the blacklist. If the blacklist rule is true, fail-function takes action activating blacklisting flags and returning back to the calling routine in IFS. Note that the blacklist language is case insensitive and no column orientation is required.

 

2.1 Variables

 

A list of variables that are currently defined in IFS is given below. Adding new variables, see for 5.3.
 

 

2.1.1 Report characteristics

 

 

 

The up to date list of variables related to observation header and model fields can be found on HPCF in the external file of our blacklist (for instance /home/rd/rdx/data/37r3/an/external_bl_mon_monit.b for CY37R3).

 Variable Meaning Possible values
 obstyp observation type Keyword (as listed below)
 statid station id Right justified 8 character string
 codtyp code type Integer value as defined in IFS
 instrm instrument type Integer value as defined in IFS
 date date Packed integer YYMMDD
 time time Packed integer HHMMSS
 lat latitude Real value in degrees (-90<=LAT<=90)
 lon longitude Real value in degrees (-180<LON<=180)
 stalt station altitude Real value in metres
 line_sat line position atovs Integer value
 retr_type retrieval type Integer value
 qi_fc EUMETSAT Quality Indicators: with forecast dependence 
 rff CIMSS Quality Indicator: Recursive Filter Flag 
 qi_nofc EUMETSAT Quality Indicators: without forecast dependence 
 sensor satellite sensor indicator (for RTTOV) Integer value
 fov field of view number Integer value
 satza satellite zenith angle Real value (in degrees)
 nandat analysis date Packed integer YYMMDD
 nantim analysis time Packed integer HHMMSS
 soe solar elevation Real value
 qr quality of retrieval 
 clc cloud cover 
 cp cloud top pressure 
 pt product type Integer value
 sonde_type sonde type Integer value
 specific amsua=clwp on sea 
 gen_centre Generating centre Integer value (WMO defined)
 gen_subcentre Generating sub-centre Integer value (WMO defined)
 datastream Data stream (see datastream in odb) Integer value
 ifs_cycle six digit IFS-cycle f.ex 331001 for CY33R1.001 6 digit integer value
 retrsource retrieval source Integer value
 surftype surface type indicator 
 sza solar zenith angle Real Value
 reportype MARS reportype Integer value for MARS archiving
 solar_hour solar hour Real value
 satellite_identifier satellite identifier Integer value
station_identifierstation identifier (for some conventional only)Integer value (similar to statid but for integer values only)

 

2.1.2 Model/first guess characteristics

 

 

 Variable Meaning Possible values
 modps model surface pressure Real Value
 modts model surface temperature Real Value
 modt2m model 2 metre temperature Real Value
 modtop  model top level pressure (hPa) Real Value
 sea_ice model sea-ice fraction  Real Value

 

2.1.3 Observation characteristics

 

 

External variables (SPECIAL, i.e. related to obs. body entry only)

 Variable Meaning Possible values
 variab variable name (varno in ODB)  Integer value
 vert_co  type of vert. coord.  Integer value
 press pressure (hPa)  Real value
 press_rl ref. level press. (hPa)  Real value
ppcode  synop press. code  Integer value
 obs_value observed value  Real value
 fg_departure  first guess depart.  Real value
 obs_error observation error  Real value
 fg_error first guess error  Real value
 winchan_dep window chan dep  Real value
 obs_t Obs temperature at same level, for R/S only.  Real value
 elevation Radar elevation  Real value
 winchan_dep2 alternative window chan dep  Real value
 tausfc Surface transmittance for AIRS screening.  Real value
 csr_pclear  percentage of clear pixel (GEOS) Real value



2.2 Keywords

 

Keywords are fixed values against which certain variables are compared. They should be consistent with the IFS definitions. A list of keywords that are currently defined in the blacklist (in the external file of our blacklist). Adding new keywords is straightforward.

 Variable Keyword
 OBSTYP

 synop, airep, satob, dribu, temp, pilot, satem, paob, scatt, limb, gbrad

(or integer values as defined in IFS)

 CODTYP

rtovs, tovs, ssmi, meris, am_profiler, jp_profiler, eu_profiler, templand, tempship, dropsonde, reo3, metar, pgps, radar_rr, rad1c, satem500, satem250

(or integer values as defined in IFS)

 SENSOR hirs, msu, ssu, amsua, amsub, ssmi_sensor, vtpr1, vtpr2, tmi, ssmis, airs, mhs, iasi, amsre, meteosat, msg, geosimg, mtsatimg, windsat, mwts, iras, mwri, envisat
 INSTRM mipas, gome, gomos, sciamachy, seviry, gome2, omi, toms, sbuv, auramls, iasi_reo3, modis_sensor, mopitt
 VARIAB u,v,z, z, dz, rh, q, pwc, rh2m, t, td, t2m, td2m, ts, ptend, w,ww, vv, ch, cm, cl, nh, nn, hshs, c, ns, s, e, tgtg, spsp1, spsp2, rs, eses, is, trtr, rr,jj,vs,ds, hwhw, dwdw, gclg, rhlc, rhmc, n, snra, ps, dd, ff, rawbt, rawra, satcl, scatss, du, dv, u10m, v10m, rhlay, auxil, cllqw, ambigv, ambigu, apdss, ro_bangk, rrefl, o3, hlos, no2, so2, co, hcho, go3, co2, ch4, aod, rao, od, rfltnc, lnprc
 LSMASK sea, land
 RLMASKtovsland
 PPCODE psealev, pstalev, g850hpa, g700hpa, p500gpm, p1000gpm, p2000gpm, p3000gpm, p4000gpm, g900hpa, g500hpa
 VERT_CO pressure, height, tovs_cha, sca
 RETR_TYP for TOVS cloudy, partly_cloudy, clear
 RETR_TYP for Satob wvcl, ir, vis, wv, comb_spec_channels, wvmw, wvcl1, wvcl2, wvcl3, ir1, ir2, ir3, vis1, vis2, vis3, wvmw1, wvmw2, wvmw3
 SONDE_TYPE for radiosondes st_avk_mrz, st_rs80_usa, st_rs80, st_rs90, st_viz
 DATASTREAM ears, pacrars, dbmodis
 ODB constants rmdi, ndmi (real values as defined in ODB)

 

 

 

 

 

 

 

 

2.3 Statements and operators

 

 

2.3.1 IF-statement syntax

 

The IF-statement syntax (note the semicolon (;) after each statement):

...

 Syntax Meaning

 

 if (condition) then
      statement_1;
      statement_2;
      etc.

 elif (condition) then
   statement_1;
   statement_2;
   etc.

 else
   statement_1;
   statement_2;
   etc.

endif 

IF-test with optional ELIF/ELSE-blocks.

Nested IF-tests are valid in every statement. Every IF-THEN or IF-THEN-ELSE must match an ENDIF

Condition can be any logical or arithmetic operation.

2.3.2 List of the simple operators

 

A list of operators that are currently defined in the Blacklist-language:

 

 

2.3.3 List of more complex operators

 

Somewhat more complex operators can also be used to simplify coding. For example the compound AND-operators below:

 

 

2.4 Built-in functions

 

The Blacklist-language also contains some built-in functions. They are listed below:

...

where the refdeg is radius of the circle on the Earth with the (reflat, reflon) as a center point of the circle. The (LAT, LON) is the position of the observation to be checked, i.e. LAT and LON of the report. All values are given in degrees. See also picture 2.1.

 

    
Figure 2.1: Schematic view of the rad()-function parameters.

...

  1. Convert all degrees to radians
  2. Calculate angle distance (in radians) relative to the center point
    obsdeg = acos( cos(reflat) cos(LAT) cos(LON-reflon) + 
    sin(reflat) sin(LAT) )
  3. Return one from rad, if , otherwise zero.

2.5 Actions

 

Finally, perhaps the most important function fail(). It returns information back to the application.

...

There is a range of values for ZCMCCC, and together with other information in the quality control, and a value less than one may still lead to the use of this variable in the assimilation. The inclusion of this option of non-strict blacklisting increases flexibility of the use of observations.

 

2.6 Variable declaration

 

Variable declaration has to be performed, if data will be passed from an application (like IFS) into the blacklist. This is normally done through external-declaration (see for 4.2 or 5.1). Also, selected variables can be protected by defining them as constants.

...

The simplest variable declaration is an assignment operation.

 

 

3 Operational and experimental use of blacklist

 

 

3.1 Location of blacklist files

 

 

3.2 Some guidelines

 

Please do not place any station identifiers into the data selection part of the blacklist. Instead, have them in the monthlt monitoring part. By this way we can have as few changes as possible in the data selection part and make e.g. re-analysis much easier.

After any modifications to the blacklist, please remember to recompile (preferably on a workstation) to check for syntax errors.

 

4 Creating new blacklist file

 

Blacklist compilation is fully controlled by the script called blcomp. It has the following capabilities:

...

  • Optionally convert from an old ASCII blacklist format to a new format

     

  • Check the syntax of a given blacklist

     

  • Create C-language file ( C_code.c) catered for observation processing

     

  • C-compile the C-file to create linkable object

4.1 Usage of the blcomp

 

The blcomp-script has the following usage:

...

By giving blcomp without arguments you will get the usage. If you fail to do this, check for your setting of the PATH-environment variable.

 

4.2 Conversion from old to new blacklist

 

Conversion from old to new and syntax checking of the new BLACKLIST-file can be accomplish in the following way:

...

This is exactly how the data selection part comes in in the production run, where instead of my_own_file is data selection part.

 

4.3 C-code generation

 

Enabling fast blacklist handling the blacklist file is always converted into an object file ( .o) meant to be linked with the (Fortran-)application (like IFS) in conjunction with the blacklist object library (normally libbl95.a).

...

    
blcomp -c blacklist_file.b
or
blcomp -c blacklist_file.B

 

 

4.4 Linking with an application

 

A Fortran-application (IFS) interfaces the blacklist via two subroutines:

...

The exact location of the blacklist library can be found via command:

 

blcomp -L

 

 

4.5 Combining conversion and object generation

 

If no data selection part is needed, one can combine conversion from old to new blacklist and object code generation described above:

...

blcomp -c -o old_text_blacklist_file newfile.b  
or
blcomp -c -o old_text_blacklist_file newfile.B

 

 

4.6 User interface

 

It is always recommended to (cold-)compile a modified blacklist on a workstation to check for syntax errors. If any errors are detected, the blcomp-command attempts to open an editor session and jump directly to the line where the (first) error occurred.

Sometimes this facility is not desirable and can be disabled by using -i flag in the blcomp-command.

 

5 Examples

 

The blacklist file is normally about 1 000 lines long. In order not to confuse readers, we will explain here with very short examples what can be done with the blacklist

 

5.1 A simple example

 

A fraction of an old blacklist ( old) looks like as follows:

...

if ( OBSTYP = synop ) then
if VARIAB in ( z, ps )
and STATID = " 3ELC"
then fail(); endif;

if VARIAB in ( z, ps, u10m, v10m )
and STATID = " ELBX3"
then fail(); endif;

return; endif;

if ( OBSTYP = airep ) then
if (VARIAB = t)
and STATID in ( " N503US", " UAL...")
then fail(); endif;

return; endif;

if ( OBSTYP = satob ) then
if STATID in ( " 0//", " 024")
then fail(); endif;

return; endif;

if ( OBSTYP = dribu ) then
if VARIAB in ( z, ps, u, v )
and STATID = " 46527"
then fail(); endif;

return; endif;

if ( OBSTYP = temp ) then
if (VARIAB = z)
and STATID = " ERES"
then fail(); endif;

return; endif;

if ( OBSTYP = pilot ) then
if VARIAB in ( u, v )
and STATID = " 08221"
then fail(); endif;

return; endif;

if ( OBSTYP = satem ) then
if STATID = " 201"
then fail(); endif;

return; endif;

 

 

5.2 A more complex example

 

The Blacklist compiler will generate quite a compact and readable code from the following excerpt:

...

if ( OBSTYP = synop ) then
if VARIAB in ( z, ps )
and STATID in ( " ATQM", " ATRK", " ATSR", " C6BB", " C6QK")
then fail(); endif;

return; endif;

if ( OBSTYP = airep ) then
if ( 50 >= PRESS >= 10 )
and STATID = " AN..."
then fail(); endif;

if ( ( LAT < -90 or LAT > 90 ) or ( -80 < LON < -40 ) )
and STATID = " NWA74"
then fail(); endif;

return; endif;

if ( OBSTYP = satob ) then
if ( ( LAT < -50 or LAT > 50 ) or ( -170 < LON < 90 ) )
and STATID = " 104"
then fail(); endif;

if ( ( LAT < -50 or LAT > 50 ) or ( LON < -50 or LON > 50 ) )
and ( 1000 >= PRESS >= 401 )
and STATID = " 035"
then fail(); endif;

return; endif;

if ( OBSTYP = temp ) then
if (VARIAB = z)
and ( 100 >= PRESS >= 10 )
and ( 110000 <= TIME <= 130000 )
and STATID = " 20674"
then fail(); endif;

if VARIAB in ( u, v )
and ( 50000 <= TIME <= 70000 )
and STATID = " 40179"
then fail(); endif;

return; endif;

if ( OBSTYP = pilot ) then
if VARIAB in ( u, v )
and ( 50000 <= TIME <= 70000 )
and STATID = " 40179"
then fail(); endif;

return; endif;

 

 

5.3 Adding completely new variable to the system

 

The current definition of variables can be checked from IFS source code in obs_preproc/blinit.F90. Adding new variables requires:

...

It describes the blacklist language as well as its usage in IFS 

Contents

  • 1 Introduction
  • 2 The Blacklist language
    • 2.1 Variables
      • 2.1.1 Report characteristics
      • 2.1.2 Model/first guess characteristics
      • 2.1.3 Observation characteristics
    • 2.2 Keywords
    • 2.3 Statements and operators
      • 2.3.1 IF-statement syntax
      • 2.3.2 List of the simple operators
      • 2.3.3 List of more complex operators
    • 2.4 Built-in functions
    • 2.5 Actions
    • 2.6 Variable declaration
  • 3 Operational and experimental use of blacklist
    • 3.1 Location of blacklist files
    • 3.2 Some guidelines
  • 4 Creating new blacklist file
    • 4.1 Usage of the blcomp
    • 4.2 Conversion from old to new blacklist
    • 4.3 C-code generation
    • 4.4 Linking with an application
    • 4.5 Combining conversion and object generation
    • 4.6 User interface
  • 5 Examples
    • 5.1 A simple example
    • 5.2 A more complex example
    • 5.3 Adding completely new variable to the system

1 Introduction

In the operational suite on Cray computer, the blacklist was basically a list of undesired stations to be excluded from the analysis in operations, and usually in prepan experiments, too, based on monthly monitoring by the Operations Department. The technique for blacklisting has been streamlined as a part of the migration of operational codes from Cray to Fujitsu.

...

This guide comprehensively describes the format of the blacklist language developed at ECMWF during the migration project in 1995-96 based on initial idea by Mats Hamrud.

 

2 The Blacklist language

The way the blacklisting now works in the IFS context is as follows. One edits a blacklist file which is written in a specific format. That file is then converted into a subroutine (C language) using the blacklist compiler. The subroutine is then compiled and linked into the executable. This external routine is called from the IFS with a list of arguments in the observation screening run. IFS then receives a few flags telling whether to reject or accept this station or variable for assimilation. The following example will clarify the consepts used in blacklisting.

...

Variables get their values from IFS. These are compared against the keywords or values given in the blacklist. If the blacklist rule is true, fail-function takes action activating blacklisting flags and returning back to the calling routine in IFS. Note that the blacklist language is case insensitive and no column orientation is required.

 

2.1 Variables

 

A list of variables that are currently defined in IFS is given below. Adding new variables, see for 5.3.
 

 

2.1.1 Report characteristics

 

The up to date list of variables related to observation header and model fields can be found on HPCF in the external file of our blacklist (for instance /home/rd/rdx/data/37r3/an/external_bl_mon_monit.b for CY37R3).

 Variable Meaning Possible values
 obstyp observation type Keyword (as listed below)
 statid station id Right justified 8 character string
 codtyp code type Integer value as defined in IFS
 instrm instrument type Integer value as defined in IFS
 date date Packed integer YYMMDD
 time time Packed integer HHMMSS
 lat latitude Real value in degrees (-90<=LAT<=90)
 lon longitude Real value in degrees (-180<LON<=180)
 stalt station altitude Real value in metres
 line_sat line position atovs Integer value
 retr_type retrieval type Integer value
 qi_fc EUMETSAT Quality Indicators: with forecast dependence 
 rff CIMSS Quality Indicator: Recursive Filter Flag 
 qi_nofc EUMETSAT Quality Indicators: without forecast dependence 
 sensor satellite sensor indicator (for RTTOV) Integer value
 fov field of view number Integer value
 satza satellite zenith angle Real value (in degrees)
 nandat analysis date Packed integer YYMMDD
 nantim analysis time Packed integer HHMMSS
 soe solar elevation Real value
 qr quality of retrieval 
 clc cloud cover 
 cp cloud top pressure 
 pt product type Integer value
 sonde_type sonde type Integer value
 specific amsua=clwp on sea 
 gen_centre Generating centre Integer value (WMO defined)
 gen_subcentre Generating sub-centre Integer value (WMO defined)
 datastream Data stream (see datastream in odb) Integer value
 ifs_cycle six digit IFS-cycle f.ex 331001 for CY33R1.001 6 digit integer value
 retrsource retrieval source Integer value
 surftype surface type indicator 
 sza solar zenith angle Real Value
 reportype MARS reportype Integer value for MARS archiving
 solar_hour solar hour Real value
 satellite_identifier satellite identifier Integer value
station_identifierstation identifier (for some conventional only)Integer value (similar to statid but for integer values only)

 

2.1.2 Model/first guess characteristics

 

 Variable Meaning Possible values
 modps model surface pressure Real Value
 modts model surface temperature Real Value
 modt2m model 2 metre temperature Real Value
 modtop  model top level pressure (hPa) Real Value
 sea_ice model sea-ice fraction  Real Value

 

2.1.3 Observation characteristics

 

External variables (SPECIAL, i.e. related to obs. body entry only)

 Variable Meaning Possible values
 variab variable name (varno in ODB)  Integer value
 vert_co  type of vert. coord.  Integer value
 press pressure (hPa)  Real value
 press_rl ref. level press. (hPa)  Real value
ppcode  synop press. code  Integer value
 obs_value observed value  Real value
 fg_departure  first guess depart.  Real value
 obs_error observation error  Real value
 fg_error first guess error  Real value
 winchan_dep window chan dep  Real value
 obs_t Obs temperature at same level, for R/S only.  Real value
 elevation Radar elevation  Real value
 winchan_dep2 alternative window chan dep  Real value
 tausfc Surface transmittance for AIRS screening.  Real value
 csr_pclear  percentage of clear pixel (GEOS) Real value



2.2 Keywords

 

Keywords are fixed values against which certain variables are compared. They should be consistent with the IFS definitions. A list of keywords that are currently defined in the blacklist (in the external file of our blacklist). Adding new keywords is straightforward.

 Variable Keyword
 OBSTYP

 synop, airep, satob, dribu, temp, pilot, satem, paob, scatt, limb, gbrad

(or integer values as defined in IFS)

 CODTYP

rtovs, tovs, ssmi, meris, am_profiler, jp_profiler, eu_profiler, templand, tempship, dropsonde, reo3, metar, pgps, radar_rr, rad1c, satem500, satem250

(or integer values as defined in IFS)

 SENSOR hirs, msu, ssu, amsua, amsub, ssmi_sensor, vtpr1, vtpr2, tmi, ssmis, airs, mhs, iasi, amsre, meteosat, msg, geosimg, mtsatimg, windsat, mwts, iras, mwri, envisat
 INSTRM mipas, gome, gomos, sciamachy, seviry, gome2, omi, toms, sbuv, auramls, iasi_reo3, modis_sensor, mopitt
 VARIAB u,v,z, z, dz, rh, q, pwc, rh2m, t, td, t2m, td2m, ts, ptend, w,ww, vv, ch, cm, cl, nh, nn, hshs, c, ns, s, e, tgtg, spsp1, spsp2, rs, eses, is, trtr, rr,jj,vs,ds, hwhw, dwdw, gclg, rhlc, rhmc, n, snra, ps, dd, ff, rawbt, rawra, satcl, scatss, du, dv, u10m, v10m, rhlay, auxil, cllqw, ambigv, ambigu, apdss, ro_bangk, rrefl, o3, hlos, no2, so2, co, hcho, go3, co2, ch4, aod, rao, od, rfltnc, lnprc
 LSMASK sea, land
 RLMASKtovsland
 PPCODE psealev, pstalev, g850hpa, g700hpa, p500gpm, p1000gpm, p2000gpm, p3000gpm, p4000gpm, g900hpa, g500hpa
 VERT_CO pressure, height, tovs_cha, sca
 RETR_TYP for TOVS cloudy, partly_cloudy, clear
 RETR_TYP for Satob wvcl, ir, vis, wv, comb_spec_channels, wvmw, wvcl1, wvcl2, wvcl3, ir1, ir2, ir3, vis1, vis2, vis3, wvmw1, wvmw2, wvmw3
 SONDE_TYPE for radiosondes st_avk_mrz, st_rs80_usa, st_rs80, st_rs90, st_viz
 DATASTREAM ears, pacrars, dbmodis
 ODB constants rmdi, ndmi (real values as defined in ODB)

 

 

 

 

 

 

 

 

2.3 Statements and operators

 

2.3.1 IF-statement syntax

 

The IF-statement syntax (note the semicolon (;) after each statement):

...

 Syntax Meaning

 

 if (condition) then
      statement_1;
      statement_2;
      etc.

 elif (condition) then
   statement_1;
   statement_2;
   etc.

 else
   statement_1;
   statement_2;
   etc.

endif 

IF-test with optional ELIF/ELSE-blocks.

Nested IF-tests are valid in every statement. Every IF-THEN or IF-THEN-ELSE must match an ENDIF

Condition can be any logical or arithmetic operation.

2.3.2 List of the simple operators

 

A list of operators that are currently defined in the Blacklist-language:

 

 

2.3.3 List of more complex operators

Somewhat more complex operators can also be used to simplify coding. For example the compound AND-operators below:

 

 

2.4 Built-in functions

 

The Blacklist-language also contains some built-in functions. They are listed below:

...

where the refdeg is radius of the circle on the Earth with the (reflat, reflon) as a center point of the circle. The (LAT, LON) is the position of the observation to be checked, i.e. LAT and LON of the report. All values are given in degrees. See also picture 2.1.

 

    
Figure 2.1: Schematic view of the rad()-function parameters.

...

  1. Convert all degrees to radians
  2. Calculate angle distance (in radians) relative to the center point
    obsdeg = acos( cos(reflat) cos(LAT) cos(LON-reflon) + 
    sin(reflat) sin(LAT) )
  3. Return one from rad, if , otherwise zero.

2.5 Actions

 

Finally, perhaps the most important function fail(). It returns information back to the application.

...

There is a range of values for ZCMCCC, and together with other information in the quality control, and a value less than one may still lead to the use of this variable in the assimilation. The inclusion of this option of non-strict blacklisting increases flexibility of the use of observations.

 

2.6 Variable declaration

Variable declaration has to be performed, if data will be passed from an application (like IFS) into the blacklist. This is normally done through external-declaration (see for 4.2 or 5.1). Also, selected variables can be protected by defining them as constants.

...

The simplest variable declaration is an assignment operation.

 

 

3 Operational and experimental use of blacklist

 

3.1 Location of blacklist files

 

3.2 Some guidelines

Please do not place any station identifiers into the data selection part of the blacklist. Instead, have them in the monthlt monitoring part. By this way we can have as few changes as possible in the data selection part and make e.g. re-analysis much easier.

After any modifications to the blacklist, please remember to recompile (preferably on a workstation) to check for syntax errors.

 

4 Creating new blacklist file

Blacklist compilation is fully controlled by the script called blcomp. It has the following capabilities:

...

  • Optionally convert from an old ASCII blacklist format to a new format

     

  • Check the syntax of a given blacklist

     

  • Create C-language file ( C_code.c) catered for observation processing

     

  • C-compile the C-file to create linkable object

4.1 Usage of the blcomp

The blcomp-script has the following usage:

...

By giving blcomp without arguments you will get the usage. If you fail to do this, check for your setting of the PATH-environment variable.

 

4.2 Conversion from old to new blacklist

 

Conversion from old to new and syntax checking of the new BLACKLIST-file can be accomplish in the following way:

...

This is exactly how the data selection part comes in in the production run, where instead of my_own_file is data selection part.

 

4.3 C-code generation

Enabling fast blacklist handling the blacklist file is always converted into an object file ( .o) meant to be linked with the (Fortran-)application (like IFS) in conjunction with the blacklist object library (normally libbl95.a).

...

    
blcomp -c blacklist_file.b
or
blcomp -c blacklist_file.B

 

4.4 Linking with an application

A Fortran-application (IFS) interfaces the blacklist via two subroutines:

...

The exact location of the blacklist library can be found via command:

 

blcomp -L

 

4.5 Combining conversion and object generation

If no data selection part is needed, one can combine conversion from old to new blacklist and object code generation described above:

...

blcomp -c -o old_text_blacklist_file newfile.b  
or
blcomp -c -o old_text_blacklist_file newfile.B

 

4.6 User interface

It is always recommended to (cold-)compile a modified blacklist on a workstation to check for syntax errors. If any errors are detected, the blcomp-command attempts to open an editor session and jump directly to the line where the (first) error occurred.

Sometimes this facility is not desirable and can be disabled by using -i flag in the blcomp-command.

 

5 Examples

The blacklist file is normally about 1 000 lines long. In order not to confuse readers, we will explain here with very short examples what can be done with the blacklist

 

5.1 A simple example

 

A fraction of an old blacklist ( old) looks like as follows:

...

if ( OBSTYP = synop ) then
if VARIAB in ( z, ps )
and STATID = " 3ELC"
then fail(); endif;

if VARIAB in ( z, ps, u10m, v10m )
and STATID = " ELBX3"
then fail(); endif;

return; endif;

if ( OBSTYP = airep ) then
if (VARIAB = t)
and STATID in ( " N503US", " UAL...")
then fail(); endif;

return; endif;

if ( OBSTYP = satob ) then
if STATID in ( " 0//", " 024")
then fail(); endif;

return; endif;

if ( OBSTYP = dribu ) then
if VARIAB in ( z, ps, u, v )
and STATID = " 46527"
then fail(); endif;

return; endif;

if ( OBSTYP = temp ) then
if (VARIAB = z)
and STATID = " ERES"
then fail(); endif;

return; endif;

if ( OBSTYP = pilot ) then
if VARIAB in ( u, v )
and STATID = " 08221"
then fail(); endif;

return; endif;

if ( OBSTYP = satem ) then
if STATID = " 201"
then fail(); endif;

return; endif;

 

5.2 A more complex example

The Blacklist compiler will generate quite a compact and readable code from the following excerpt:

...

if ( OBSTYP = synop ) then
if VARIAB in ( z, ps )
and STATID in ( " ATQM", " ATRK", " ATSR", " C6BB", " C6QK")
then fail(); endif;

return; endif;

if ( OBSTYP = airep ) then
if ( 50 >= PRESS >= 10 )
and STATID = " AN..."
then fail(); endif;

if ( ( LAT < -90 or LAT > 90 ) or ( -80 < LON < -40 ) )
and STATID = " NWA74"
then fail(); endif;

return; endif;

if ( OBSTYP = satob ) then
if ( ( LAT < -50 or LAT > 50 ) or ( -170 < LON < 90 ) )
and STATID = " 104"
then fail(); endif;

if ( ( LAT < -50 or LAT > 50 ) or ( LON < -50 or LON > 50 ) )
and ( 1000 >= PRESS >= 401 )
and STATID = " 035"
then fail(); endif;

return; endif;

if ( OBSTYP = temp ) then
if (VARIAB = z)
and ( 100 >= PRESS >= 10 )
and ( 110000 <= TIME <= 130000 )
and STATID = " 20674"
then fail(); endif;

if VARIAB in ( u, v )
and ( 50000 <= TIME <= 70000 )
and STATID = " 40179"
then fail(); endif;

return; endif;

if ( OBSTYP = pilot ) then
if VARIAB in ( u, v )
and ( 50000 <= TIME <= 70000 )
and STATID = " 40179"
then fail(); endif;

return; endif;

 

5.3 Adding completely new variable to the system

 

The current definition of variables can be checked from IFS source code in obs_preproc/blinit.F90. Adding new variables requires:

...