NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3miscan.f File Reference

Reads 1 ssm/i scan line from bufr d-set. More...

Go to the source code of this file.

Functions/Subroutines

subroutine misc01 (nnalg, gbalg, kdata, swnn, tpwnn, swgb, nrfgb)
 Prepares for in-line caluclation of prods.
 
subroutine misc04 (inlsf, blat, blng, lstag)
 Returns land/sea tag for given lat/lon.
 
subroutine misc05 (inlsf, numrgn,)
 Reads 2 records from land/sea tag database.
 
subroutine misc06 (ingbi, ingbd, idat1, idat2,,,,)
 Reads in nh and sh 1-deg.
 
subroutine misc10 (x, y)
 Calc.
 
function risc02 (xt, v, l, sst, jerr)
 Calc.
 
function risc02xx (x)
 Calc.
 
function risc03 (x)
 Calc.
 
subroutine w3miscan (indta, inlsf, ingbi, ingbd, lsat, lprod, lbrit, nnalg, gbalg, kdate, ldate, ignrtm, ibuftn, ibdate, ier)
 Reads one ssm/i scan line (64 retrievals) from the NCEP bufr ssm/i dump file.
 

Detailed Description

Reads 1 ssm/i scan line from bufr d-set.

Author
Dennis Keyser
Date
1996-07-30

Definition in file w3miscan.f.

Function/Subroutine Documentation

◆ misc01()

subroutine misc01 ( logical  nnalg,
logical  gbalg,
integer, dimension(7)  kdata,
  swnn,
  tpwnn,
  swgb,
  nrfgb 
)

Prepares for in-line caluclation of prods.

Author
Dennis Keyser
Date
1995-01-04 Based on input 7-channel ssm/i brightness temperatures, determines the rain flag category for wind speed product for the goodberlet algorithm. Then calls the appropriate function to calculate either the wind speed product for the goodberlet algorithm (if requested) or the wind speed and tpw products for the neural net 3 algorithm (if requested).

Program History Log:

Date Programmer Comment
????-??-?? W. Gemmill (w/nmc21) – original author
1995-01-04 Dennis Keyser – incorporated into w3miscan and

streamlined code 1996-05-07 | Dennis Keyser | (np22) – in-line neural network 1 algoritm replaced by neural network 2 algorithm 1996-07-30 | Dennis Keyser | (np22) – can now process wind speed from both algorithms if desired 1998-01-28 | Dennis Keyser | (np22) – replaced neural net 2 algorithm which calculated only wind speed product with neural net 3 algorithm which calculates both wind speed and total precipitable water products (among others) but, unlike nn2, does not return a rain flag value (it does set all retrievals to missing that fail rain flag and ice contamination tests)

Parameters
[in]NNALGProcess wind speed and tpw via neural net 3 algorithm if true
[in]GBALGProcess wind speed via goodberlet algorithm if true
[in]KDATA7-word array containing 7 channels of brightness temperature (kelvin x 100)
[out]SWNNalculated wind speed based on neural net 3 algorithm (meters/second)
[out]TPWNNCalculated total column precipitable water based on neural net 3 algorithm (millimeters)
[out]SWGBCalculated wind speed based on goodberlet algorith (meters/second)
[out]NRFGBRain flag category for calculated wind speed from goodberlet algorithm
Remarks
If an algorithm is not chosen, the output products are set to values of 99999. for that algorithm and, for the goodberlet algorithm only, the rain flag is set to 99999. Called by subroutine w3miscan().
Author
Dennis Keyser
Date
1995-01-04

Definition at line 1006 of file w3miscan.f.

◆ misc04()

subroutine misc04 (   inlsf,
  blat,
  blng,
  lstag 
)

Returns land/sea tag for given lat/lon.

Author
Dennis Keyser
Date
1995-01-04 Finds and returns the low resolution land/sea tag nearest to the requested latitude and longitude.

Program History Log:

