You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

API import to import meteo/hydro data from https://hydrology.gov.np/gss/api/socket/nve_snow/response, Nepal.


The response gives station data from all (only 8) stations, for the last 3 days. It is not possible to filter on stations and/or dates. For now the solution would therefore be: download all data, and select the data from the response that needs to be imported (based on given station, variable dates/times) .  The API key is for testing and should be configured in the FEWS xml configuration.


<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 rel. 3 sp1 (http://www.altova.com) by Computer Services (WL | Delft Hydraulics) -->
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
    <import>
       <general>
          <importType>DHM</importType>
          <serverUrl>https://hydrology.gov.np/gss/api/socket/nve_snow/response</serverUrl>
          <user>user</user>
          <password>api-key</password>
          <relativeViewPeriod unit="day" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
          <idMapId>DHMIdMap</idMapId>
       </general>    
       <timeSeriesSet>
          <moduleInstanceId>DHM</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>parameter</parameterId>
          <locationId>LocA</locationId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="nonequidistant"/>
          <readWriteMode>add originals</readWriteMode>
       </timeSeriesSet>      
       </timeSeriesSet>
    </import>


Available parameter codes are:


parameter_code

parameter description

PCPN_1HAccumulated Precipitation for last 1 h
PCPN_1DAccumulated Precipitation for last 24 h
T_1HAir Temperature 1 Hour Average
TX_1HAir Temperature 1 Hour Maximum
TN_1HAir Temperature 1 Hour Minimum
ALB_1HAlbedo 1 h avg
TD_1HDew Point Temperature 1 hour Average
DLR_1HDownwelling LWR 1 h avg
DSR_1HDownwelling SWR 1 h avg
QFE_I_10MPressure Inst
RH_I_1HRelative Humidity 1 h Inst
SND_1HSnow Depth 1 Hour average
ST_00_10MSoil Temperature at 0 cm, 10 min average
ULR_1HUpwelling LWR 1 h avg
WL_I_10MWater Level Inst

  • No labels