burpFiles_mod

link to source code

Dependency Diagrams:

burpFiles_mod.svg

Direct Dependency Diagram

burpFiles_mod_rev.svg

Reverse Dependency Diagram

Description

MODULE burpFiles_mod (prefix=’brpf’ category=’3. Observation input/output’)

Purpose

To store the filenames of the burp observation files and call subroutines in readBurp_mod to read and update burp files.

Quick access

Routines

brpf_getdatestamp(), brpf_obssub_read(), brpf_obssub_update(), brpf_readfile(), brpf_setscalech(), brpf_updatefile()

Needed modules

  • codeprecision_mod: MODULE codePrecision_mod (prefix=’pre’ category=’8. Low-level utilities and constants’)

  • mathphysconstants_mod: MODULE mathPhysConstants_mod (prefix=’mpc’ category=’8. Low-level utilities and constants’)

  • utilities_mod: MODULE utilities_mod (prefix=’utl’ category=’8. Low-level utilities and constants’)

  • obsspacedata_mod: MODULE obsSpaceData_mod (prefix=’obs’ category=’6. High-level data objects’)

  • burpread_mod: MODULE burpRead_mod (prefix=’brpr’ category=’3. Observation input/output’)

  • bufr_mod: MODULE bufr_mod (prefix=’bufr’ category=’8. Low-level utilities and constants’)

  • obssubspacedata_mod: MODULE obsSubSpaceData_mod (prefix=’oss’ category=’6. High-level data objects’)

  • burp_module

  • obsutil_mod: MODULE obsUtil_mod (prefix=’obsu’ category=’3. Observation input/output’)

  • obsvariabletransforms_mod: MODULE obsVariableTransforms_mod (prefix=’ovt’ category=’4. Data Object transformations’)

Variables

Subroutines and functions

subroutine  burpfiles_mod/brpf_getdatestamp(datestamp, burpfilename)
Arguments
  • datestamp [integer ,out]

  • burpfilename [character ,in]

Called from

obsf_setup()

subroutine  burpfiles_mod/brpf_readfile(obsdat, filename, familytype, fileindex)
Arguments
  • obsdat [struct_obs ,inout]

  • filename [character ,in]

  • familytype [character ,in]

  • fileindex [integer ,in]

Called from

obsf_readfiles()

Call to

obs_numbody(), obs_numheader(), brpr_readburp(), ovt_transformobsvalues(), ovt_adjusthumgz(), obsu_computevertcoordsurfobs(), obs_headset_i(), obs_setfamily(), brpf_setscalech(), obs_columnactive_rb(), obsu_setgbgpserror()

subroutine  burpfiles_mod/brpf_updatefile(obsspacedata, filename, familytype, fileindex)
Arguments
  • obsspacedata [struct_obs ,inout]

  • filename [character ,in]

  • familytype [character ,in]

  • fileindex [integer ,in]

Called from

obsf_writefiles()

Call to

utl_tmg_start(), obs_getheaderindex(), brpf_setscalech(), brpr_updateburp(), utl_tmg_stop()

subroutine  burpfiles_mod/brpf_setscalech(obsdat, headerindex, forward)
Purpose

Apply or unapply scaling to CH observations by multiplying (or dividing) with 10^{exponent} where the exponent is from element BUFR_SCALE_EXPONENT if provided.

Arguments
  • obsdat [struct_obs ,inout] :: struct_obs instance

  • headerindex [integer ,in] :: header index in obsdat

  • forward [logical ,in] :: applies scaling if .true., unapplies scaling if .false.

Called from

brpf_readfile(), brpf_updatefile()

Call to

obs_headelem_i(), obs_bodyelem_i(), obs_bodyelem_r(), obs_bodyset_i()

function  burpfiles_mod/brpf_obssub_read(filename, stnid, varno, nlev, ndim, block_type[, bkstp_opt[, match_nlev_opt[, codtyp_opt[, numcolumns_opt]]]])
Purpose

To retrieve information from observation BURP file. Returns the data in a struct_oss_obsdata object. Can retrieve either 1D or 2D data from a report.

Comments
  • BUFR power 10 exponent element (i.e. data with BUFR number BUFR_SCALE_EXPONENT) will be applied only to 1D data if present.

  • As burp_out is for a specific input stnid, burp_out%code contains only the (lat/long and time coord.) with 22 characters.

  • Exponent BUFR data (i.e. data with BUFR number BUFR_SCALE_EXPONENT) will be applied only to 1D data.

Arguments

Arguments
  • filename [character ,in] :: BURP file name

  • stnid [character ,in] :: station ID of observation

  • varno [integer ,in] :: BUFR code (if <=0, search through all codes to obtain first between 10000 and 16000)

  • nlev [integer ,in] :: number of levels in the observation

  • ndim [integer ,in] ::

    number of dimensions for the retrieved data in each report

    (e.g. ndim=1 for std, ndim=2 for averaging kernels)

    numColumns_opt

    Number of columns (if different from nlev and for ndim=2)

  • block_type [character ,in] :: block type indicated by the two rightmost bits of bknat. Valid values are ‘DATA’, ‘INFO’, ‘3-D’, and ‘MRQR’.

Options
  • match_nlev_opt [logical ,in,] :: true. (default) causes filtering out of report if the report number of levels is different from the input argument nlev

  • bkstp_opt [integer ,in,] :: bkstp number of requested block

  • codtyp_opt (*) [integer ,in,] :: optional CODTYP list for search

  • numcolumns_opt [integer ,in,] :: Number of columns (if different from nlev and for ndim=2)

Return

burp_out [struct_oss_obsdata ] :: struct_oss_obsdata object

Called from

obsf_obssub_read()

Call to

utl_abort(), oss_obsdata_alloc(), utl_stnid_equal()

function  burpfiles_mod/brpf_obssub_update(obsdata, filename, varno, block_type[, bkstp_opt[, multi_opt]])
Purpose

To add or modify data in BURP files from data stored in a struct_oss_obsdata object. Provided data can be either 1D or 2D.

Comments
  • Currently assumes that all elements of varno(:) are distinct from each other.

  • Blocks with new data will overwrite any existing data of the same

Arguments
  • varno (*) [integer ,in] :: BUFR descriptors. Number of elements must be

  • varno :: BUFR descriptors. Number of elements must be max(1,obsdata%dim2)

  • block_type [character ,in] :: block type indicated by the two rightmost bits of bknat. Valid values are ‘DATA’, ‘INFO’, ‘3-D’, and ‘MRQR’.

  • obsdata [struct_oss_obsdata ,inout] :: Input struct_oss_obsdata object for varno

  • filename [character ,in] :: BURP file name

Arguments

Options
  • multi_opt [character ,in,] :: Indicates if intended report are for ‘UNI’ or ‘MULTI’ level data (description is not accurate)

  • bkstp_opt [integer ,in,] :: bkstp number of requested block

Return

nrep_modified [integer ] :: Number of modified reports

Called from

obsf_obssub_update()

Call to

utl_abort(), oss_obsdata_code_len(), oss_obsdata_get_element(), oss_obsdata_get_array1d(), oss_obsdata_get_array2d()