Date Programmer Comment
1978-01-20 J. K. Kalinowski (S11213) Original author
1978-10-03 J. K. Kalinowski (S1214) Changes unknown
1985-03-01 N. Digirolamo (SSAI) Conversion to vs fortran
1995-01-04 Dennis Keyser Incorporated into w3miscan and streamlined code
Parameters
[in]INLSFUnit number of direct access nesdis land/sea file
[in]BLATLatitude (whole degrees: range is 0. to +90. north, 0. to -90. south)
[in]BLNGLongitude (whole degrees: range is 0. to +179.99 east, 0. to -180. west)
[out]LSTAGLand/sea tag {=0 - sea; =1 - land; =2 - coastal interface (higher resolution tags are available); =3 - coastal interface (no higher resolution tags exist)}
Remarks
Called by subroutine w3miscan.
Author
Dennis Keyser
Date
1995-01-04

Definition at line 1448 of file w3miscan.f.

◆ misc05()

subroutine misc05 (   inlsf,
  numrgn 
)

Reads 2 records from land/sea tag database.

Author
Dennis Keyser
Date
195-01-04 Reads two records from a low resolution land/sea database and stores into common.

Program History Log:

Date Programmer Comment
1978-01-20 J. K. Kalinowski (S11213) Original author
1995-01-04 Dennis Keyser Incorporated into w3miscan and

streamlined code; modified to be machine independent thru use of standard fortran direct access read

Parameters
[in]INLSFUnit number of direct access nesdis land/sea file
[in]NUMRGNThe region (1,2 or 3) of the database to be accessed (dependent on latitude band)
Remarks
Called by subroutne misc04.
Author
Dennis Keyser
Date
195-01-04

Definition at line 1517 of file w3miscan.f.

◆ misc06()

subroutine misc06 (   ingbi,
  ingbd,
integer, dimension(5)  idat1,
integer, dimension(5)  idat2 
)

Reads in nh and sh 1-deg.

sea-sfc temps.

Author
Dennis Keyser
Date
200-02-18 Reads in global sea-surface temperature field on a one-degree grid from grib file.

Program History Log:

Date Programmer Comment
????-??-?? W. Gemmill (NP21) Original author
1995-01-04 Dennis Keyser Incorporated into w3miscan and

streamlined code; converted sst input file from vsam/on84 to grib to allow code compile and run on the cray machines. 2000-02-18 | Dennis Keyser | Modified to call w3lib routine "getgb", this allows code to compile and run properly on ibm-sp

Parameters
[in]INGBIUnit number of grib index file for grib file containing global 1-degree sea-surface temp field
[in]INGBDUnit number of grib file containing global 1-degree sea-surface temp field
[in]IDAT1Requested earliest year(yyyy), month, day, hour, min
[in]IDAT2Requested latest year(yyyy), month, day, hour, min
Remarks
Called by subroutine w3miscan.
Author
Dennis Keyser
Date
200-02-18

Definition at line 1568 of file w3miscan.f.

◆ misc10()

subroutine misc10 ( dimension(in)  x,
dimension(out)  y 
)

Calc.

ssm/i prods from neural net 3 alg.

Author
V. Krasnopolsky
Date
1996-07-15 This nn calculates w (in m/s), v (in mm), l (in mm), and sst (in deg c). This nn was trained on blended f11 data set (ssmi/buoy matchups plus ssmi/ows matchups 15 km x 15 min) under clear + cloudy conditions.

Program History Log:

Date Programmer Comment
1996-07-15 V. Krasnopolsky Initial.
Parameters
[in]X5-word array containing brightness temperature in the order: t19v (word 1), t19h (word 2), t22v (word 3), t37v (word 4), t37h (word 5) (all in kelvin)
[out]Y4-word array containing calculated products in the order: wind speed (m/s) (word 1), columnar water vapor (total precip. water) (mm) (word 2), columnar liquid water (mm) (word 3), sea surface temperature (deg. c) (word 4)
Remarks
Called by subroutine risc02().
Author
V. Krasnopolsky
Date
1996-07-15

