System (database)
MCH DB 2009
User manual
2009
Carlos Cervantes
Version August 2012
i/ix
MCH User Manual
Contents
List of figures....................................................................................................................................v
List of acronyms .............................................................................................................................. ix
Introduction.......................................................................................................................................1
Structure of the manual....................................................................................................................1
Chapter 1.Getting started.................................................................................................................3
Scope and physical operating limits .........................................................................................3
1.1. System installation....................................................................................................................4
System requirements ................................................................................................................4
1.2. Common tasks ..........................................................................................................................4
Data capture..............................................................................................................................4
Querying data on graphs ..........................................................................................................4
Querying data on maps ............................................................................................................6
Importing and exporting data....................................................................................................7
Performing calculations and editing data .................................................................................7
Exporting data to text files and spreadsheets ..........................................................................8
DefinitionsGeneral tables..........................................................................................................8
Chapter2.Usingthesystem.................................................................................................11
2.1. Main menu...............................................................................................................................11
Using the system menus ........................................................................................................11
Accessing the system.............................................................................................................13
2.2. File menu.................................................................................................................................13
2.2.1. Printer set up.................................................................................................................13
2.2.2. Exit ................................................................................................................................14
2.3. Maps menu..............................................................................................................................14
2.3.1. Maps by geographical position.....................................................................................15
2.3.2. Maps.Sketches or diagrams .........................................................................................19
2.3.3. Zone maps ....................................................................................................................20
2.3.4. Isolines on maps ...........................................................................................................23
2.3.5. Maps by geographical projection..................................................................................27
2.4. Graphs menu...........................................................................................................................27
2.4.1 Graphs of daily, detailed, weekly, dekadal, monthly and annual data..........................28
2.4.2 Graphs comparing several variables for daily, detailed, weekly, dekadal, monthly and
annual data .............................................................................................................................33
ii/ix
MCH User Manual
2.4.3 Graphs comparing several stations for daily, detailed, weekly, dekadal, monthly and
annual data .............................................................................................................................35
2.4.4 General queries. Graphs. ..............................................................................................37
2.5. Capture menu..........................................................................................................................43
2.5.1 Capturing daily data.......................................................................................................43
2.5.2 Capturing detailed data .................................................................................................45
2.5.3 Capturing SYNOP messages in FM12 format ..............................................................47
2.5.4 Capturing SYNOP messages in CREX format .............................................................50
2.5.5 Exporting data from tables.............................................................................................51
2.5.6 Importing data to tables .................................................................................................53
2.5.7 Updating data between servers.....................................................................................54
2.6. Data editing and calculation menu..........................................................................................55
2.6.1 Editing daily data in listings ...........................................................................................56
2.6.2 Editing data using graphs. .............................................................................................58
2.6.3 Availability of daily data .................................................................................................60
2.6.4 Detailed calculations on daily data. ...............................................................................63
2.6.5 Calculating by station, station group and zones on maps ............................................64
2.6.6 Queries decoding SYNOP FM12 messages..............................................................68
2.6.7 Queries decoding SYNOP CREX messages.............................................................69
2.6.8 Query decoding METAR / SPECI messages.............................................................70
2.7. Definitions................................................................................................................................71
2.7.1 Stations ..........................................................................................................................74
2.7.2 Automatic stations by satellite identifier ........................................................................78
2.7.3 Station groups................................................................................................................79
2.7.4 Groups of automatic stations.........................................................................................80
2.7.5 Station types ..................................................................................................................80
2.7.6 Instruments by station....................................................................................................81
2.7.7 Defining maps by geographical position using two points ............................................82
2.7.8 Defining maps by geographical position using quadrilaterals.......................................83
2.7.9 Defining stations on sketches or diagrams ...................................................................84
2.7.10 Defining MCH and general maps ................................................................................85
2.7.11 Station metadata..........................................................................................................88
2.7.12 Station locator ..............................................................................................................89
2.7.13 Variables ......................................................................................................................91
2.7.14 Acceptable values........................................................................................................92
2.7.15 Checks by formula .......................................................................................................93
iii/ix
MCH User Manual
2.7.16 Checks by proximity.....................................................................................................94
2.7.17 Conversion tables ........................................................................................................95
2.7.18 Conversion formulae for derived variables..................................................................97
2.7.19 Variables for automatic stations by satellite identifier .................................................98
2.7.20 Acceptable values for automatic variables..................................................................99
2.7.21 Derived variables .......................................................................................................100
2.7.22 Data in SYNOP-CREX messages.............................................................................101
2.7.23 SYNOP-CREX message templates ..........................................................................102
2.7.24 FTP transmission options ..........................................................................................102
2.7.25 FTP transmission addresses.....................................................................................103
2.7.26 Users..........................................................................................................................104
2.7.27 Access levels .............................................................................................................104
2.7.28 General database operation......................................................................................105
2.7.29 Variables from automatic stations for web page.......................................................105
2.7.30 Map options for web ..................................................................................................105
2.7.31 Data sources..............................................................................................................106
2.7.32 Time zones ................................................................................................................106
2.7.33 Units ...........................................................................................................................107
2.7.34 Catchments................................................................................................................107
2.7.35 Sub-catchments .........................................................................................................108
2.5.36 Hydrological regions ..................................................................................................108
2.5.37 States / Departments / Provinces..............................................................................109
2.7.38 Municipalities / Boroughs / Parishes .........................................................................109
2.7.39 Regional management / offices.................................................................................110
2.8 Window menu.........................................................................................................................110
2.9. Help menu.............................................................................................................................111
Annexes................................................................................................................................... 113
Annex A - System installation......................................................................................................115
Annex B Obtaining MCH database information from Excel spreadsheets ..............................135
Annex C Preparing a map in DXF to load into MCH for presenting information in zone maps
......................................................................................................................................................143
Annex D Tools for exchanging MCH information with other systems and between MCH
locations .......................................................................................................................................147
The EnviarMCH.exe command ............................................................................................149
The CargMCHftpctl.exe command .......................................................................................149
The CargFtpMCH.exe command..........................................................................................150
iv/ix
MCH User Manual
The CargaSynopMetarB.exe command...............................................................................150
The DXFaBinGeogr.exe command ......................................................................................152
Digitizing tapes with DigitBan.exe ........................................................................................153
To digitize rectangular type tapes: ...............................................................................154
To digitize rectangular-circular type tapes ..................................................................156
To digitize sun tapes, rectangular and rectangular-circular......................................158
Scheduled tasks....................................................................................................................159
Annex E Calculating daily data from detailed data...................................................................161
Calculation types..........................................................................................................................163
LAST .....................................................................................................................................164
CUMULAT.............................................................................................................................164
MEANLAST...........................................................................................................................165
FREQUENC..........................................................................................................................165
v/ix
MCH User Manual
Listoffigures
Figure 1: Main menu ................................................................................................................................................ 11
Figure 2: Map of system menus............................................................................................................................... 12
Figure 3: Entering the user ID and password ...................................................................................................... 13
Figure 4: File menu................................................................................................................................................... 13
Figure 5: Printer configuration window................................................................................................................ 14
Figure 6: Maps menu ................................................................................................................................................ 14
Figure 7: Maps by geographical position 1. ......................................................................................................... 15
Figure 8: Maps by geographical position 2. ......................................................................................................... 16
Figure 9: Maps by geographical position 3.Colour ranges................................................................................ 17
Figure 10: Maps by geographical position 4.Colour selection.......................................................................... 17
Figure 11: Maps by geographical position 5.Exporting data and printing. .................................................... 18
Figure 12: Maps by geographical position 6.Map exported to a graphics file............................................... 18
Figure 13: Maps by geographical position 7. Data exported to a text file ...................................................... 19
Figure 14: Maps by geographical position 8. Data exported to a spreadsheet............................................... 19
Figure 15:Maps.Diagrams or sketches .................................................................................................................. 20
Figure 16: Zone maps 1............................................................................................................................................ 21
Figure 17: Zone maps 2.Defining colours and fills ............................................................................................. 21
Figure 18: Zone maps 1.Defining stations or station groups by zone............................................................... 22
Figure 19: Zone maps 1.Defining stations or station groups by zone............................................................... 22
Figure 20: Isoline maps 1. ....................................................................................................................................... 23
Figure 21: Isoline maps 2.Query 2 tab. ................................................................................................................. 24
Figure 22: Isoline maps 3.Isoline data 1 tab. ....................................................................................................... 24
Figure 23: Isoline maps 4.Isoline data 2 tab. ....................................................................................................... 25
Figure 24:Isoline maps 5.Isoline data 3 tab.......................................................................................................... 26
Figure 25: Isoline maps 6.Area option. ................................................................................................................. 27
Figure 26:Graphs menu ........................................................................................................................................... 28
Figure 27:Graphs 1................................................................................................................................................... 29
Figure 28: Graphs menu .......................................................................................................................................... 30
Figure 29:Graphs menu ........................................................................................................................................... 30
Figure 30: Graphs menu .......................................................................................................................................... 31
Figure 31: Graphs menu .......................................................................................................................................... 31
Figure 32: Graphs menu .......................................................................................................................................... 32
Figure 33: Graphs menu .......................................................................................................................................... 32
Figure 34: Graphs several variables 1 .................................................................................................................. 34
Figure 35: Graphs several variables 2 .................................................................................................................. 35
Figure 36: Graphs several stations 1 ..................................................................................................................... 36
Figure 37: General query 1. .................................................................................................................................... 37
Figure 38: General query 3.Select by example options....................................................................................... 37
Figure 39: General query 3.By station. ................................................................................................................. 39
Figure 40 :General query 4.By station group. ...................................................................................................... 40
Figure 41: General query 5.Stations near to a point. .......................................................................................... 41
Figure 42: Capture menu ......................................................................................................................................... 43
Figure 43: Capturing daily data 1. ......................................................................................................................... 44
Figure 44: Capturing daily data 2. ......................................................................................................................... 45
Figure 45: Capturing detailed data.Manned and automatic stations ............................................................... 46
Figure 46: Capturing SYNOP FM12 messages. 1. .............................................................................................. 48
Figure 47: Capturing SYNOP FM12 messages.2................................................................................................. 49
Figure 48: Capturing SYNOP FM12 messages.3................................................................................................. 49
Figure 49: Capturing SYNOP CREX messages 1. ............................................................................................... 50
Figure 50 :Capturing SYNOP CREX messages 2. ............................................................................................... 51
vi/ix
MCH User Manual
Figure 51: Exporting data 1. ................................................................................................................................... 52
Figure 52: Exporting data 2. ................................................................................................................................... 53
Figure 53: Importing data 1. ................................................................................................................................... 54
Figure 54: Importing data 2. ................................................................................................................................... 54
Figure 55: Updating data between servers. .......................................................................................................... 55
Figure 56: Data editing and calculation menu..................................................................................................... 56
Figure 57: Editing data in listings. ......................................................................................................................... 57
Figure 58: Editing data in listings 2....................................................................................................................... 57
Figure 59: Reviewing data using graphs 1............................................................................................................ 58
Figure 60: Reviewing data using graphs 2............................................................................................................ 59
Figure 61: Reviewing data using graphs 3............................................................................................................ 60
Figure 62: Availability of daily data 1. .................................................................................................................. 61
Figure 63: Availability of daily data 2. .................................................................................................................. 62
Figure 64: Availability of daily data 3. .................................................................................................................. 62
Figure 65: Availability of daily data 4. .................................................................................................................. 63
Figure 66: Reviewing data using graphs 1............................................................................................................ 64
Figure 67: Calculating data by station, station group and zones on maps, 1. ................................................ 66
Figure 68: Calculating data by station, station group and zones on maps, 2. ................................................ 67
Figure 69: Calculating data by station, station group and zones on maps, 3. ................................................ 68
Figure 70: Querying SYNOP FM12 messages. .................................................................................................... 69
Figure 71: Querying SYNOP CREX messages. .................................................................................................... 70
Figure 72: Query decoding METAR / SPECI messages .................................................................................. 71
Figure 73: Definitions menu .................................................................................................................................... 72
Figure 74: Capture form.......................................................................................................................................... 72
Figure 75: Capture form 2....................................................................................................................................... 73
Figure 76: Capture form 3....................................................................................................................................... 73
Figure 77: Stations 1................................................................................................................................................. 75
Figure 78: Stations 2................................................................................................................................................. 76
Figure 79: Stations 3.Data from dams ................................................................................................................... 77
Figure 80: Stations 4.Data from hydrometrics. .................................................................................................... 78
Figure 81: Station groups 1. .................................................................................................................................... 79
Figure 82: Station groups 1. .................................................................................................................................... 80
Figure 83: Station types............................................................................................................................................ 81
Figure 84: Instruments by station ........................................................................................................................... 82
Figure 85: Two-point geo-referencing................................................................................................................... 83
Figure 86: Geo-referencing by quadrilaterals...................................................................................................... 84
Figure 87: Defining stations on sketches or diagrams ........................................................................................ 85
Figure 88: Vector maps by geographical position 1............................................................................................ 86
Figure 89: Vector maps by geographical position 2............................................................................................ 87
Figure 90: Vector maps by geographical position 3............................................................................................ 87
Figure 91: Station metadata .................................................................................................................................... 89
Figure 92: Station locator 2..................................................................................................................................... 89
Figure 93: Station locator 1..................................................................................................................................... 90
Figure 94: Station locator 3..................................................................................................................................... 90
Figure 95: Variables 1.............................................................................................................................................. 92
Figure 96: Acceptable values per variable............................................................................................................ 93
Figure 97:Checks by formula .................................................................................................................................. 94
Figure 98: Checks by proximity.............................................................................................................................. 95
Figure 99: Conversion tables 1............................................................................................................................... 96
Figure 100: Conversion tables 2............................................................................................................................. 96
Figure 101: Conversion tables 2............................................................................................................................. 97
Figure 102: Conversion tables 2............................................................................................................................. 98
vii/ix
MCH User Manual
Figure 103: Variables for automatic stations by satellite identifier.................................................................. 99
Figure 104: Acceptable values for automatic stations ...................................................................................... 100
Figure 105: Acceptable values for automatic stations ...................................................................................... 101
Figure 106:Data in SYNOP-CREX messages ..................................................................................................... 101
Figure 107: SYNOP-CREX message templates .................................................................................................. 102
Figure 108: FTP transmission options ............................................................................................................... 103
Figure 109: FTP transmission options ................................................................................................................ 103
Figure 110: Defining users .................................................................................................................................... 104
Figure 111: User access levels.............................................................................................................................. 104
Figure 112: Automatic variables for web ............................................................................................................ 105
Figure 113: FTP transmission options ................................................................................................................ 106
Figure 114: Data sources....................................................................................................................................... 106
Figure 115: FTP transmission options ................................................................................................................ 107
Figure 116: Units .................................................................................................................................................... 107
Figure 117: Catchments ......................................................................................................................................... 108
Figure 118: Sub-catchments .................................................................................................................................. 108
Figure 119: Hydrological regions ........................................................................................................................ 109
Figure 120: FTP transmission options ................................................................................................................ 109
Figure 121: FTP transmission options ................................................................................................................ 110
Figure 122: FTP transmission options ................................................................................................................ 110
Figure 123:Installing MCH.Server step 1 ........................................................................................................... 117
Figure 124:Installing MCH.Server step 2 ........................................................................................................... 118
Figure 125:Installing MCH.Server step 3 ........................................................................................................... 119
Figure 126:Installing MCH.Server step 4 ........................................................................................................... 121
Figure 127:Installing MCH.Server step 5 ........................................................................................................... 122
Figure 128:Installing MCH.Server step 6 ........................................................................................................... 123
Figure 129:Installing MCH.Server step 7 ........................................................................................................... 124
Figure 130:Installing MCH.Server step 8 ........................................................................................................... 125
Figure 131:Installing MCH.Server step 9 ........................................................................................................... 126
Figure 132:Installing MCH.Server step 10 ......................................................................................................... 128
Figure 133:Installing MCH.Server step 11 ......................................................................................................... 129
Figure 134:Installing MCH.Server step 12 ......................................................................................................... 130
Figure 135:Installing MCH.User step 1 .............................................................................................................. 131
Figure 136:Installing MCH.User step 2 .............................................................................................................. 132
Figure 137:Installing MCH.User step 3 .............................................................................................................. 133
Figure 138:Installing MCH.User step 4 .............................................................................................................. 134
Figure 139:Excel Tools ....................................................................................................................................... 137
Figure 140:Excel Tools Add-ins..................................................................................................................... 137
Figure 141:Excel Tools ....................................................................................................................................... 138
Figure 142:Excel Tools Add-ins..................................................................................................................... 138
Figure 143:ODBC definition for MySQL5 1....................................................................................................... 138
Figure 143:Installing MySQL ODBC................................................................................................................... 139
Figure 145:SQL.REQUEST function in Excel .................................................................................................... 139
Figure 146:DXFaMCH.exe routine...................................................................................................................... 145
Figure 147:Loading SYNOP, METAR / SPECI and SYNOP-CREX messages 1 .......................................... 151
Figure 148:Loading SYNOP, METAR / SPECI and SYNOP-CREX messages 2 .......................................... 151
Figure 149:Loading SYNOP, METAR / SPECI and SYNOP-CREX messages 3 .......................................... 152
Figure 150:Loading SYNOP, METAR / SPECI and SYNOP-CREX messages 4 .......................................... 152
Figure 151:Converting DXF maps to binary for MCH..................................................................................... 153
Figure 152:Digitizing tapes. 1............................................................................................................................... 154
Figure 153:Digitizing tapes. 2............................................................................................................................... 155
Figure 154:Digitizing tapes. 3............................................................................................................................... 156
viii/ix
MCH User Manual
Figure 155:Digitizing tapes. 4............................................................................................................................... 157
Figure 156:Digitizing tapes. 5............................................................................................................................... 158
Figure 157:Digitizing tapes. 6............................................................................................................................... 159
Figure 158:Digitizing tapes. 7............................................................................................................................... 159
ix/ix
MCH User Manual
Listofacronyms
Acronym Description
English Spanish English Spanish
DAPS DAPS
Data CollectionSystem Automatic Processing
System
Sistema de Procesamiento Automtico para
Recoleccin de Datos
DCP PCD Data CollectionPlatform Plataforma de Coleccin de Datos
DRGS ETRD
Direct Readout Ground Station (satellite
receiver)
EstacinTerrena de RecepcinDirecta (de
datos desatlite)
ERIC ERIC
Climatalogical DataBank for Mexico on CD-
ROM
Extractor Rpido de Informacin
Climatolgica (enDisco Compacto)
FTP FTP File Transfer Protocol Protocolo para Transmisin deArchivos
GMT GMT GreenwichMean Time (time zone) Hora segn el meridiano de Greenwich
GOES GOES
Geostationary Operational Environmental
Satellite
Satlite Geoestacionario de Alta Resolucin
LAN LAN
Local AreaNetwork (for computer
connections)
Red de rea Local (para conexiones de
computadoras)
NESDIS NESDIS
National Environmental Satellite, Dataand
InformationService(USA)
Servicio Nacional de Informacin y Datos
Satelitales del Medio Ambiente, delos EUA
NOAA NOAA
National Oceanic and Atmospheric
Administration (USA)
Administracin Nacional de Ocenos y
Atmsfera, EUA
PDT PDT Platform DescriptionTable (at NESDIS)
Tabla para Descripcin dePlataforma (en el
NESDIS)
SHEF SHEF Standard Hydrological Exchange Format
Formato Estndar de Intercambio
Hidrometeorolgico
SQL SQL Standard Query Language (for databases)
Lenguaje Estndar Interactivo (parabases de
datos)
WAN WAN Wide Area Network Red de rea Extendida
WMO OMM
World Meteorological Organization (of the
UN)
OrganizacinMeteorolgica Mundial (de
Naciones Unidas)
1/179
MCH User Manual
Introduction
MCHBD is a system for managing meteorology, climatology and hydrology data,storingdata in a
database (MySQL). It works in clientserver mode on a LAN/WAN, has a web intranet module for
somedatacapturefunctions,queries,graphsandmaps.Thenetworkcommunicationprotocolmust
beTCP/IP.
ODBCtechnologyoriented,itallowsthedatabasetobequeriedbyexternaltoolsusingthatprotocol.
The variables to be managed can be defined. Each variable can handle detailed data (data with a
frequencyoflessthanoneday,withanaccuracyofuptooneminute)innativeform,anddailydata.
Dailydatacanbecalculatedfromdetaileddata.Dailydatacanbeusedtocalculatecumulativedaily,
weekly, dekadal (three times a month), monthly and annual data. Normals or means can be
calculatedforvariousperiodsfordaily,weekly,dekadal,monthlyandannualdata.
Information can be presented on maps (images, vector maps and sketches).More than 40 types of
geographical projections are available for vector maps), graphs and tables. Query output can be
exportedtovarioustypesofgraphsandtextfilesandspreadsheets.
Information from automatic stations can be uploaded if needed using additional functions. There
aregenericimportfunctionstoloadhistoricalinformationfromtabseparatedtextfiles.
MCHBD09isanapplicationrunningintheWindowsgraphicalenvironment.
Structureofthemanual
This manualisstructured asfollows:Chapter1,Getting started, gives ageneralexplanationof the
systemsobjectivesandscope,adescriptionofthemanagementofsomepartsandasummaryofthe
most common operatingsequences of the system. Chapter 2,Using the system, offers a detailed
explanationof everyfunctionin the system,intheorderthat theyappearinthesystem menus. We
recommend using the Simplified Guide for an alternative way of operating the system. Annex A
explains how to install the system on a new computer and a new computer network. Annex B
explains how to obtain MCH data from Excel spreadsheets. Annex C contains information on
preparingandloading mapsinDXFformatintoMCHtorepresentdataby mapzones.AnnexDsets
out the formats of the various MCH tools for scheduled tasks and interchanging information
betweenMCHservers,whileAnnexEdocumentsthemethodforcalculatingdailydatafromdetailed
data.
3/179
MCH User Manual
Chapter1.Gettingstarted
The Meteorology, Climatology and Hydrology Information System is written in Delphi 2006 and
uses the freely available MySQL 5 database. It comprises (a) a clientserver module used for
operatingandadministrationfunctions,(b)anumberofutilitiesforcertaininformationloadingand
management functions and (c) an executable module for various tasks, also writtenin Delphi, for
data capture anddynamic queriesviathe web ofdata, graphs and maps. The webmodule operates
underApache whichis an opensource server. It also uses a numberof opensourceinformation
managementtoolsanddata:GMTTools,ImageMagick,GhostScript,NetCDF,Proj4.
Thesystem candefine anynumber ofvariables tobe managed.Thedataofthevariablesarestored
as doubleprecision numbers (15 significant figures).Each variable can handle detailed data (data
with a frequency of lessthan one day, with an accuracy of upto one minute) innative form, and
daily data. Daily data can be calculated from detailed data. Daily data can be used to calculate
cumulative daily, weekly, dekadal (three times a month), monthly and annual data. Normals or
meanscanbecalculatedforvariousperiodsfordaily,weekly,dekadal,monthlyandannualdata.
Information can be presented on maps (images, vector maps and sketches).More than 40 types of
geographical projections are available for vector maps), graphs and tables. Query output can be
exportedtovarioustypesofgraphsandtextfilesandspreadsheets.
Thesystemisadministeredwithfourlevelsofsecurity:administrator,fulluser,userandcapture.It
isalsopossibletoconsultthesystemwithoutauserIDinclientserverorwebmode.
Clientserver mode works over a LAN/WAN using the TCP/IPprotocol. Datacanbe synchronized
between several servers under MsSQL functions and with special tasks under FTP and manually
withintheusermodule.
MCHisaconfigurablesysteminwhichitispossibletodefinevariables(morethan50aredefinedby
default), measuringstations,conditions forverifying inputdata, maps andsketchesonto which the
information is displayed. There is a whole set of tables of information relating to the measuring
stationsandthedata.
Informationfromautomaticstationscanbeuploadedifneededusingadditionalfunctions.
Therearegenericimportfunctionstoloadhistoricalinformationfromtabseparatedtextfiles.
MCHBD09 is an application running in the Windows graphical environment. The functions
programmed for operation by users are grouped under menus and submenus. There are some
shortcutbuttonsforthemostfrequentlyusedfunctions.
Asin anyWindows application,therearetwo waysof activatinga functionin thesystem:using the
mousepointerorkeystrokes.
Chapter 2, Using the system, describes allthe functions in the system inlocal mode (LAN/WAN)
andhowtousethem,followingtheordertheyappearinthesystemmenus.
Scopeandphysicaloperatinglimits
Variables. Limitedonlybythesize ofthedatabase,limitedinturnonlybythe availablediskspace.
Eachvariableis associated with asetoftables forthedetailed,daily, weekly,dekadal, monthly and
annualdataandtheirrespectivenormals/means.
Maps. Maps in image form are always processed in .bmp format, but many image types can be
convertedintothis format. Thepositionofstations on mapsisindicated withobjects fordisplaying
the individual information of each station when the mouse pointer rolls over them and we have
foundthatitworksevenwith1,500stationsonamap(thisislimitedbythewayinwhichWindows
4/179
MCH User Manual
handles graphicobjects, andfunctionalitydeclines when the operating systemhastocontrolmany
objects
Graphics. Toenable a graphtobe enlarged, there mustbeupto 300,000datapoints,but wehave
testedgraphswithupto1.6millionpoints.
Users.Limitedbythedatabasemanager,dependingontheparameterssetwhenitissetup.
Openwindows. Thefunctionsfor queryingdatainmapsand graphs allow multiple windowstobe
opened.
1.1.Systeminstallation
The system distribution diskcontains an automated procedure for installing the MCH system. The
system canbeinstalledinserveranduser modes. Amoredetaileddescriptionofinstallationcanbe
foundinAnnexA.
Systemrequirements
Running the system as a work station for querying and processing data (clientserver) requires a
computerpreferably withaprocessorspeedof1.5GHzor faster,avideoresolutionofatleast1024
x 768, a network connection to the computer serving the central database, and 1 GB of RAM.
OperatingsystemWindows2000,WindowsXPorlater.Diskspace5GB.Localornetworkedcolour
ormonochromeprinter.Ifgraphsaretobeprintedinwideformat,alocalornetworkedplotter.
Torunthesystemasadatabaseserver,acomputerwithaprocessorspeedof2GHzorfaster,video
resolution of at least1024 x 768, 2GB of RAM, a 250GBhard disk, 100 GBof freespace for the
database, operating system Windows 2000 professional, Windows XP, Windows 2000 server or
Windows2003serverorlater.Ifpossible,acolourtabloidsizeorlargerprinteroracolourplotter.
ThesystemoperatormustbefamiliarwiththeWindowsoperatingsystem.
1.2.Commontasks
Mostofthesystemfunctionsarebrieflydescribedbysubject withreferencestohowtoaccess each
functionandtheuserlevelrequiredtodoso.
Datacapture
Datacanbeenteredintothesystemviatheusermoduleorintranetwebfunctions.
Capture requires user level 4 and restrictions can be applied to determine what each user can
capture.
Daily data can be captured under menu option Capture / Capture daily data and detailed data
undermenu optionCapture/Capture detailed data. Captureof SYNOP messagesinFM12 format
under menu option Capture / Capture SYNOP messages / Capture SYNOP FM12 messages and
capture of SYNOP messages in CREX format under menu option Capture / Capture SYNOP
messages/CaptureSYNOPFM12messages.
Capture via the web module takes place in the MCH server http://servidormch/mch under the
Capturemenuoption.Thisoptioncanbeusedtocapturedetailedanddailydata.
Queryingdataongraphs
Queriesintablesandgraphsintheusermodulearetobefoundunderthesamefunction.
5/179
MCH User Manual
Anyuserwithaccesstothesystemcanperformqueries.
FordailydatathereismenuoptionGraphs/Graphsdailydata,fordetaileddatathereisGraphs/
Graphs detailed data, for weekly data there is Graphs / Graphs weekly data, for dekadal data
thereis Graphs / Graphs dekadal data, for monthlydata there isGraphs/ Graphsmonthlydata
andforannualdatathereisGraphs/Graphsannualdata.
Comparativequeriescanbecarriedoutonuptosixvariablesperstationfor:
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
daily data several variables menu option Graphs / Comparative graphs several
variables/dailydataseveralvariables,
Comparativequeriescanbecarriedoutofupto6stationsforonevariablefor:
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
dailydataseveralstations menuoptionGraphs/Comparativegraphsseveral stations/
dailydataseveralstations,
Thereisalso ageneraltypeofquerythatcanbe appliedtoothertablesinthesystem orfor making
composite queries. The query graph can be exported to a graphics file and the query data can be
exportedtotextorspreadsheetfiles.
Allthedata queryfunctionshavetheoptiontoexport thedatato text files,commaseparatedvalue
(CSV)filesandspreadsheetfiles(upto65,535lines),intheformofthequeryoutput.Thereisalsoa
general way of exportingdata fromthetables in the system under menu option Capture / Export
datafromtables.
Thereis a function for locating stationsusing key combination <CtrlF2> and under menu option
Definitions/Stations/Stationlocator.
Dataqueriesinthewebmoduleareavailableinthe MCHserverhttp://servidormch/mchunder
menu option Data queries. This offers options for daily, detailed, monthly, annual, weekly and
dekadaldata.
Data graphsin the web module are availablein the MCH serverhttp://servidormch/mch under
menu option Graphs. This offers options for querying daily, detailed, monthly, annual, weekly and
dekadaldataingraphsandtables.
6/179
MCH User Manual
Queryingdataonmaps
Thereare five type of queries on maps. To query data on maps on which the information is to be
displayed,mapshavetobepreparedbeforehand.
Queries on mapscanbe exported to a graphicsfileof the mapbeing represented. The data can be
exportedtotextorspreadsheetfiles.
Anyuserwithaccesstothesystemcanperformqueries.
Queryingdataonmapsbygeographicalpositiononimages.Thisisavailablefor:
dailydataundermenuoptionMaps/Dailydatamaps/Dailymapsbygeog.posn.,
detailed data under menu option Maps / Detailed data maps / Detailed maps by geog.
posn.,
weeklydataundermenuoptionMaps/Weeklydatamaps/Weeklymapsbygeog.posn.,
dekadal data under menu option Maps / Dekadal data maps / Dekadal maps by geog.
posn.,
monthly data under menu option Maps / Monthly data maps / Monthly maps by geog.
posn.and
annualdataundermenuoptionMaps/Annualdatamaps/Annualmapsbygeog.posn.
You first have to prepare an image that is georeferenced by means of two points or a set of
quadrilaterals.Thestationstoberepresentedhavetobedefinedasastationgroup.
Queryingdataonsketchesanddiagrams.Thisisavailablefor:
dailydataundermenuoptionMaps/Dailydatamaps/Dailymapssketch,
detaileddataundermenuoptionMaps/Detaileddatamaps/Detailedmapssketch,
weeklydataundermenuoptionMaps/Weeklydatamaps/Weeklymapssketch,
dekadaldataundermenuoptionMaps/Dekadaldatamaps/Dekadalmapssketch,
monthlydataundermenuoptionMaps/Monthlydatamaps/Monthlymapssketch,and
annualdataundermenuoptionMaps/Annualdatamaps/Annualmapssketch.
Whererepresentationonamapisinconvenientforsomereason,e.g.someofthemeasuringstations
are positioned very close together, a diagram or sketch can be prepared in an image file, with a
manual definition ofeach station onthemap. This optioncanbe usedwhenfor somereasonmaps
areavailableinmosaicsections.
Queryingdataonzonemaps.Thisisavailablefor:
dailydataundermenuoptionMaps/Dailydatamaps/Dailyzonemaps,
weeklydataundermenuoptionMaps/Weeklydatamaps/Weeklyzonemaps,
dekadaldataundermenuoptionMaps/Dekadaldatamaps/Dekadalzonemaps,
monthlydataundermenuoptionMaps/Monthlydatamaps/Monthlyzonemaps,and
annualdataundermenuoptionMaps/Annualdatamaps/Annualzonemaps.
Thisrequiresa DXF formatfile (nivel 12) tohavebeenpreparedbeforehand with a differentlayer
for eachzone(states,regions,departments,municipalities,etc.)andloaded using theDXFaMCH.exe
routine. Eachzone of the map can be associated with a station or a station group. The fill value of
eachzoneis thevalue ofthestationorstation group andisrepresented witha filltypeand colour
thatcanbedefinedforeachvaluerange.
Queryingdata on isoline maps. This is available for daily data under menu option Maps /Daily
datamaps/Dailyisolinemaps.Itworksbysummingadaterange,sothatitcanbeusedingeneral
for any period and summing can also be done by month or year to make averaged monthly and
annual isolines over a given period. The stations tobe represented have to be defined as a station
group.
7/179
MCH User Manual
Querying data on maps by geographical position on vector maps (includes more than 40
geographicalprojectiontypes).MapsmaybetakenfromtheWorldDataBankWDBIIloadedas.mhc
files,special mapsin.mhcformat ormapsloadedusing theDXFaMCH.exeroutine. Thisisavailable
for:
dailydataundermenuoptionMaps/Dailydatamaps/Dailygeog.projnmaps.
detaileddataundermenuoptionMaps/Detaileddatamaps/Detailedgeog.projnmaps,
weeklydataundermenuoptionMaps/Weeklydatamaps/Weeklygeog.projnmaps,
dekadaldataundermenuoptionMaps/Dekadaldatamaps/Dekadalgeog.projnmaps,
monthlydataunder menu optionMaps /Monthly datamaps / Monthlygeog.projnmaps
and
annualdataundermenuoptionMaps/Annualdatamaps/Annualgeog.projnmaps.
Map queriesin webmode areavailable in the MCH server http://servidormch/mch under menu
option Maps. This offers optionsfor querying daily, detailed, monthly,annual, weekly and dekadal
datainmapsandtables.Mapsmustbedefinedasimagesgeoreferencedbytwopoints.
Allthedata queryfunctionshavetheoptiontoexport thedatato text files,commaseparatedvalue
(CSV)filesandspreadsheetfiles(upto65,535lines),intheformofthequeryoutput.Thereisalsoa
general way of exporting data fromthetables in the system under menuoption Capture / Export
datafromtables.
Importingandexportingdata
Thesefunctionsrequireuserlevel2or3.
There is a special data export function under menu option Capture / Export data tables for
generatingtextfilesfortransferringinformationtoothersystemsfrommostofthesystemtables.It
has options that canbe used toimportdata as a data backup facility. There is also a data import
function under menu option Capture / Import data from tables which can be used as an
alternative way of loading data from legacy sources or for interchanging information with other
institutionsthatisintherequiredformat.
Data can be updated between MCH servers using menu option Capture / Update data between
servers.
Performingcalculationsandeditingdata
Thesefunctionsrequireuserlevel2or3.
Detaileddataarethosewithafrequencyoflessthanoneday.Calculationofdailydatafromdetailed
data is used when data are available at regular intervals during the day, either from manual
procedures orfrom measurementsinautomaticstations. Theoption for calculatingdailydatafrom
detailed data is under menu option Edit and Calculations / Calculations / Calculate daily data
from detailed data. This calculation option is mainly designed for calculations of daily data from
automaticstationsandalsoforsomecasesofconventionalstations.
Usingdaily data it ispossible to calculate cumulative dailydata from the start of theyear; weekly,
dekadal, monthly and annual data can also be calculated. Daily, weekly, dekadal, monthly and
annual data can be used to calculate normals (or means if not all the conditions for normality
definedbyWMOaresatisfied)foranydesirednumberofperiods.Theoptiontocalculatebystation,
stationgroupsandzonesisundermenuoptionEditandCalculations/Calculations/Calculations
bystation,groupsandzones.
There are several mechanisms for editing data during capture. There are other mechanisms for
editing and displaying coded messages. To editdaily data using graphs, use menu optionEdit and
8/179
MCH User Manual
Calculations / Edit data / Edit daily data with graphs. To edit data using alisting there is menu
optionEditandCalculations/Editdata/Editdailytextdata.
Consult SYNOP FM12 format messages under menu option Edit and Calculations / SYNOP
messages / SYNOP FM12 messages. Consult SYNOP CREX format messages under menu option
Edit and Calculations / SYNOP messages / SYNOP CREX messages. Consult METAR / SPECI
messagesundermenuoptionEditandCalculations/METAR/SPECImessages.
Exportingdatatotextfilesandspreadsheets
Allthedata queryfunctionshavetheoptiontoexport thedatato text files,commaseparatedvalue
(CSV)filesandspreadsheetfiles(upto65,535lines),intheformofthequeryoutput.Thereisalsoa
general way of exporting data from thetables in the system under menu option Capture / Export
datafromtables.
DefinitionsGeneraltables
Within the user module, the system administrator has several facilities for configuring the MCH
workingenvironment.
Thesefunctionsrequireuserlevel2.
Definingstations
General station data can be defined and edited under menu option Definitions /
Stations/Stations.
Automatic stations are defined by satellite identifier under menu option
Definitions/Stations/AutomaticstationsbysatelliteID.
Station groups are defined under menu option Definitions / Stations / Station
groups.
Definition of variable types associated with station types under menu option
Definitions/Stations/Stationtypes.
Capturefrom instruments bystationunder menuoptionDefinitions/Stations/
Instrumentsbystation.
Capture of metadata from stations under menu option Definitions / Stations /
Stationmetadata.
StationlocatorundermenuoptionDefinitions/Stations/Stationlocator.
Stationsonmaps.Thesefunctionsdefinehowstationsarelocatedonmaps,georeferencemapsor
defineprojectionsofvectormaps.
Defining the position of stations on sketches, diagrams or maps by direct location under
menuoptionDefinitions/Stations/Stationsonsketchmapordiagram.
Georeferencing northoriented maps, in orthogonal projections and linear proportions by
axisorlinearapproximations, menuoptionDefinitions/Stations/Stnsonmaps bygeog.
posn2point.
Georeferencing maps as an approximation by quadrilaterals, menu option Definitions /
Stations/Stnsonmapsbygeog.posnquadrilaterals.
Definingmapsbygeographicalprojection,menuoptionDefinitions/Stations/DefineMCH
andgeneralmaps.
9/179
MCH User Manual
Definingvariables
Definingvariables and creatingdatatables associated withthenewvariables,menu option
Definitions/Variables/Variables.
Defining acceptable values for daily and detailed data, by station variable or generic by
variable,menuoptionDefinitions/Variables/Acceptablevalues.
Definingacceptablevalues for automatic stations,bystationvariableorgenericbyvariable,
menuoptionDefinitions/Variables/Acceptableautomaticvalues.
Definingchecksbyformulabyvariable,menuoptionDefinitions/Variables/Checks.
Definingchecksbyproximityof other stationsbyvariablestation,menuoptionDefinitions
/Variables/Proximitychecks.
Capturing conversion tables for derivedor converted variables, menuoptionDefinitions /
Variables/Conversiontables.
Defining derived variables by tables, menu option Definitions / Variables / Derived
variables.
Definingderivedvariablesby formulae,menuoptionDefinitions/Variables/Conversion
formulae.
Automatic stations are defined by satellite identifier under menu option Definitions /
Stations/AutomaticstationsbysatelliteID.
Defining automatic station variables for displayingon the web, menuoption Definitions /
Definitionsforweb/Variablesforautomaticstations.
DefiningdataforSYNOPCREX messages, menuoptionDefinitions/SYNOPCREX /SYNOP
CREXdata.
DefiningdatatemplatesforSYNOPCREXmessages,menuoptionDefinitions/SYNOPCREX
/SYNOPCREXtemplates.
Othertables
Defining Regional Management / Offices, menu options Definitions / Other tables /
Regionalmanagement.
Definingstates/provinces/departments,menuoptionsDefinitions/Othertables/States
departmentsprovinces.
Defining Municipalities / boroughs / parishes, menu option Definitions / Other tables /
Municipalities.
Definingcatchments,menuoptionDefinitions/Othertables/Catchments.
Definingsubcatchments,menuoptionDefinitions/Othertables/Subcatchments.
Defining hydrological regions, menu option Definitions / Other tables / Hydrological
regions.
Definingtimezones,menuoptionDefinitions/Othertables/Timezones.
Definingdataoriginsorsources,menuoptionDefinitions/Othertables/Datasources.
Definingunits,menuoptionDefinitions/Othertables/Units.
Transmissionandwebmanagement
Defining map options for presenting station information on the web, menu option
Definitions/Definitionsforweb/Intxxnetmapoptions.
Defining FTPtransmission options for station groups and daily and detailed datavariables
for transmission to other servers or sites, menu option Definitions /Transmissions /FTP
transmissionoptions.
Defining web addresses of FTP servers for data transmission, menu optionDefinitions
/Transmissions/FTPtransmissionaddresses.
10/179
MCH User Manual
11/179
MCH User Manual
Chapter2.Usingthesystem
Thischapterexplainshowtousetheusermoduleintheclientserverenvironment.
2.1.Mainmenu
MCHBDisoperatedby means of asystem menuandanumberofsubmenustosendandexecutequeries
on maps, queries on graphs, capture and export / import of data, editing and calculation, and general
systemdatadefinitions.
Depending on the levelof the user, one or two toolbars are displayed with icons for directly accessing
someofthefunctionsavailableinthemenus.
Themainmenumapofthesystemfunctionsisasfollows:
12/179
MCH User Manual
Accessingthesystem
14/179
MCH User Manual
17/179
MCH User Manual
21/179
MCH User Manual
2.3.4.Isolinesonmaps
Thisfunctionisavailablefordailydata.Themapisbuiltonthebasisoftheglobalcartographyavailablein
NetCDF format, using the Generic Mapping Tools and GhostScript routines. A detailed explanation of
someof theparametersforgeneratingmaps canbe foundinthedocumentationoftheGeneric Mapping
Toolsroutines.
YoualsoneedtodefinethestationgroupunderDefinitions/Stations/Stationgroups.
Inthetoppanetherearethreetabsdefiningthequerycriteria.
IntheQuerytab:
1. SelectthenameofthemapintheMapcombobox.Thefirsttimeyouuseit,youhavetokeyinthe
mapname.Inthiscase,thedefinition willbe constructedonthebasisof theparameterssupplied
later.
2. IntheVariablecombobox,selectthevariabletoberepresented.
3. IntheStationgroup combobox,selectthestationgroup tobeusedtogenerate theisolinesmap
(isohyets,isotherms,isobars,etc.).
4. Enterthestartandend datesandcheckthestartdateoption.Ifthedataaretorelate to one
dayonly,justentertheenddateanddonotcheckthestartdateoption.
24/179
MCH User Manual
27/179
MCH User Manual
2.4.Graphsmenu
Queries on graphs also produce data tables. Queries work in a similar way for all period types: daily,
detailed,weekly,dekadal, monthly andannualdata. Thedifferenceslie onlyinthe wayin whichthedata
areentered.
28/179
MCH User Manual
Figure 27:Graphs 1.
Inthetoppaneofthewindowthereisacontrolwithseveraltabswhereyoudefinethedataquery.
Torunaquery,intheQuerytab:
1. IntheVariablecombobox,selectthevariabletobeplotted.
2. In the Station group combo box, select the station group for which you want to plot one or all
stations. Stationgroupsare a simple list of stations identifiedbyname and defined under menu
optionDefinitions/Stations/Stationgroups.
3. Ifallstationsinthegrouparetobeplotted,checktheoptionAllstationsingroup.Usethisoption
withcareasif the group isverylargeorifdatais suppliedby automaticstations, the querymay
generate a large amount of data and may exceed the memory available in the computer for
displaying information,andmaytake alongtime. Aslongas the query producesno more than 2
milliondata,plottingwilltakeareasonabletime.
4. Key the start and end dates into the boxes provided for year, month and day of each date. For
detaileddata,timeanddatearealsotobeentered.
5. ClicktheQrybutton.
30/179
MCH User Manual
31/179
MCH User Manual
34/179
MCH User Manual
The Export data tab contains options for exporting data to commaseparated value (CSV) text files and
spreadsheetfiles,whichworksonlyifExcelisinstalledonthecomputerrunningthesoftware.
2.4.3Graphscomparingseveralstationsfordaily,detailed,weekly,dekadal,
monthlyandannualdata
Graphscomparingseveralvariablescanshowuptosixvariablesfromastationbetweenthestartandend
datessupplied,forthevarioustypesofdataperiodsavailableintheMCHsystem.
The detailed data are entered into the system by capture, capture of SYNOP data, loading data from
automaticstationsordigitizingtapes.
Dailydataareenteredintothesystembycaptureoraregeneratedbycalculationsfromdetaileddata.
Monthly,annual,weekly anddekadaldataarecalculatedfromdailydataunderthe optionCalculationof
databystation,grouporzone.
There are two types of daily data. Daily data with a single value for the day, such as precipitation or
evaporation, and daily data with extreme values for each day, plus the mean value such as air
temperature. This latter category also includes other variables such as barometric pressure, and a few
otherswhere,whenreportedmanually,probablyonlyasinglevalueiskept,butifmeasuredbyautomatic
stationstheextremevalues,suchasthelevelofariverordam,areavailable.
The generation of the table of data and their representation on the graph covers all the time defined
betweenthestartand enddates withincrementsof oneperiod, depending on thetype of queryselected
(daily,detailed,monthly,annual,weekly,dekadal)andintheperiodsinwhichthereisnodataareshown
inthedatatablewithvalue9999andnodataareshownonthegraph.
36/179
MCH User Manual
You can make other general queries by keyingdirectly into the Select instruction to databasebox. For
the query to work properly you also have to enter the Xdatum and Ydatumvaluesto be plotted. Some
examplesaregivenbelow.
Example1.Toobtaintheprecipitationrecordedoveraperiodatastation:
Select SUM(value) as sum, station from ddPrecipitation where station =
UYLPZBS and date >= 19981001 and date <= 19981015
Example2.Toobtainthemaximumprecipitationrecordedoveraperiodatastation:
Select SUM(value) as maximum, station from ddPrecipitation where station =
BOCHXSI and date >= 19981001 and date <= 19981015
Example3.Toobtaintheminimumtemperaturerecordedoveraperiodatastation:
Select MIN(value) as minimum, station from deAirTemp where station =
ECAMSCL and date >= 19981001 and date <= 19981015
Example4.Toobtainthetotalvolumeofwaterremovedbyoutletoveraperiodatadam(extractionisin
m
3
/s):
Select SUM(value)* 0.0864 as extracted, station from deOutlet where station
= CHICP and date >= 19981001 and date <= 19981031
Example5.Toobtainthedailyprecipitationrecordedoveraperiodatastation:
Select station, date, value from ddPrecipitation where station = SDACAGR
and date >= 19981001 and date <= 19981031
Example6.Toobtainthecodesandnamesofstationsinastationgroup:
Select t1.station, t1.stationname from stations as t1, stngroup as t2 where
t2.stngroup = UYCLIM and t1.station = t2.station
42/179
MCH User Manual
Example to obtain the mean temperatures of each station in a group, with station codes and names,
recordedonagivendate:
Select t1.station, t1.stationname, t2.value from stations as t1, deAirTemp
as t2, stngroup as t3 where t3.stngroup = SVCLIM and t1.station =
t3.station and t2.station = t3.station
Example 8. To obtain the mean precipitation, maximum precipitation in a day, the cumulative
precipitationateachstationforstationswithcodesbeginningthesameduring1998:
Select station, avg(value) as AV, max(value) as MX, sum(value) as SM from
dePrecipitation where station like UY% and year(date)=1998 group by
station
Example9.Toobtainthemeanriverflow,maximumriverflowinadayforeachofthestationswithcodes
beginningthesame:
Select station, avg(value) as AV, max(value) as MX, sum(value) as SM from
deRiverFlow where station like BO% and year(date)=1998 group by station
Example 10. To obtain the mean precipitation, maximum precipitation in a day, and cumulative
precipitation at each station with identical characters somewhere in the station code but not at the
beginning:
Select station, avg(value) as AV, max(value) as MX, sum(value) as SM from
dePrecipitation where station like ___GR% and date>=19981001 and
date<=19981015 group by station
Example 11. To obtain the mean precipitation, maximum precipitation in a day, and cumulative
precipitationateachstationforstationsofastationgroupdefinedinMCHduringaperiod:
Select t1.station, avg(value) as AV, max(value) as MX, sum(value) as SM
from dePrecipitation as t1, stngroup as t2 where t2.stngroup=PRCLIM and
t1.station = t2.station and t1.date>=19981001 and t1.date<=19981015
group by t1.station
Example 12. To obtain the mean precipitation, maximum precipitation in a day, and cumulative
precipitationateachstationforseveralstationgroupsdefinedinMCHduringaperiod:
Select t1.station, avg(value) as AV, max(value) as MX, sum(value) as SM
from dePrecipitation as t1, stngroup as t2 where t2.stngroup=UYCLIM or
t2. stngroup =ECCLIM and t2. stngroup =BOCLIM) and t1.station =
t2.station and t1.date>=19981001 and t1.date<=19981015 group by
t1.station
Example 13. To obtain the mean precipitation, maximum precipitation in a day, and cumulative
precipitation ateachstation forseveralstation groupsdefinedinMCH during a period, wherethe query
has the full name of the station and a name composed of the code and a part of the description to be
insertedinthegraphasanidentifier:
Select t1.station, t3.stationname, concat(t1.station, -,
mid(t3.stationname,1,15)) as STT, avg(value) as AV, max(value) as MX,
sum(value) as SM from dePrecipitation as t1, stngroup as t2, stations as t3
where t2.stngroup=UYCLIM or t2.stngroup =PYCLIM and t2.stngroup
=BOCLIM) and t1.station = t2.station and t1.date>=19981001 and
t1.date<=19981015 group by t1.station
43/179
MCH User Manual
Inexamples8to13,adatuminthequeryisidentifiedbyanalias(asSMforinstance), sothatthedatum
can be plotted. Thus in text box Y datum you can enter SM and in text box X datum you can enter
station,andrepeatthequerysothatittakesaccountofthereferenceswhenbuildingthegraph.
2.5.Capturemenu
Thismenucontainstheoptionsforcapturingdailyanddetaileddata,capturingSYNOPmessagesinFM12
andCREXformats,exportingandimportingdataandupdatingdatabetweenMCHservers.
Toexportdatafromothertables:
1. Select Other tables as the Type of data for export. A list of available tables appears at the
bottomleft.Youcanselectonlyonetableatatime.
2. Selectthetableforexportusingthe>buttonorbydoubleclickingonthetablename.
3. SelectoutputFiletype.
4. Click the Export data button. Enter the name of the file and its location in a directory
(folder).Thesystemreportsthenumberofrecordsexported.
Data exportation are made
with decimal separator .
53/179
MCH User Manual
2.5.6Importingdatatotables
DataareimportedusingfilespreviouslyexportedbytheMCHsystemorfilespreparedbyothermeans.It
isagenericwayofloadingdatafromothersources.
Toloaddatafrom othersources,firstprepareatextfile(.txt)withfieldsseparatedbytabs(chr(9)),with
thedatalaidoutintheorderinwhichtheyaretobeenteredintothetable.Datahavetobedefinedwith
atleastthe codein order tobeloaded.Thecodeis generally the firstorthe firsttwo or threedata. Each
lineofthefilemustcontainasinglerecordforthetableintowhichitistobeloaded.
Select thedatatypeandthevariable ortable tobeimportedandthefieldscontainedinthetableappear,
in the order in which the data are to be entered. Using this information, prepare the data, e.g. in a
spreadsheet,andthensavethetable asatabseparated text fileandthenimportitusingthatoptioninto
the MCHdatabase.MakesurethatthedatesaresavedintheYYYYMMDD(year/month/day) format to
ensure that the dates load correctly, as in other formats DD and MM may not always be interpreted
correctly.
Selectthefiletobeloaded(inthefilebrowser)usingtheImportdatabutton.Ifthedataareinsufficient,
thesystemtellsyouhowmanythereareandhowmanythereshouldbe.Themissingdatawillbeentered
asnullvaluesintherecordsloaded.
Data exportation are made with
decimal separator .
54/179
MCH User Manual
2.5.7Updatingdatabetweenservers
TheremaybeanumberofreasonsforhavingmorethanoneMCHserver,forexampleifyouhaveseveral
offices handlingthedata, backup server(s), servers used by technical departments to generate projects
Data must to carry out with:
1.-Must be verified. Load process
not verify
2.-Stations must be defined.
3.-No null data are allowed.
4.-Decimal separator must be .
Data must to carry out with:
1.-Must be verified. Load process
not verify
2.-Stations must be defined.
3.-No null data are allowed.
4.-Decimal separator must be .
55/179
MCH User Manual
basedonspecialdataintheirstudiessothattheycanaggregatecalculateddata,completeseries,datathat
areunauthorizedorfromotherinstitutionsorcountries.
Data can be synchronized between servers in several ways: Via FTP servers, using functions for
synchronizing data between the main server and other servers using MySQLs own functions and the
appropriateMCHfunction.
This method of updating between servers works in the same way as exporting data and the only
differenceisthatyouhavetoenterthenamesoftheconnectionstothedatabases(DSNs)andwhetherthe
updateistoaddnewdataonlyoroverwriteexistingdata.
2.6.1Editingdailydatainlistings
Inthistypeof edit thedataareanalysed for eachstation and variableinthe definedperiod.Thecriteria
forpossibleerrorsare:
Variation factor. When two consecutive data differ by more than a given value, a message is
output. Thistype ofanalysisis relevantforvariables that change gradually, suchas temperature,
levelandbarometricpressure.
Percentages in relation tothemaximumand minimum. This takes account of extreme values
within15daysforeachdateanalysedofthehistoricalvalues(normalsandanycalculatedmeans),
and there is a tolerance above the maximum and below the minimum in relation to the given
constants.
It warns if there are no previous data. This is used when you want to know which data are
missingforavariable.
57/179
MCH User Manual
2.6.2Editingdatausinggraphs.
Reviewingdata on graphs,based on thejudgmentof the person conducting the analysis,isprobably one
of the most powerful ways of reviewing data from hydrometric and climatology stations. This option
offersdataanalysis ongraphsforvisualinspection,stoppingatdatathathaveconsecutivevalues outside
atoleranceand offeringfacilitiesforeditingbasedonthepreviousornextdata,avaluebetweenthedata
suppliedorcombinationswithinthetolerancethatcouldbekeyingerrors.
Other ways of reviewing and editing data are to open two windows, one to display data on a graph and
another for datacapture, andwhenanerrorisdisplayed, to comparewiththedata onthetype ofcapture
andifthereisanerror,editthecaptureandlookagainatthegraphtodisplaytheresultsoftheedit.
Youcanzoomthegraphtoinspectthedetailofdataavailabilityforeachdate.
The bottom pane shows a tableof all data for thevariable for each station and for eachdate, and these
datacanbeexportedastext. Thistypeof querycanbeusedtobringtogetherthedataforavariablefor a
wholestationgroupinafairlycompactway.
Where thereare more than24stations in the group, the graph shows only 24, and twobuttons > and
<appeartogotothenextorpreviousgroupof24stationsonthegraph.
Toreviewtheavailabilityofdataforavariableusingtables:
IntheCalculationstab:
1. Enterthestartandenddatesintothetextboxesfortheyear,monthanddayofeachdate.
2. SelectthevariableintheVariablecombobox.
3. SelectthegrouptobequeriedfromtheStationgroupcombobox.
4. Inthedualstationlist,selectthestationstocalculate.
5. ClicktheCalculatebutton.
Thesystemreportswhenthecalculationiscomplete.
62/179
MCH User Manual
66/179
MCH User Manual
Figure 67: Calculating data by station, station group and zones on maps, 1.
Calculations of area data (designed mainly for precipitation) are performed using a grid of a defined
increment.ThecalculationcanbeperformedusingtheThiessenVoronoimethod,inwhicheachcelltakes
a value equal to the nearest station, or by isolines, taking account of the four nearest stations and the
valueisweightedinrelationtothosefour,withaweightingequaltotheinverseofthedistanceofthecell
fromthestation.Thesecalculationcriteriaareappliedforcalculatingdailydataandfortheotherperiods;
thezonesaretakenasiftheywerestations.Whendatahavealreadybeencalculatedbystationgroups,in
anyqueryofthesystem,thedataforthegroupcanbedisplayedbyenteringthestationcodeinthestation
option.
Toperformcalculationsbymapzones:
1. SelecttheDatatypetobecalculated(daily,monthly,annual,weekly,dekadal).
2. Enter the start and end dates for the period tobe calculated into thetext boxes for the year,
monthanddayofeachdate.
3. Selectthecalculationtypegroupsbymap.
4. Selectupdatetype,AddorOverwrite.
5. Optionallyselectstationtypetorestrictthenumberofvariablesofferedforselection.
67/179
MCH User Manual
6. FromtheduallistVariabletocalculatelocateontherighthandlistthevariableorvariablesto
becalculatedusingthe>,>>,<and<<buttonsordoubleclickingonthevariable.
7. SelectthegroupcontainingthestationstobecalculatedfromtheStationgroupcombobox.
8. FromtheduallistStationstocalculatelocateontherighthandlistthestationorstationstobe
calculatedusingthe>,>>,<and<<buttonsordoubleclickingonthecodeofeachstation.
9. Select from the Base map for calculation from among those already loaded and available in
MCH.
10. Definetheincrementofthecalculationgrid(0.2degreesbydefault).
11. Definethe maximumdistance fromthecellto the station withavailabledata.The calculation will
ignorecellsatagreaterdistance.
12. Selectthecriterion,ThiessenorIsolines.
13. Selectwhethertouseonlyinsidestationsandthemaximumdistanceoutsidethezonewhenthere
arenodatainthezone.
14. ClicktheCalculatedatabutton.
Figure 68: Calculating data by station, station group and zones on maps, 2.
This produces alistsummarizing the calculationsperformed. Todisplaythe calculated data, use one of
thequeryfunctionsinMCH,suchasthoseintheMapsorGraphsmenus.
CalculationsofnormalsormeanscanbeperformedwithWMOorextendedcriteria.
68/179
MCH User Manual
Figure 69: Calculating data by station, station group and zones on maps, 3.
Thetypesofnormalormeansforcalculationareasfollows:
WMO standard or extraordinarynormal, criterion 3 and 5, 30years. There mustbeno more
thanthree consecutivedaily data missing in a month andno more than fivedatamaybe missing
in a month. Noncompliance prevents the month or year from being calculated. There must be
data for 25 years that satisfy these criteria and there must not be morethan threeconsecutive
yearswithoutacalculation.
WMO provisional normal criterion 3 and 5, 10 or more years. There must be no more than
three consecutive daily data missing ina month and no morethan five data may be missing in a
month. Noncompliance prevents the month or year from being calculated. There must be
consecutivedataforatleast10years.
Extendednormals,anynumberofyears,morethan83%ofdata.
Simplemean(anyamountofdata).
Nocalculation;itmerelydetermineswhetheritispossibletocalculateaWMOtypenormal.
Dataentryissimilartothecriterionbystationorstationgrouporbyzones.
Toperformnormalormeancalculations:
1. SelecttheDatatypetobecalculated(daily,monthly,annual,weeklyordecadalnormals).
2. Enterthestartandendyearsinstartandenddates.
3. Selectcalculationtype:station,stationgroupormapgroups.
4. Selectupdatetype,AddorOverwrite.
5. IntheNormalstab,selectthetypeornormalormeantocalculate.
6. Theremainingdatadependonthetypeofcalculation.
ClicktheCalculatedatabutton.
Thisproducesalistsummarizingthecalculationsperformed.
2.6.6QueriesdecodingSYNOPFM12messages
WhenqueryingSYNOPFM12messages,adecodedversionofeachmessageisalsoavailable.
69/179
MCH User Manual
ToquerySYNOPFM12messages:
1. Select the station group containing the stations to be queried from the Station group combo
box.
2. Select the station to query from the Stationcombo box and check the option to the left of the
box.Ifyouleaveituncheckedthequerywillapplytoallstationsintheselectedgroup.
3. Enterthestartandenddatesandtimesinstartandenddates.
4. ClicktheQrybuttontorunthequery.
5. The messages found will bedisplayed in the tablein the bottom pane. As you move through the
table,theSYNOPFM12 messageanddecoded message panesdisplayin textformthe content
ofthecurrentrecordinthebottompane.
2.6.7QueriesdecodingSYNOPCREXmessages
WhenqueryingSYNOPCREXmessages,adecodedversionofeachmessageisalsoavailable.
70/179
MCH User Manual
75/179
MCH User Manual
77/179
MCH User Manual
2.7.3Stationgroups
A station group is a list of station codes used in various parts of the MCH system to simplify the
mechanismsforqueryingstations.
Astationgroupisdefinedasacodeofupto20charactersandthestationcodesdefinedbyastring.
2.7.6Instrumentsbystation
SYNOPCREX messages have to include the altitude and instrument type for some information to be
includedineachmessage.
Thisinformationis alsoa setofmetadata aboutthestation.Adatum isvalidfrom thedate ofinstallation
untilanewdefinitionisentered.
82/179
MCH User Manual
2.7.7Definingmapsbygeographicalpositionusingtwopoints
Maps are always handled in the system using the BMP format, but the graphics handling library
ImageMagickisusedtoconvertvariousformatstoBMP.
Whenyouhavemaps,inimageform,insometypeoforthogonalprojection(withlatitudesandlongitudes
equallyspaced foreach axis),tousethe mapintheMCHsystemyouhavetogeoreferenceitusing apair
ofknownlatitude/longitudepoints.
Togeoreferenceamapusingtwogeographicalpositions
Click the Map button to locate the map. It is recommended to store maps in the maps
subdirectory(subfolder)ofthedirectory wheretheMCHsystemisinstalled.Selectthe mapusing
thesystemfilebrowsertolocatethemapinthedirectory(folder)structure.
Rightclick to locatethefirst known point on the mapin the top pane ofthefull map. This loads
the X and Y coordinates of the topleft corner as point 1).To relocate the point, repeat the same
procedure.
Shiftrightclicktolocatethesecondknownpointonthemapinthetoppane.ThisloadstheXand
Ycoordinatesofthetoprightcorneraspoint2).
Entertheknowncoordinatesforeachofthepointsinthelongitudeandlatitudetextboxesin
decimalformat(DDD.dddddd),usingaminussignforwestlongitudesandsouthlatitudes.
To check that the map is properly georeferenced, select a Station group from the relevant
combo box and click the Locate stationsbutton.The stations are shown as small green circles
on the map. Rolling over a station with the mouse shows its code and coordinates. Rolling the
mouse over the main map shows on the right, above the map enlargement pane the point and
geographical coordinates of the pointer position. Dragclicking on the full map shows an
enlargementofthemapinthezoompane.
ClicktheSavebuttontostorethegeoreferencedmapdefinition.
83/179
MCH User Manual
2.7.8Definingmapsbygeographicalpositionusingquadrilaterals
When you have maps, in image form, in some type of nonorthogonal projection of latitudes and
longitudes, they can be georeferenced by approximating the geographical coordinates using
quadrilaterals.
Togeoreferenceamapusingquadrilaterals
ClicktheMapbuttontolocatethe map.Werecommendstoringmapsinthe mapssubdirectory
(subfolder) of the directory where the MCH system isinstalled. Select the map using the system
filebrowsertolocatethemapinthedirectory(folder)structure.
Shiftrightclick at thetopleft cornerof the full mapto startdefininga quadrilateral. Thenright
clickon fourknownpoints to locate the X andY coordinates in the Define quadrilaterals tab;
thiswilldrawlinesbetweenthepointslocated.Shiftrightclickagaintoadjustthepositions.
Click the Add quadrilateral button. Add other quadrilaterals as required. If the geographical
zoneisnotverylarge,inmostcasesyougetareasonableapproximation(fortheimagesize)with
asinglequadrilateral.
84/179
MCH User Manual
To check that the map is properly georeferenced, select a Station group from the relevant
combo box and click the Locate stationsbutton.The stations are shown as small green circles
on the map. Rolling over a station with the mouse shows its code and coordinates. Rolling the
mouse over the main map shows on the right, above the map enlargement pane, the point and
geographical coordinates of the pointer position. Dragclicking on the full map shows an
enlargementofthemapinthezoompane.
ClicktheSavebuttontostorethegeoreferencedmapdefinition.
2.7.10DefiningMCHandgeneralmaps
General maps are based on theWorld Data Bank cartography, distributed free of charge in text format
and converted to .mhc format. The converted files are in the subdirectory (subfolder) mchmapas
whereMCHisinstalledandarecalledcostas.mhc(coasts),fronteras.mhc(borders)andrios.mhc(rivers).
86/179
MCH User Manual
MCH maps are built up from cartography with various layers of information from vector maps in DXF
level12 format. Themap files areinsubdirectory(subfolder) mapashc where MCHisinstalledand are
called mapasPTP.mhcand mapasCur.mhc, mapasPTP containingallthelayers exceptforthelevel curves
which are in mapasCur.mhc. These maps require special cartography for each country and are empty in
the installation. They can be used likethat, toproject maps loaded as described in thenext paragraph,
indicatingthataperimeterpolygonwillbeused.
The projections can also be bounded by a general polygon so that anything outside that polygon is
ignoredin the mapshown. Theperimeterpolygons are takenfromDXFtype12filesand areloadedinto
MCHusing the DXFaMCH.exe routine. Perimeter polygons are defined by one or more closed polygons,
whichcanbeusedtogeneratemapprojectionsloadedwiththisprocedure.
Additionally, based on world cartography, several map projections are available via the publicdomain
Proj4mapprojectionlibraryandover40projectionsarecurrentlyavailableinMCH.
91/179
MCH User Manual
2.7.13Variables
ThevariablesintheMCHsystemarenotfixedandanynumberofvariablesmaybeaddedasrequired.
For each variable in MCH there is a number of tables for each period in which data can be saved or
calculated,andfornormals(ormeans)forthoseperiods.
InMCHtables arebuilt with the name given tothetable, and aprefixassociated withthetabletype. The
tabletypesforeachvariableandtheircorrespondingprefixesareasfollows:
1. Detaileddata.Prefix dt.Detailed datain the MCHsystem arethosereportedwithafrequency of
lessthanoneday.Example:dtprecipitation.
2. Dailydata.Prefixdd orde.Dailydatatablesof typedd are forvariableswherethereisonly
oneitemofdataperday,such asprecipitationandevaporation.Dailydatatablesoftypede are
for variables that have extreme values, like temperature, where the daily data consist of three
values aday,the mean(orvalue ata set timesuchas8 a.m.in thecase of manualrecords which
aretaken at thesametime eachday), maximum and minimum. The typeis setintextboxDD or
DX.Examples:ddprecipitation and deairtemp
3. Weeklydata.Prefixds.53weeksayear.Example:dsprecipitation.
4. DekadaldataPrefixdc.36dekadsayear.Example:dcprecipitation.
5. Monthlydata.Prefixdm.Example:dmprecipitation.
6. Annualdata.Prefixda.Example:daprecipitation.
7. Dailynormals.Prefixnd.Example:ndprecipitation.
8. Weeklynormals.Prefixns.Example:nsprecipitation.
9. Dekadalnormals.Prefixnc.Example:ncprecipitation.
10. Monthlynormals.Prefixnm.Example:nmprecipitation.
11. Annualnormals.Prefixna.Example:naprecipitation.
Todefineavariableyouhavetoprovidethefollowingdata:
Nameofthevariable(upto12characterscontainingnospaces).
Shortnameoftwocharacters.
Fulloralternatenameofthevariable.
Name of the table (up to 12 alphanumeric characters containing no spaces; the first character
mustbealetter).
Unitofmeasurement.
DD or DE.DD for variables with a single datum a day,such as precipitation and DE for variables
withextremevalues,suchastemperature.
Cumulativeormean.CUMULorMEAN.Thisrelatestothewayinwhichthedailycumulativefigure
iscalculatedovertheyear.
Decimals.Thisisthenumberofdecimalplacestowhichcalculationsarerounded.
Cumulative by group.CUMUL or MEAN. This is the way in which a value is accumulated for a
stationgroup.
92/179
MCH User Manual
Accumulation of detailed to daily data. ACCUMULAT, LAST, MEANLAST and
FREQUENC.ACCUMULATIONisforvariableslikeprecipitation.LASTisfor cases where thevalue
forthedayistobethelastvalueforthedayandthisisequivalenttomanualmeasurementataset
timeinthemorning.MEANLASTisforcalculatingthemean,butifthereareinsufficientdatainthe
day, then the last availabledatum is reported. FREQUENC is used for pairs of data for handling
winds,togivevaluesforprevailingwinds.
2.7.14Acceptablevalues
When defined, acceptable values are used to check entries during capture and loading of information
fromautomaticstations.
Valuesareprovidedforeachvariable and station.Acceptablevalues canhave differentvalidities (thisis
necessaryespeciallyinautomaticstationswhenthereferencelevelsforlevelsensorsarechanged).
This option alsodefines acceptablevalues for daily and detailed data, identifying the data typeas D for
dailydataandTfordetaileddata.
The date given is the start date for the validity of the acceptable value and it will remain valid until
anotheroneisdefinedatalaterdate.
Values ofdatalowerthan the minimum andhigherthanthe maximum,inthe caseof automaticstations,
are not accepted and, in the case of daily data, the person performing the capture is warned of the
possibleerror.
Datamustfallbetweentheminimumandmaximumvaluesandsatisfytherelation:
min_value<=alert1min<=alert2min<=alert2max<=alert1max<=max_value
93/179
MCH User Manual
Thesevaluesareusedduringcapturetoshowcolourswhichfacilitatedataentry.Valuesbelowmin_value
orabovemax_valuearerejectedandareshowninredduringcapture.Othervalueswithineachrangeare
shownincolour.Valuessatisfyingtherelation
alert2min<=value<=alert2max
areregardedascorrectandarenotshownincolour.
The change is the maximum value allowed between two consecutive measurements and in the case of
detaileddata,youcanspecifythetimerangeinminutesthatisappliedtothecheck.
The check is made during capture of daily data and detailed data, just before they are loaded into the
database.
Itworkswith atable forcapture.The controls allowyoutoadd,delete ormove aroundthetable. Toadd,
insert with the + button. Make changes in the table or in the text boxes ofeach field. Changing record
updatesthechanges.ThedatummustbeTdetailed,Ddaily.ThechecktypemustbeRRejectifitfails,A
Alertif it fails. A logicalexpression must be used. The expression can be composed of logical operators
AND,NOT and OR, arithmetic operators +,, *and /, and database expressions of the type variable: xxx
where xxx can be value, corrvalue, maxvalue, minvalue or 1 (previous datum) and brackets as required
fortheorderofoperations.
ClicktheEditbuttonandthenkeyintheformulatocheckthesyntax.
2.7.16Checksbyproximity
Checksbyproximitydefineastationorstationgroupforcheckingadatumforthestationvariableagainst
thedataofeachstationinthegrouportherelatedstation.
95/179
MCH User Manual
ChecksworkinEditdatainlisting.
Themaximumdistancetobeappliedfornearbystationsisinkmandthedifferenceinaltitudesinm.
Thestationgroupdefineswhichstationsthecheckwillapplyto.
Theintervalinminuteslimitsthesearchforinconsistenciesinotherstations.
2.7.17Conversiontables
When a variableis obtained bycalculation from a measured variable, in MCH this calculated variable is
calledaderivedvariableandthecalculationrule,whichcanbeofseveraltypes,iscurrentlyimplemented
in MCH by means of a conversion table, whichis a tabular form of the calculation function.Many of the
conversionrules canbeapproximatedby a series of straightlinesegments withrelativelyfew pointson
thecurve.
Tabulatethecurve withvalueXasthemeasuredvalueandvalueYasthederivedvariable.Givethetable
anameofupto15characters.Capturethetabledatumbydatum.
96/179
MCH User Manual
Another way of calculating derivedvariables is by a direct SQL expression to the database.In this case
there are specific data that can be included in the formula and which are substituted when the
calculations are performed:_EST_(station), _FECI_(startdate),_FECF_(enddate),_FEC2_(date of
previousday),_FEC_(todaysdate).
To use this option you need a thorough knowledge ofthesyntax of the MySQL Select statement and the
functionsthatcanbeusedwithit.
For direct SQL statements, key in the definition, accessing the database by means of the mysql.exe
commandline.Runthestatementtocheckthatitcontainsnoerrors.
98/179
MCH User Manual
2.7.19Variablesforautomaticstationsbysatelliteidentifier
This table isdesigned for use by a routine that decodes datafrom automatic stations received by GOES
satellite. All decoding routines must comply with the transmission patternsused by the datacollection
platforms(DCPs).
Messages often contain insufficientinformation to know what variables are being transmitted and with
whatfrequency.Insuchcases,youneedtosupplythosedatainthistabletocompletetheinformationand
allowittobedecodedproperly.
The required data are: satellite identifier, datetime, reception sequence of data in the message,
department or company responsible for the station, station name, variable and period in minutes
betweenconsecutivedata.
99/179
MCH User Manual
Several reception sequences can be supplied and each one will be valid until the datetime of the next
sequence (this also allows datain historicrecords to be decoded where thetransmission sequence has
changed).
2.7.20Acceptablevaluesforautomaticvariables
For decoding routines and loading data from automatic stations youneed to filter the dataso thatonly
values within permitted ranges are accepted. Some data platforms also transmit a number that means
thatthedatumwasnotmeasured.
Itcanalsohappenforsomevariablesthatthevaluetransmittedisonlypartofthevalueorthatthevalue
isreferredtoanumber;theseconstantsthereforehavetobesuppliedtoobtainthecorrectedvalueofthe
variable.
Youcanalsoenterdatatodefinealarmlevelsorcriticalvalues.
100/179
MCH User Manual
The data to be entered are the station code (which when you enter ten Zs (ZZZZZZZZZZ) is a generic
valuethatappliestoallstationsunlessthereisavaluespecifictothestation,variable,adjustmentvalue
1,adjustmentvalue2,minimumvalue(ifthereceiveddatumafteradjustmentislessthantheminimum
itisnotaccepted),maximumvalue(ifthereceiveddatumafteradjustmentisgreaterthanthemaximum
it is not accepted), missing datum value, critical high value (to warn of alert situations), critical low
value(towarnofalertsituations).
2.7.21Derivedvariables
A measured variable can have one or more derived variables, for each of which you need to define a
conversiontableunder menu optionDefinitions/Variables /Conversiontables. Fordecodingroutines
andloadingdatafrom automaticstationsyouneedtofilterthedatasothatonlyvalues within permitted
ranges are accepted. Some data platforms also transmit a number that means that the datum was not
measured.
Between 1 and 4 derived variables can be obtained from each measured variable. The maximum is
typically2,inthe caseofdams, wherethewaterlevelisusedtoderivethesurfacearea coveredby water
andthevolumestored.
101/179
MCH User Manual
2.7.23SYNOPCREXmessagetemplates
CREX messages may have automatic content when a general decoder is available. They may also be
based on external definitions called templates. MCH provides only encoding and decoding of SYNOP
messages in CREX format, based on templates.
CREX data types have to be defined before defining templates. The template used is D07089,
published by WMO.
The templates (template codes) and data (data codes) to be included in CREX messages are always
associated with a length of six characters and are incorporated in accordance with the WMO Manual
on Codes.
To define a template, select the data to be included and the order in which they are to be incorporated
or decoded in the message. To facilitate the incorporation of the template, the data the template may
contain are included with a short description. A CREX message can contain the data type code several
times without it necessarily referring to the same data. When you save, if the definition already exists,
it is overwritten by the current definition.
2.7.24FTPtransmissionoptions
FTP transmission is an optional part of MCH which can be used for automatic synchronization of data
betweenseveralservers.Directsynchronization can alsobeimplementedusingnative MySQL5database
functions.
Thisoptionconsumesfewresourcesforsendingdatafromoneservertoanother.
Synchronizationisnormallydoneby meansofataskscheduled atvarioustimes,generallyafterthedata
are available (everyhour or everythree hours for automaticstations and one or more times a day for
dailydata).ThetaskthatpreparesthedatatakesthevariablesandFTPaddressdefinedinthisoptionand
in the option in thenext section to send the datato anotherserver. The receiving server in turn has a
103/179
MCH User Manual
scheduledtasktoreadthedatasubdirectoriesoftheFTPservertoseewhethernewfilesareavailablefor
loadingintothedatabase.
A transmission option consists of a variable number of records in which each line contains the option
number of up to 30 characters, station group, sequence number, variable to be transmitted, and
whetherthedatatypeisdetailed(T) ordaily(D).Theoptionenabled (YES /NO) canbe used to disable
variablesfortransmission.
2.7.31Datasources
A data source is an identifier that is normallyused in detailed data tables, to reference wherethe data
werereceivedfrom.
2.5.36Hydrologicalregions
Hydrological regions are used in the definition of Stations to determine their hydrological area. The
hydrologicalsectorsdefinedinMCHarehydrologicalregions,catchmentsandsubcatchments.
109/179
MCH User Manual
2.7.39Regionalmanagement/offices
An internal division of the Body or Enterpriseusing MCHcan besethere asa Regional Management or
Regional Office. This is specifically designed for the case where there are several offices in the country
lookingafterseveralstations.ThisdatumisusedfordefiningStations.
2.8Windowmenu
The window menu, a generic function of many Windows applications, tells the user about the daughter
windowsofthemainapplication.Here,theusercanseetheactivewindowsandswitchtothedesiredone,
andclosealltheactivesystemwindowsifrequired.
It lists up to nine active windows directly. When there are more, an option appears for opening an
additionalwindowshowingthemall.
111/179
MCH User Manual
If windows are minimized, when the mouse hovers over the minimized window, the full identification
thatappearsatthetopofeachwindowisshown.
2.9.Helpmenu
As everywhere in the Windowsenvironment, helpis invoked with key F1.The system help is contextual
andthe availablehelpinformationappearsdependingonhowtheuserisinteractingwheninvokinghelp
withF1.
The Aboutoption gives generalinformation ontheMeteorology, Climatologyand HydrologyInformation
System,MCH.
MCH User Manual
Annexes
AnnexASysteminstallation
AnnexBObtainingMCHdatabaseinformationfromExcelspreadsheets
AnnexC PreparingamapinDXFformattoloadintoMCHforpresenting
informationinzonemaps
AnnexDToolsforexchanginginformationfromMCHwithothersystemsand
betweenMCHlocations
AnnexECalculatingdailydatafromdetaileddata
MCH User Manual
AnnexASysteminstallation
Instructions for installing the system in server and client modes.
117/179
MCH User Manual
INSTRUCTIONS FOR INSTALLING THE MCH SYSTEM
In the maps environment file gmtenv.bat set the directory containing the system in the lines for
externalnamesNETCDF,GMTHOMEandHOME.
SET NETCDF=C:\MCH\GMT\BIN
SET GMTHOME=C:\MCH\GMT
SET HOME=C:\MCH\GMT
120/179
MCH User Manual
3) Runningthedatabasemanagerasaservice.Thisisexplainedinthedatabaseinstallation
leaflet.
The process ofinstallingMySQL already comes with the methodfor startingthe databaseserver
asaservice.
Ifnecessary,youcanruntheMySQLServerInstanceConfigurationWizardtask.
Documentation is included for the actions for executing this procedure and there is additional
documentationonhowtorunMySQLasanapplication.
To work, the MySQL database server requires a TCP/IP network connection and the network
mustbeactivetoallowittoworkproperly.
StartingMySQLasaserviceinWindows2000oralaterversion.
1.Copythefilex:\mysql\bin\myexample.cnftoc:\my.cnf
2.EdittheinternalreferencestopointtotheMySQLserverinstallationdirectory.
3.InaDOSwindow,executethecommandx:\mysql\bin\mysqldnt.exeinstall.
4.StartthemysqlserviceinaDOSwindowusingthecommand
NETSTARTmysql
x:denotestheharddiskwhereMySQLisinstalled.
StartingMySQLasanapplication.
1.CreatetheMySQLtemporaryworkingdirectoryonthedrivewhereMySQLisinstalled.
InaDOSwindow,runthecommand
mdx:\temp
2.InaDOSwindow,runthecommand
x:\mysql\bin\mysqld.exentx:\temp
We recommend creating two shortcuts to start and stop MySQL directly, in case MySQL cannot
becorrectlystartedasaservice.
1.CreateashortcuttostartMySQL,namedStartMySQLandwithparameters:
Destination:x:\mysql\bin\mysqld.exentx:\temp
Startin:x:\mysql
2.CreateashortcuttostopMySQL,namedStopMySQLandwithparameters:
Destination:x:\mysql\bin\mysqladmin.exeshutdown
Startin:x:\mysql
121/179
MCH User Manual
122/179
MCH User Manual
123/179
MCH User Manual
124/179
MCH User Manual
125/179
MCH User Manual
126/179
MCH User Manual
130/179
MCH User Manual
131/179
MCH User Manual
132/179
MCH User Manual
133/179
MCH User Manual
In the maps environment file gmtenv.bat set the directory containing the system in the lines for
externalnamesNETCDF,GMTHOMEandHOME.
SET NETCDF=C:\MCH\GMT\BIN
134/179
MCH User Manual
SET GMTHOME=C:\MCH\GMT
SET HOME=C:\MCH\GMT
MCH User Manual
AnnexBObtainingMCHdatabaseinformationfromExcelspreadsheets
137/179
MCH User Manual
ObtainingMCHdatabaseinformationfromExcelspreadsheets
SystemrequirementsforaccessingMCHdatainExcel:
Atleast:Office97or Office2000professional, OfficeXPSOHO(Small Office HomeOffice)or
Office2003professional.
Install the data manager for communicating with the MySQL data server (MySQL ODBC
driver)onthecomputerwheretheExcelspreadsheetistobeused.
ConnectiontoanMCHdataserverviaaLANorWAN.
ToactivatetheconnectionfromExceltodatabases:
InExcel,openablankspreadsheetandselectTools/AddIns.
RuntheODBCAddinmacro.
Savethefilewithaname,exitfromExcelandstartitagain.Thisproceduremaydirectlycall
upaspreadsheetthathasbeencreated previously andistobeedited.Communication with the
databasemaybeactivatedbysearchingforthefileXLODBC.xlawiththeWindowsdatasearch.
138/179
MCH User Manual
139/179
MCH User Manual
In System DNS, add type MySQL ODBC 3.51 Driver and set suitable parameters for the
location of the MCHdatabase, asshownin thefigurefor creating a MySQLtype DNS andthen save
theinformationbyclickingOK.
TocalldatainanExcelspreadsheetfromtheMCHdatabase.
Inthecellwherethedataaretogo,typeastatementofthefollowingtype:
=SQL.REQUEST(DSN=mch,,4,Select value from ddPrecipitation where
station = codeand date = aaaammdd)
whichcallstheprecipitationvalueforastationonagivendate.
If thereisarecordfor the stationand theday in the Excelspreadsheet cell whereyou entered the
statement it displays the information, otherwise it displays #N/A and that value cannot be
handled properly by Excel operations. We therefore recommended that the cell that requires the
value should make reference to the cell calling the value from the database and test whether the
datumexistswithastatementsuchas:
=IF(ISNUMBER(BD20); BD20; )
Tofacilitatecallsto thedatabase,itis agoodideain onecolumntoenterthestationcodesthatyou
needtoqueryandinafixedpositionthedateordates withinwhichyouneedto makethequery,as
showninthefigure.
Thedataoftype"dd"tablesareasfollows:station(type,stationcode),date(dateofdatum),value
(valueofvariableonday),code(message codetype),cumulvalue(cumulativevaluefrom startof
year), daynum(day number with data in year), numStations(number of stations generating data
for theday whenthedatum wascalculatedfor astation group,inwhich casethestation codeis the
groupcode),source(datasource).
Thedata oftype"de" tablesareas follows:station(code ofstation orstation group),date (dateof
datum), value (value of the variable on the day), code (message or character code),
maxvalue(maximumvalueofthevariableintheday; manyvariablesthat regularlyreportonlyone
datum a day containthesame data as value), maxdatetime(date andtime atwhich the maximum
occurred), codemax(maximum value message code, character), minvalue(minimum value of the
variable in the day; many variables that regularly report only one datum a day contain the same
data asvalue),mindatetime(date and timewhenthe minimumoccurred),codemin(message code
of minimum value, character), cumulvalue(cumulative value from the start of the year),
numday(numberofdays with datain theyear),numStn(number of stations generating thedatum
ontheday,0or1whenitisstationdata),source(datasource).
Herearesomeotherpossibilities forobtainingdatafrom theMCHdatabaseinExcel,assumingthat
the station code is in cell P11, the start date is in cell S5 and the end date in cellS6 of the current
worksheet.
Toobtaintheprecipitationrecordedoveraperiodatastation:
=SQL.REQUEST(DSN=mch,,4,Select SUM(value) from dePrecipitation where
station = & $P11 & and date >= & $S$5 & and date <= & $S$6 &
)
Toobtainthemaximumprecipitationrecordedoveraperiodatastation:
=SQL.REQUEST(DSN=mch,,4,Select MAX(value) from dePrecipitation where
station = & $P11 & and date >= & $S$5 & and date <= & $S$6 &
)
Toobtaintheminimumtemperaturerecordedoveraperiodatastation:
=SQL.REQUEST(DSN=mch,,4,Select MIN(value) from deAirTemp where station =
& $P11 & and date >= & $S$5 & and date <= & $S$6 & )
Toobtainthetotalvolumeofwaterremovedbydamoutletoveraperiod:
=SQL.REQUEST(DSN=mch,,4,Select SUM(value)* 0.0864 from dePrecipitation
where station = & $P11 & and date >= & $S$5 & and date <= &
$S$6 & )
Queries can be even more complex,butthis is not generally needed for fixedreports, only for any
analysesyou may wishtocarry out. Todothat,youwillneedto querynotjustasingledatumbuta
wholearrayofdata.
142/179
MCH User Manual
Toenteran arrayexpressioninExcel,selectazone,e.g.threecolumnsby50rows,thenpressF2to
go into edit mode, key in the desired expression for fetching data and then press ShiftCtrlEnter
rather than just Enter to finish entering the formula. After you enter the array expression, Excel
displays the expression between curly brackets {}.If the area of the arrayhasinsufficient space to
displayall theresults, Excel willshow only the initialpart oftheresults asfarasit caninthearray
ofExcelcellsdefinedinthequery.
Examplesofdatacalledbyan array (assumingthateach expression willbe given enoughrows and
columnstocontainalltheresults).
Toobtainthedailyprecipitationrecordedoveraperiodatastation:
=SQL.REQUEST(DSN=mch,,4,Select value from dePrecipitation where station =
& $P11 & and date >= & $S$5 & and date <= & $S$6 & )
Toobtainthecodesandnamesofstationsinastationgroup:
=SQL.REQUEST(DSN=mch,,4,Select t1.station, t1.stationname from stations as
t1, stngroup as t2 where t2.stngroup = & Z13 & and t1.station =
t2.station)
Toobtainthemeantemperaturesofeachstationinagroup,withstationcodesandnames,recorded
onagivendate:
=SQL.REQUEST(DSN=mch,,4,Select t1.station, t1.stationname, t2.value from
stations as t1, deAirTemp as t2, stngroup as t3 where t3.stngroup = & Z13 &
and t1.station = t3.station and t2.station = t3.station)
143/179
MCH User Manual
AnnexCPreparingamapinDXFtoloadintoMCHforpresentinginformation
inzonemaps
145/179
MCH User Manual
PreparingamapinDXFtoloadintoMCHforpresentinginformation
inzonemaps
To represent zone maps in MCH you have to place one or more polygons associated with a zone
name,andthiszonecanthenbelinkedtoastationgroup.Themapcanalsobelabelled.
Such maps canbe preparedinAutocadoranother computeraideddesign(CAD)tool. Thefinished
mapshouldbeexportedasaDXFfilecompatiblewithAutocad12orolder.Herewedescribehowto
prepareamapinAutocad(version10orlater),withinstructionsastowhichcommandstouse.Ina
graphicalenvironmentyoucanaccessthecommandsusingbuttonsintoolbars.
ItisfarpreferabletostartfromanexistingmapandthenworkonittoprepareitforMCH.
1. Create alayernamedthe sameas eachzone ofthe mapthatyou wanttoberepresentedin
MCH.Werecommendusingadifferentlinecolourtothosealreadyonthemap.
2. UsetheOSNAPcommandtosettheEndPointandIntersectionoptions.
3. Repeattheprocessforeachlayeronthemap.
a. Selectthelayerasthecurrentlayer.
b. Execute the PLINE (PL) command to draw a polyline around the perimeter of the
zone to be represented.If the zone has several unconnected sections (such as
islands),drawasmanypolylinesasneeded.Drawclosedpolygons.
4. Savethemap.Preferably,deleteanyitemsthatdonotneedtobeshowninMCH.
5. ExporttoDXF(ifusingAutocad13orlater,selectDXFlevelAcad12).
6. RunthecommandDXFaMCH.exeininteractivemode.
147/179
MCH User Manual
AnnexDToolsforexchangingMCHinformationwithothersystemsand
betweenMCHlocations
149/179
MCH User Manual
ToolsforexchanginginformationfromMCHwithother systemsand
betweenMCHlocations
There are several programs or functions, referred to hereas utilities, which are used toexchange
informationbetweenMCHandotherinformationsystems,including:
SendingdatabyFTPtoanotherMCHlocation(EnviarMCH.exe).
Automatically loading data received by FTP from another MCH location
(CargMCHFtpCtl.exe).
ManuallyloadingdatareceivedfromanotherMCHlocation(CargFtpMCH.exe).
Loading maps in DXF format to represent data on various map projections
(DXFaBinGeogr.exe).
DigitizingtapeswithDigitBan.exe.
Other data export functions can be performed directly within MCH in text and Excel spreadsheet
formats anywhere MCH data can be consulted. Graphs may also be exported in .bmp and .jpg
formats,whichcanthenbeusedasimagesinmanysoftwarepackages.
TheEnviarMCH.execommand
ForsendingfilesbyFTP,usingtheNcFTPput.execommandtoanotherMCHlocation.
Formatofthecommand:
TheCargMCHftpctl.execommand
It automatically loads files recently received by FTP into a set of directories defined in file
ftprecep.dbn, in which each line is the full pathname of each directory receiving data. It looks up
MCHtable ftpbitacprocif each ofthe files withextension .mchfoundineach directorydefinedin
ftprecep.dbnexistsalready,otherwiseitsendsitforloadingwithcommandCargFtpMCH.exe.
Formatofthecommand:
CargMCHFtpCtl
This command should normally be scheduled to run every 30 minutes during the time when
information is normally captured and transmitted, using the task scheduler, and there should also
beadesktopshortcutsothatitcanberunwheninformationisreceivedatothertimes.
ItalwaystakesDSNasequaltomch.
EnviarMCH option [fileout [startdate [enddate DSN]]]]
Where:
option is defined as a file-transfer option in the menu
Definitions / Transmissions / FTP transmission options
fileout is the prefix of the output file.
If not supplied, startdate defaults to the current date.
If not supplied, enddate defaults to the current date.
If not supplied, DSN defaults to mch
150/179
MCH User Manual
TheCargFtpMCH.execommand
Thisloads adatafilereceived by FTP, prepared atanotherMCHlocationusingthe EnviarMCH.exe
command.
ItalwaystakesDSNasequaltomch.
Formatofthecommand:
CargFtpMCHinputfile [R]
inputfile should be the full name with path and extension
of the file prepared by the SendMCH.exe program.
When present, the optional parameter R indicates that the
process works in overwrite mode.
TheCargaSynopMetarB.execommand
It loads SYNOPFM12, METAR / SPECI and SYNOPCREX messages and a special version of SYNOP
messageswhicharestillencodedinFM12format,withcommaseparatedvalues.
Thisroutinecanberunininteractivemodeorasabatchprocess.
Forinteractiveoperation,runtheroutineandselectthefilestobeloadedofeachtype,oneatatime.
IttakestheDSNfromthefilemch.dbn.
Formatofthecommandforbatchprocessing:
CargaSynopMetarB [S DirecSynopFM12] [M DirecMetar] [SC
DirecSynopCrex] [R nminutes]
-S DirecSynopFM12 name of directory where it looks for
files containing FM12 messages for loading into the MCH
database.
-M DirecMetar name of the directory where it looks for
files containing SYNOP and METAR messages for loading.
-S DirecSynopCrex name of directory where it looks for
files containing CREX messages for loading into the
database.
-R nminutes tells the program to stay resident in memory
and attempt to find more messages after n minutes.This is
useful when messages are to be received automatically or
when you want to place new messages in a directory and have
them load automatically.If there are none, it executes the
process and terminates.Alternatively, you can create a
scheduled task and invoke it without the R parameter.
Theformatsofthemessagefilestobeloadedareshownineachofthetabs.Ininteractivemode,the
extensions do not matter, but for batchprocessingtheextensions must be .txt for SYNOPFM12,
METAR/SPECIandSYNOPCREXmessagesand.lisforcommaseparatedSYNOPmessages.
151/179
MCH User Manual
In the case of SYNOPFM12 messages, which are not completely content, you need to supply the
year and month to which the messagesbelong.Forbatch processing, thelast six characters of the
filename before the extension must containthe year, month and day in the format YYMMDD.Only
theYYMMdatawillbetakenintoaccountforloading;thedayistakenfromeachmessage.
152/179
MCH User Manual
TheDXFaBinGeogr.execommand
Thisisrunininteractivemode.ItcreatesseveralmchtypefileswhichmaycomefromWDBworld
databankmapfilesormapfiles.Whentheyarespreadoverseveralmaps,thereistheoptiontoadd
totheexistingmaterial.
153/179
MCH User Manual
DigitizingtapeswithDigitBan.exe
Various types of tapes of rectangular and rectangularcircular formats can be digitized. In
rectangular tapes, the writing pen moves about a vertical axis and the movement over time is
controlledbyaclock.Inrectangularcirculartapes,thewritingpenrotatesonashaftsothatthepen
writesonasectorofacircumferenceandmovementovertimeiscontrolledbyaclock.
In any case, the values shown on the graphs must be of a linear type, i.e. the value is linearly
proportionaltoabasevalue.Fortapesnotsatisfying thesedigitizing criteriait canbedoneinparts
ortakingaccountofthesectionoftapethatdoessatisfythelinearitycriteria.
Sun measurement (heliophany) tapes are one of the two previoustypes, depending on the time of
year,buttheyhaveaspecialtreatmentforscalingandarehandledwithseparateoptions.
Tapedigitizationdataaresavedinthedetaileddatatables.Thedetailedtablescontaintwofieldsfor
thereportedvalues:valueandcorrvaluewherevalueisusedtostorethedatumasreported(in
thiscasethedigitizedvaluesubjecttoscaling)andcorrvalueorcorrectedvalueisthedatumafter
applying a calculation criterion or is a duplicate of value if no calculation is performed on the
datum. In the case of cumulative type tapes, the digitized datum is stored in value and the
difference between two consecutive measurements or a single directoneis stored in corrvalue,
dependingonthestatusofthepreviousdatum.
Therearethefollowingoptionsforrectangulartapes:
Rectangular.Thevalueontheverticalaxis(corrvalue)isthedigitizedone.
Cumulative rectangular. Thevalue on the vertical axis(corrvalue) is the absolute value of
thedifferencebetweentwoconsecutivemeasurements.
Nonnegative cumulative rectangular. The value in the vertical axis (corrvalue) is the
differencebetweentwoconsecutivemeasurementsandifnegativeissetto0.
Therearethefollowingoptionsforrectangularcirculartapes:
Rectangularcircular.Thevalueontheverticalaxis(corrvalue)isthedigitizedone.
Cumulative rectangularcircular. The value on the vertical axis (corrvalue) is the absolute
valueofthedifferencebetweentwoconsecutivemeasurements.
154/179
MCH User Manual
On rectangular and rectangularcircular tapes for sun measurement, the length of the horizontal
axis mustbe onlyhalf the tape widthand correspondstothevalue ofthesunintensity and timein
theverticaldirection.
Todigitizerectangulartypetapes:
1. Select the station group containing the station to be digitized from the Station group
combobox.
2. SelectthestationfromtheStationcombobox.
3. Selectthevariable ofthetape or section of tape tobe digitized from the Variable combo
box.
4. Selectthetape type from the Tapetypecombobox.(Precipitationisof theNonnegative
cumulativerectangulartype).Selectingthetapetypeshowstherelevanttabwherethedata
aretobesuppliedfromanddeterminesthescale.
5. ClickthebuttonImagetodigitizetoloadtheimagetobedigitized(seethenotebelowon
usingadigitizingtablet).Ifitisnota.bmptype,theprogramconvertsitdirectly(ithastobe
copiedintothesubdirectoryconvimageneswheretheDigitBand.exeprogramresides).
155/179
MCH User Manual
Scalingrectangulartapes
When using a digitizer tablet, select the tablet section (or the whole tablet area) as the
screenarea.Onthescreen,identifyvisuallythepositionassociatedwiththepartoftheimage,place
the tape on the tablet and continue as for an image, but yu do not have to load the image.As a
referenceinthiscase,youcanusetheDrawgridbuttontohelpreferencetheareaofthetapethat
isbeingdigitized.
Todigitizerectangularcirculartypetapes
1. Select the station group containing the station to be digitized from the Station group
combobox.
2. SelectthestationfromtheStationcombobox.
3. Selectthevariable ofthetape or section of tape tobe digitized from the Variable combo
box.
4. Select the tape type from the Tape type combo box.Selecting the tape type shows the
relevanttabwherethedataaretobesuppliedfromanddeterminesthescale.
5. Loadtheimage tobedigitizedby clickingtheImageto digitizebutton.Ifitisnot a .bmp
type, the program converts it directly (it has to be copied into the subdirectory
convimageneswheretheDigitBand.exeprogramresides.
157/179
MCH User Manual
Scheduledtasks
Thefollowingtasksmayneedtobescheduled:
EnviarMCH.exe. For capturing andsending to othersites. Thiscanbescheduled onservers
oruserscomputers. Scheduleittorun eachday after capture times.Alternatively,it canbe
run directly on the computer where the data are captured and then send the data once
captureiscomplete.
160/179
MCH User Manual
CargMCHftpCtl.exe. A program for automatically loading transmissions received by FTP.It
should be scheduled on the server receiving the transmissions (or on another computer
with access to the servers FTP reception directories).Schedule every 15 (10, 20 or 30)
minutesduringthetimeinwhichyouexpecttoreceivedatafromotherservers.
BorraPasoCgibin.bat. Deletes graphics files generated for dynamic queries in directory cgi
binmch on the web server. Schedule once a month (other frequencies are possible
dependingonthevolumesofqueries).
CargaSynopMetarB.exe.When SYNOPFM12, METAR / SPECI orSYNOPCREXmessages are
placedinparticulardirectoriesforloadingautomaticallyintothedatabase.
MchConsultas2lote.exe, MchGraficas2lote.exe, MchMapas2lote.exe. For generating static
webpagestobepublishedontheinternet webserverorotherconfigurationforanintranet
webpage.TheynormallyresideinthedirectorycgibinmchontheMCHwebserver.
161/179
MCH User Manual
AnnexECalculatingdailydatafromdetaileddata
Calculation procedures for generating daily data from data with a frequency of less than one day.
This is designed mainly for automatic stations, but includes some cases for conventional stations.
163/179
MCH User Manual
Calculatingdetaileddatafromdailydata
Calculationtypes
LAST.DamArea,CloudCover,Visibility,StorageVol,BattVoltage,PanelVoltage
MEANLAST.Overflow, RiverFlow, RelHumidity, Level, O2, O2mgl, Takeoff, pH,
BaromPressure, SolarRad, GustSpeed, WindSpeed, Salinity, WaterTemp, AirTemp,
IndoorTemp,Turbidity,Spillway
CUMULAT.Evaporation,Precipitation
FREQUENC.GustDirn,WindDirn
There are variables for which the cumulative value makes no sense and for those variables the
calculationtype ofdetailed todaily mustbeleftblankso that dailydatacannotbe generatedfrom
them.
i
t =starttimeatwhichdayisconsideredtostart.(8:00a.m.)
t
=timeintervalbetweentwoconsecutivemeasurements.
max
=maximumtimeintervalbetweentwoconsecutivemeasurementsinoneday.
f
=timeintervalbetweenlastmeasurementandendofday.
i
=timeintervalbetweenstartofdayandfirstmeasurement.
mf
=mostfrequenttimeintervalinmeasurementsforaday.
day
= timeintervalfor applying measurementsduringthe day.Regards the
t
applicableto thelast
measurementas
mf
mean
=meanintervalbetweenmeasurementsinaday.
V
d
=Valuefortheday.
V
max
=maximumvaluefortheday.
V
min
=Minimumvaluefortheday.
v=Correctedvalueofthevariableforthereportedmeasurement.
v
rep
=Reportedvalueofthevariable.
v
j
=Correctedvalueofadatumofthevariable.
v
f
=Lastvaluereportedofthevariableintheday.
v
prev
=Previouscorrectedvalueofthevariablebeforethestartoftheday.
v
next
=Nextcorrectedvalueofthevariableaftertheendoftheday.
Dat
prev
=Previousrecordofdataforthevariablebeforethestartoftheday.
Dat
next
=Nextrecordofdataforthevariableaftertheendoftheday.
t
alwaystakenbetweenthecurrentandnextmeasurements.
LAST
Takesthelastdatumandconsidersittobetheonefortheday.It maybeintablesoftypeDD(daily
data)orDX(dailydatawithextremevalues).
If
f
>6hrsthedatumforthedayisnotcalculated.
f d
V V =
CUMULAT
Cumulative typecalculation. It is considered that the reported data always providethe given
timeinterval(10minutes,1hour,3hours,1day).ThetablemustbeoftypeDD(dailydata).
Ifthereisonlyonedatum,itisreportedasthedatumfortheday.
Itdetermineswhetherthevariableisdecumulative.
) ( ) ( ) ( ) (
1 2 2 1 1 rep rep i f f repf rep
v v v AND v v AND v v AND v v = > <> <>
If it is decumulative, then the day value is the end value start value, with the following
criteria.
IfthereisDat
prev
andbetweentheenddatumandthepreviousdatumisbetween20and28hours
V
d
= v
f
v
prev
.If there are more than 20 hours between the end datum and the start datum,
1
v v V
f d
= .Otherwisethedatumforthedayisnotgenerated.
Itdetermines
max
,
mf
day
,nd1,nd2,nd3.nd1,nd2 andnd3andthenumberoftimestheyrepeat
i
determine
mf
.
day
iscalculatedastimeoffirstmeasurementtimeoflastmeasurement+
mf
.
Wecalculate
mean
=
day
nummeasurements
If
mean
>8hours,thedatumforthedayisnotcalculated.
Ifday=24hours,thedataareaccumulatedtocalculatethedatumfortheday.
=
=
f
j
j d
v V
1
If
day
>=18hours,thedataareaccumulatedtocalculatethedatumfortheday.
=
=
f
j
j d
v V
1
165/179
MCH User Manual
Otherwisethedatumforthedayisnotcalculated.
MEANLAST
Calculation type mean or last datum. The data may bein tables of type DD (daily data) or
DDX(dailydatawithextremevalues).
Ifthereisonlyonedatum,itisreportedasthedatumfortheday.
If
f
>6hrsthedatumforthedayisnotcalculated.
Itdeterminesthemaximumandminimumvalues.
Itdetermines
max
,
mf
day
,nd1,nd2,nd3.nd1,nd2 andnd3andthenumberoftimestheyrepeat
i
determine
mf
.
day
iscalculatedastimeoffirstmeasurementtimeoflastmeasurement+
mf
.
Wecalculate
mean
=
day
nummeasurements
If
mean
>8hours,thedatumforthedayisnotcalculated.Itisassumedthat
f
>6hours).
If
day
=24hours,theweighteddatumiscalculatedforeachapplicabletimeinterval.
V
d
=
v
j
j=1
f 1
j
+v
f
mf
day
If day>= 20 hours and max<= 6 hours, theydetermine thevalues corresponding to the startof the
dayandendoftheday,ifthepreviousdatumisupto3hoursbeforethestartofthedayorthenext
datum is up to 3 hours after the end of the day. These two values, if they exist, are added to the
calculations for the weighted mean andthe
prev
and
next
are takenasa weighting for eachdatum.
Thesetimeintervalsareaddedto
day
.
V
d
=
v
j
j=1
f 1
j
+v
f
mf
+v
icalc
icalc
+v
fcalc
fcalc
day
+
icalc
+
fcalc
Otherwisethedatumforthedayisnotcalculated.
FREQUENC
Typeofcalculationforfrequenciesofvalues.Itisappliedtowinds.Thedataaredividedinto16
compass ranges. Theresult values may be 0, 22.5, 45, 67.5, 90, 112.5,135, 157.5, 180, 202.5, 225,
247.5,270, 292.5, 315 and 337.5, corresponding to N, NNE, NE, ENE,E, ESE, SE, SSE, S, SSW, SW,
WSW,W,WNW,NWandNNW.
Foreachresultvalue,theoriginalvaluesmaybe:
166/179
MCH User Manual
Result value Original detailed value (x) frequency
0, N 348.75 <=x <=360 or 0 <=x <=
11.25
1
f
22.5, NNE 11.25 <x <=33.75
2
f
45, NE 33.75 <x <=56.25
3
f
67.5, ENE 56.25 <x <=78.75
4
f
90, E 78.75 <x <=101.25
5
f
112.5, ESE 101.25 <x <=123.75
6
f
135, SE 123.25 <x <=146.25
7
f
157.5, SSE 146.25 <x <=168.75
8
f
180, S 168.25 <x <=191.25
9
f
202, SSW 191.25 <x <=213.75
10
f
225, SW 213.25 <x <=236.25
11
f
247.5, WSW 236.25 <x <=258.75
12
f
270, W 258.25 <x <=281.25
13
f
292.5, WNW 281.25 <x <=303.75
14
f
315, NW 303.25 <x <=326.25
15
f
337.5, NNW 337.25 <x <=348.75
16
f
Ifthereisonlyonedatum,itisreportedasthedatumfortheday.
Dedeterminesthehigherfrequencyforeachpossiblerangeofvaluesandsethevaluecorresponding
totherangeistakenasthedatumfortheday.
f
max
= Max( f
1
,..., f
16
)
V
day
= v
intervalf max
Endofmanual