1MS_SPLITSRCNAME(3)         Library Functions Manual         MS_SPLITSRCNAME(3)
2
3
4

NAME

6       ms_splitsrcname - Split source names into the SEED naming nomenclature.
7
8

SYNOPSIS

10       #include <libmseed.h>
11
12       char  *ms_splitsrcname ( char *srcname, char *net, char * sta,
13                                char * loc, char *chan, char *qual );
14
15

DESCRIPTION

17       The  ms_splitsrcname routine parses SEED channel naming components from
18       a source name string in the following format:
19
20       "NET_STA_LOC_CHAN[_QUAL]"
21
22       The first four components are required  to  uniquely  identify  a  SEED
23       channel,  generally these are always present in a srcname.  The Quality
24       code is normally optional in a source name.
25
26       The arguments for the first four components (net, sta, loc & chan)  are
27       treated  as strings but the quality code (qual) is treated as a pointer
28       to a single character.
29
30       Memory for the requested component strings must already  be  allocated.
31       If a component pointer is NULL it will not be parsed from the string.
32
33       Source  names  in  the expected format are created, for example, by the
34       ms_recsrcname(3), msr_srcname(3) and mst_srcname(3) routines.
35
36

LOCATION IDS AND SPACES

38       The source name should never include spaces.  The fixed  format  nature
39       of  SEED data records leads to blank or unused location IDs represented
40       by spaces, in a source name such blank location IDs should be collapsed
41       to  nothing  in  the  resulting  sources names.  A blank location ID is
42       parsed from a source name as an empty string (not two spaces).
43
44

EXAMPLES

46       This usage will result in net="IU",  sta="ANMO",  loc="00",  chan="BHZ"
47       and  qual  will  remain  unchanged (because it was not contained in the
48       input srcname):
49
50       ms_splitsrcname("IU_ANMO_00_BHZ", net, sta, loc, chan, qual);
51
52       This usage will limit the parsing to only the network and station  com‐
53       ponents with net="IU", sta="ANMO":
54
55       ms_splitsrcname("IU_ANMO_00_BHZ", net, sta, NULL, NULL, NULL);
56
57       The  following usage illustrates a blank location ID and included qual‐
58       ity code:
59
60       ms_splitsrcname("IU_ANMO__BHZ_Q", net, sta, loc, chan, qual);
61
62       The result is:
63
64       net = "IU"
65       sta = "ANMO"
66       loc = ""
67       chan = "BHZ"
68       qual = 'Q'
69
70

RETURN VALUES

72       Return 0 on success and -1 on error.
73
74

SEE ALSO

76       ms_recsrcname(3), msr_srcname(3) and mst_srcname(3).
77
78

AUTHOR

80       Chad Trabant
81       IRIS Data Management Center
82
83
84
85Libmseed API                      2009/12/19                MS_SPLITSRCNAME(3)
Impressum