Definition at line 1237 of file w3miscan.f.

◆ risc02()

function risc02 ( real, dimension(7)  xt,
real  v,
real  l,
real  sst,
  jerr 
)

Calc.

ssm/i prods from neural net 3 alg.

Author
V. Krasnopolsky
Date
1997-02-02 This retrieval algorithm is a neural network implementation of the ssm/i transfer function. It retrieves the wind speed (w) at the height 20 meters, columnar water vapor (v), columnar liquid water (l) and sst. The nn was trained using back-propagation algorithm. Transfer function is described and compared with cal/val and other algorithms in omb technical note no. 137. See remarks for detailed info on this algorithm. This is an improved version of the earlier neural network 2 algorithm.

Program History Log:

Date Programmer Comment
1997-02-02 V. Krasnopolsky Initial.
Parameters
[in]XT7-word array containing brightness temperature in the order: t19v (word 1), t19h (word 2), t22v (word 3), t37v (word 4), t37h (word 5), t85v (word 6), t85h (word 7) (all in kelvin)
[in]VColumnar water vapor (total precip. water) (mm)
[in]LColumnar liquid water (mm)
[in]SSTSea surface temperature (deg. c)
[in]JERRError return code:
  • = 0 – Good retrievals
  • = 1 – Retrievals could not be made due to one or more brightness temperatures out of range (i.e, failed the rain flag test)
  • = 2 – Retrievals could not be made due to ice contamination {for either 1 or 2 above, all retrievals set to
  1. (missing)}
Remarks
Function, called by subroutine misc01.

Description of training and test data set:

The training set consists of 3460 matchups which were received from two sources:

  • 1. 3187 F11/SSMI/buoy matchups were filtered out from a preliminary version of the new NRL database which was kindly provided by G. Poe (NRL). Maximum available wind speed is 24 m/s.
  • 2. 273 F11/SSMI/OWS matchups were filtered out from two datasets collected by high latitude OWS LIMA and MIKE. These data sets were kindly provided by D. Kilham (University of Bristol). Maximum available wind speed is 26.4 m/s.

Satellite data are collocated with both buoy and OWS data in space within 15 km and in time within 15 min.

The test data set has the same structure, the same number of matchups and maximum buoy wind speed.

Description of retrieval flags:

Retrieval flags by Stogryn et al. are used. The algorithm produces retrievals under CLEAR + CLOUDY conditions, that is if:

  • T37V - T37H > 50. => CLEAR condition -or-
  • T37V - T37H =< 50.|
  • T19H =< 185. and |
  • T37H =< 210. and | => CLOUDY conditions
  • T19V < T37V |
Author
V. Krasnopolsky
Date
1997-02-02

Definition at line 1138 of file w3miscan.f.

◆ risc02xx()

function risc02xx ( dimension(in)  x)

Calc.

wspd from neural net 2 algorithm

Author
V. Krasnopolsky
Date
1996-05-07 Calculates a single neural network output for wind speed. the network was trained on the whole data set without any separation into subsets. It gives rms = 1.64 m/s for training set and 1.65 m/s for testing set. This is an improved version of the earlier neural network 1 algorithm.

Program History Log:

Date Programmer Comment
1994-03-20 V. Krasnopolsky Initial.
1995-05-07 V. Krasnopolsky Replaced with neural net 2 algorithm.
Parameters
[in]X5-Word array containing brightness temperature in the order: t19v (word 1), t22v (word 2), t37v (word 3), t37h (word 4), t85v (word 5) (all in kelvin)
Returns
XX Wind speed (meters/second)
Remarks
Function, no longer called by this program. It is here simply to save neural net 2 algorithm for possible later use (has been replaced by neural net 3 algorithm, see subr. risc02 and misc10).
Author
V. Krasnopolsky
Date
1996-05-07

Definition at line 1351 of file w3miscan.f.

◆ risc03()

function risc03 ( dimension(4)  x)

Calc.

w.spd from b temp.- goodberlet alg.

Author
W. Gemmill
Date
1994-08-15 Calculates a single goodberlet output for wind speed. This is a linear regression algorithm from 1989.

Program History Log:

Date Programmer Comment
1994-08-15 W. Gemmill Initial.
Parameters
[in]X4-word array containing brightness temperature in the order: t19v (word 1), t22v (word 2), t37v (word 3), t37h (word 4) (all in kelvin)
Returns
XX Wind speed (meters/second)
Remarks
Function, called by subroutine misc01.
Author
W. Gemmill
Date
1994-08-15

Definition at line 1412 of file w3miscan.f.

◆ w3miscan()

subroutine w3miscan (   indta,
  inlsf,
  ingbi,
  ingbd,
logical, dimension(240:249)  lsat,
logical  lprod,
logical  lbrit,
logical  nnalg,
logical  gbalg,
integer, dimension(5)  kdate,
integer, dimension(5)  ldate,
  ignrtm,
integer, dimension(1737)  ibuftn,
  ibdate,
  ier 
)

Reads one ssm/i scan line (64 retrievals) from the NCEP bufr ssm/i dump file.

Each scan is time checked against the user-requested time window and satellite id combinations. When a valid scan is read the program returns to the calling program. the user must pass in the type of the input ssm/i dump file, either derived products (regardless of source) or brightness temperatures (7-channels). If the latter is chosen, the user has the further option of processing, in addition to the brightness temperatures, in-line calculation of wind speed product via the goodberlet algorithm, and/or in-line calculation of both wind speed and total column precipitable water (tpw) products using the neural net 3 algorithm. If the wind speed or tpw is calculated here (either algorithm), this subroutine will check for brightness temperatures outside of a preset range and will return a missing wind speed/tpw if any b. temp is unreasonable. Also, for calculated wind speeds and tpw, this program will check to see if the b. temps are over land or ice, and if they are it will also return missing values since these data are valid only over ocean.

Program History Log:

Date Programmer Comment
1996-07-30 Dennis Keyser Original author - subroutine is a modified version of w3lib w3fi86 which read one scan line from the 30-orbit shared processing data sets
1997-05-22 Dennis Keyser Crisis fix to account for clon now returned from bufr as -180 to 0 (west) or 0 to 180 (east), used to return as 0 to 360 east which was not the bufr standard
1998-01-28 Dennis Keyser Replaced neural net 2 algorithm which calculated only wind speed product with neural net 3 algorithm which calculates both wind speed and total precipitable water products (among others) but, unlike nn2, does not return a rain flag value (it does set all retrievals to missing that fail rain flag and ice contamination tests)
1998-03-30 Dennis Keyser Modified to handle neural net 3 ssm/i products input in a products bufr data dump file; now prints out number of scans processed by satellite number in final summary
1998-10-23 Dennis Keyser Subroutine now y2k and fortran 90 compliant
1999-02-18 Dennis Keyser Modified to compile and run properly on ibm-sp
2000-06-08 Dennis Keyser Corrected mnemonic for rain rate to "reqv" (was "prer" for some unknown reason)
2001-01-03 Dennis Keyser Changed units of returned rain rate from whole mm/hr to 10**6 mm/sec, changed units of returned surface temp from whole kelvin to 10**2 kelvin (to incr. precision to that orig. in input bufr file)
2004-09-12 Dennis Keyser Now decodes sea-surface temperature if valid into same location as surface temperature, quantity is surface temperature if surface tag is not 5, otherwise quantity is sea-surface temperature (ncep products data dump file now contains sst); checks to see if old or new version of mnemonic table bufrtab.012 is being used here (old version had "ph2o" instead of "tpwt", "sndp" instead of "tosd", "wsos" instead of "wspd" and "ch2o" instead of the sequence "metfet vilwc metfet"), and decodes using whichever mnemonics are found {note: a further requirement for "vilwc" is that the first "metfet" (meteorological feature) in the sequence must be 12 (=cloud), else cloud water set to missing, regardless of "vilwc" value}
2011-08-04 Dennis Keyser Add ibdate (input bufr message date) to output argument list (now used by calling program prepobs_prepssmi)
Parameters
[in]INDTAUnit number of ncep bufr ssm/i dump data set
[in]INLSFUnit number of direct access nesdis land/sea file (valid only if lbrit and either nnalg or gbalg true).
[in]INGBIUnit number of grib index file for grib file Containing global 1-degree sea-surface temp field. (valid only if lbrit and either nnalg or gbalg true).
[in]INGBDUnit number of grib file containing global 1-degree Sea-surface temp field (valid only if lbrit and either. Nnalg or gbalg true).
[in]LSAT10-word logical array (240:249) indicating which Satellite ids should be processed (see remarks)
[in]LPRODLogical indicating if the input bufr file contains Products (regardless of source) - in this case one or. More available products can be processed and returned.
[in]LBRITLogical indicating if the input bufr file contains Brightness temperatures - in this case b. temps are. Processed and returned along with, if requested, in-. Line generated products from one or both algorithms. (see next two switches).
  • The following two switches apply only if lbrit is true --—
[in]NNALGIndicating if the subroutine should calculate and return ssm/i wind speed and tpw via the neural net 3 algorithm (note: b o t h wind speed and tpw are returned here)
[in]GBALGIndicating if the subroutine should calculate and return ssm/i wind speed via the goodberlet algorithm
[in]KDATERequested earliest year(yyyy), month, day, hour, Min for accepting scans.
[in]LDATERequested latest year(yyyy), month, day, hour, Min for accepting scans.
[in]IGNRTMSwitch to indicate whether scans should be time- Checked (= 0) or not time checked (=1) {if =1, all. Scans read in are processed regardless of their time.. The input arguments "kdate" and "ldate" (earliest and. Latest date for processing data) are ignored in the. Time checking for scans. (note: the earliest and. Latest dates should still be specified to the. "expected" time range, but they will not be used for. Time checking in this case)}.
[out]IBUFTNOutput buffer holding data for a scan (1737 words - See remarks for format. some words may be missing Depending upon lprod, lbrit, nnalg and gbalg
[out]IBDATEInput bufr message section 1 date (yyyymmddhh)
[out]IERError return code (see remarks)
Remarks
Return code ier can have the following values:
  • IER = 0 Successful return of scan
  • IER = 1 All scans have been read, all done
  • IER = 2 Abnormal return - input bufr file in unit 'indta' is either empty (null) or is not bufr
  • IER = 3 Abnormal return - requested earliest and latest dates are backwards
  • IER = 4 Abnormal return - error opening random access file holding land/sea tags
  • IER = 5 Abnormal return - the number of decoded "levels" is not what is expected
  • IER = 6 Abnormal return - sea-surface temperature not found in grib index file - error returned from grib decoder getgb is 96
  • IER = 7 Abnormal return - sea-surface temperature grib message has a date that is either: 1) more than 7-days prior to the earliest requested date or 2) more than 7-days after the latest requested date
  • IER = 8 Abnormal return - byte-addressable read error for grib file containing sea-surface temperature field - error returned from grib decoder getgb is 97-99
  • IER = 9 Abnormal return - error returned from grib decoder - getgb - for sea-surface temperature field - > 0 but not 96-99

Input argument lsat is set-up as follows:

  • LSAT(X) = TRUE – Process scans from satellite id x (where x is code figure from bufr code table 0-01-007)
  • LSAT(X) = FALSE - Do not process scans from satellite id x
    • X = 240 is f-7 dmsp satellite (this satellite is no longer available)
    • X = 241 is f-8 dmsp satellite (this satellite is no longer available)
    • X = 242 is f-9 dmsp satellite (this satellite is no longer available)
    • X = 243 is f-10 dmsp satellite (this satellite is no longer available)
    • X = 244 is f-11 dmsp satellite (this is available as of 8/96 but is not considered to be an operational dmsp ssm/i satellite)
    • X = 245 is f-12 dmsp satellite (this satellite is no longer available)
    • X = 246 is f-13 dmsp satellite (this is available and is considered to be an operational odd dmsp ssm/i satellite as of 8/1996)
    • X = 247 is f-14 dmsp satellite (this is available as of 5/97 but is not considered to be an operational dmsp ssm/i satellite)
    • X = 248 is f-15 dmsp satellite (this is available as of 2/2000 and is considered to be an operational odd dmsp ssm/i satellite as of 2/2000)
    • X = 249 is reserved for a future dmsp satellite
Note
Here "even" means value in ibuftn(1) is an odd number while "odd" means value in ibuftn(1) is an even number Contents of array 'ibuftn' holding one complete scan (64 individual retrievlas (1737 words)

Always returned:

WORD CONTENTS
1 Satellite id (244 is f-11; 246 is f-13; 247 is f-14; 248 is f-15)
2 4-digit year for scan
3 2-digit month of year for scan
4 2-digit day of month for scan
5 2-digit hour of day for scan
6 2-digit minute of hour for scan
7 2-digit second of minute for scan
8 Scan number in orbit
9 Orbit number for scan
10 Retrieval #1 latitude (*100 degrees: + n, - s)
11 Retrieval #1 longitude (*100 degrees east)
12 Retrieval #1 position number
13 Retrieval #1 surface tag (code figure)

For LPROD = TRUE {Input products file: note all products below except sea-surface temperature are available in the fnoc "operational" products data dump; most ncep products data dumps contain only wind speed, total precipitable water, cloud water and sea-surface temperature (all over ocean only)}:

WORD CONTENTS
14 Retrieval #1 cloud water (*100 kilogram/meter**2)
15 Retrieval #1 rain rate (*1000000 millimeters/second)
16 Retrieval #1 wind speed (*10 meters/second)
17 Retrieval #1 soil moisture (millimeters)
18 Retrieval #1 sea-ice concentration (per cent)
19 Retrieval #1 sea-ice age (code figure)
20 Retrieval #1 ice edge (code figure)
21 Retrieval #1 total precip. water (*10 millimeters)
22 Retrieval #1 surface temp (*100 k) if not over ocean -OR-
22 Retrieval #1 sea-surface temp (*100 k) if over ocean
23 Retrieval #1 snow depth (millimeters)
24 Retrieval #1 rain flag (code figure)
25 Retrieval #1 calculated surface type (code figure)

For LBRIT = TRUE (Input brightness temperature file):

WORD CONTENTS
26 Retrieval #1 19 ghz v brightness temp (*100 deg. k)
27 Retrieval #1 19 ghz h brightness temp (*100 deg. k)
28 Retrieval #1 22 ghz v brightness temp (*100 deg. k)
29 Retrieval #1 37 ghz v brightness temp (*100 deg. k)
30 Retrieval #1 37 ghz h brightness temp (*100 deg. k)
31 Retrieval #1 85 ghz v brightness temp (*100 deg. k)
32 Retrieval #1 85 ghz h brightness temp (*100 deg. k)

For LBRIT = TRUE and NNALG = TRUE (Input brightness temperature file):

WORD CONTENTS
33 Retrieval #1 Neural net 3 algorithm wind speed (generated in-line) (*10 meters/second)
34 Retrieval #1 Neural net 3 algorithm total precip. water (generated in-line) (*10 millimeters)

For LBRIT = TRUE and GBALG = TRUE (Input brightness temperature file):

WORD CONTENTS
35 Retrieval #1 goodberlet algorithm wind speed (generated in-line) (*10 meters/second)
36 Retrieval #1 goodberlet algorithm rain flag (code figure)
37-1737 Repeat 10-36 for 63 more retrievals
Note
All missing data or data not selected by calling program are set to 99999
Author
Dennis Keyser
Date
1996-07-30

Definition at line 192 of file w3miscan.f.