variables

27 views
Skip to first unread message

Randy Carver

unread,
Dec 3, 2011, 3:47:51 PM12/3/11
to cuahsi-wds-us...@googlegroups.com
Hello!   

Just a quick question, this one is a bit more technical in nature.    When creating a variable if the isRegular flag is NOT set (false- this ones an irregular grab sample), what meaning does the TimeSupport and TimeUnitsID have?   I realize they must be non-null, but if I set it to the default of 0 and 0 (from the db scripts) will this negatively affect cuahsi consumers of my webservice?

Thanks in advance!

David Valentine

unread,
Dec 3, 2011, 6:16:47 PM12/3/11
to cuahsi-wds-us...@googlegroups.com
See page 17 of the ODM manual:
"Time support may be specified as 0 if the
measurements are instantaneous, or given a value that represents the time averaging
inherent in the measurement method or device."

Time Support is the period the sampled is over, since this is a grab sample, it is instantaneous, aka 0.
TimeUnitsId is irrelevant, but needs to be set.
This should not effect clients.
-- 
David Valentine
Spatial Information Systems Laboratory
San Diego Supercomputer Center
University of California San Diego
9500 Gilman Dr., La Jolla, CA 92093-0505

858-822-0923
vale...@sdsc.edu

Randy Carver

unread,
Dec 4, 2011, 6:34:00 PM12/4/11
to cuahsi-wds-us...@googlegroups.com
Its been a while since I read through the Design Spec, thank you for the reminder, and the very quick response!

Just in case someone refers to this thread without checking to the Design Spec:  Although I don't agree with it (personally I think the TimeUnitsID should be nullable when isRegular is false, as a consumer of the DB must infer the rules when its not nullable), the best practice (pg 55 #8) is to use ID of 103 (hours) when setting TimeSupport to 0.  

David Tarboton

unread,
Dec 13, 2011, 12:44:05 AM12/13/11
to cuahsi-wds-us...@googlegroups.com
Randy,

Let me just chime in here briefly with a bit of the thinking behind the design spec.  We see TimeSupport as an attribute of a measurement regardless of whether it is regular or irregular.  It quantifies the averaging interval that is inherently implicit in any measurement related to the response time of the instrument involved or collection interval of a sampled quantity.  This is different from the spacing between measurements which is what isRegular refers to.  Figure 6 on page 15 of the design spec illustrates this.  Since we made TimeSupport mandatory the Units involved are mandatory too so a TimeUnitsID should be given.  Now strictly you can say that when the value is 0, the units do not matter.  The same could be said for many other quantities, but units are still generally required and mandatory in ODM.

Dave

Randy Carver

unread,
Dec 13, 2011, 8:36:03 AM12/13/11
to cuahsi-wds-us...@googlegroups.com
Thank you for the clarification, and I think I understand what you are stating, but I am slightly confused with how it relates to the spec.   I think it might be helpful to state that my background is that of a Software Engineer.   While I am married to a Hydro-geologist, this has only provided me with a familiarity with water science, not a disciplined knowledge.   If I am misusing terms, please be patient with me :)

 Pg 15 of the 1.1 odm design specification states:
Extent is the full range over which the measurements occur, spacing is the spacing between measurements, and support is the averaging interval or footprint implicit in any measurement. In ODM, extent and spacing are properties of multiple measurements and are defined by the LocalDateTime or DateTimeUTC associated with data values. We have included a field called TimeSupport in the Variables table to explicitly quantify support. Figure 7 shows some of the implications associated with support, spacing, and extent in the interpretation of time series data values.
In the case of the measurement in question (I believe it is a lake secchi measurement program) the support interval in question is insignificant as it is a sporadic instantaneous values (odm design spec p55 #8).  So as we've been discussing, having a TimeUnitsID for Support could be misleading to a consumer of our data.

However, if we set the TimeUnitsID to 0, what about the issues of breaking referential integrity?   Since Units is a CV table and there is no Unit with a UnitID of 0, that has the potential to break any queries that depend on the 1..1 relationship from Variables to Units (see below for an example).   Since its significant to have the time support set even if its 'instantaneous', then shouldn't there be a corresponding entry (perhaps "Not Applicable"?) in the Units CV to reflect this so that we can maintain referential integrity and not imply that there is a interval associated with support?  

Here's an example of a typical inside join query that will run, but not return the entire expected set (as defined by the ODM ERD) of Variables if UnitID does not exist in the Unit table:
    SELECT distinct V.VariableID,
            V.VariableCode,
            V.VariableName,
            V.VariableUnitsID,
            VU.UnitsName as VariableUnitsName,
            V.SampleMedium,
            V.ValueType,
            V.IsRegular,
            V.TimeSupport,
            V.TimeUnitsID,
            TU.UnitsName as TimeUnitsName,
            V.DataType,
            V.GeneralCategory,
            V.NoDataValue
    FROM variables as V, units as VU, units as TU
    WHERE VU.UnitsID=V.VariableUnitsID and TU.UnitsID=V.TimeUnitsID;
To maintain integrity and the queries on our data, for now I will continue to use the best practices recommended TimeUnitsID of 103, hours and a TimeSupport value of 0.


On 12/12/2011 10:44 PM, David Tarboton wrote:
Randy,

Let me just chime in here briefly with a bit of the thinking behind the design spec.  We see TimeSupport as an attribute of a measurement regardless of whether it is regular or irregular.  It quantifies the averaging interval that is inherently implicit in any measurement related to the response time of the instrument involved or collection interval of a sampled quantity.  This is different from the spacing between measurements which is what isRegular refers to.  Figure 6 on page 15 of the design spec illustrates this.  Since we made TimeSupport mandatory the Units involved are mandatory too so a TimeUnitsID should be given.  Now strictly you can say that when the value is 0, the units do not matter.  The same could be said for many other quantities, but units are still generally required and mandatory in ODM.

Dave
<snip - removing previous comments for brevity, see online support for full thread

David Tarboton

unread,
Dec 13, 2011, 10:01:46 AM12/13/11
to Randy Carver, cuahsi-wds-us...@googlegroups.com
Randy,

I understand the referential integrity requirements for an ID to have to be pointing to something.  In the case that TimeSupport value is 0, it really does not matter too much what that something is, as long as it is something, but for consistency we suggested a best practice that the unitsID point to hours.  The position we took when we were designing ODM is that the words that state that the support value is insignificant or that the measurement is instantaneous get represented quantitatively by a numeric value for the TimeSupport of 0.  However since in general TimeSupport is a dimensioned quantity this needs to be given as 0 days, or 0 hours, or 0 minutes etc.  The TimeSupport quantity is incomplete without units for its value being given and unitsID should point to these units. 

Dave

Kim Schreuders

unread,
Dec 13, 2011, 1:15:57 PM12/13/11
to cuahsi-wds-us...@googlegroups.com, Randy Carver

Randy,

 

You stated “In the case of the measurement in question (I believe it is a lake secchi measurement program) the support interval in question is insignificant as it is a sporadic instantaneous values (odm design spec p55 #8).  So as we've been discussing, having a TimeUnitsID for Support could be misleading to a consumer of our data.”

 

I would ask: What do you mean by “instantaneous?”  Measurements are not truly instantaneous; they take some time to register, and it is that time we are asking for the duration of.  It may be only 1/1000 of a second, or many measurement devices actually take several measurements over a very short duration, and average them or otherwise calculate a resulting value.  You may not even realize how your measurement equipment is actually registering the value.  You may need to examine the documentation of your measurement device to be able to answer this question.  This is the information that the TimeSupport and TimeUnitsID fields are trying to capture.  If this is a manual visual id of the disk, how long is an attempt made to id the disk, 1/10 of a second, 1 second, 10 seconds?  Your protocol should indicate this and that information should be captured in ODM.

Kim Schreuders

Kim Schreuders

unread,
Dec 13, 2011, 1:35:52 PM12/13/11
to cuahsi-wds-us...@googlegroups.com, Randy Carver

Randy,

 

You indicated “However, if we set the TimeUnitsID to 0

 

We never suggested that you set the TimeUnitsID to 0.  That would break referential integrity.  We only suggested that if you feel the best representation of the time support is truly a value of 0, then use 0 for the value of TimeSupport, and use one of the time units, such as 103 (hour), for the TimeUnitsID.

 

But I would also question whether a measurement is truly instantaneous and deserving of a TimeSupport of 0.  Very few measurements are truly instantaneous.

 

Kim

 

From: cuahsi-wds-us...@googlegroups.com [mailto:cuahsi-wds-us...@googlegroups.com] On Behalf Of David Tarboton
Sent: Tuesday, December 13, 2011 8:02 AM
To: Randy Carver
Cc: cuahsi-wds-us...@googlegroups.com
Subject: Re: variables

 

Randy,

Shahidul Islam

unread,
May 23, 2012, 6:37:45 PM5/23/12
to cuahsi-wds-us...@googlegroups.com, Randy Carver

Hi,

 

I am trying to set-up the water oneflow  web services and able to complete all the steps in tutorial except  configuring the web service. when I navigate to "http://localhost/MyDataservice", it takes me to the webpage " CUAHSI web services for observations databases help pages". However, when I click on " Configuration (restricted by password)", it asks for the user name and password.  when I provide the user name and password (i.e., webclient, webclient),i receive an error message " you are not Authorized to view this page.". Can  anybody help me to fix this error?

 

Thanks for the help.

 

Regards

Shahidul

 

 


image002.gif

Jeff Horsburgh

unread,
May 24, 2012, 12:27:30 AM5/24/12
to cuahsi-wds-us...@googlegroups.com, Randy Carver, his-in...@sdsc.edu

Hello Shahidul,

 

Can you let us know when you downloaded the web service deployment, and where you got it from (e.g., the CUAHSI HIS website or the HydroServer CodePlex website)?  That would help us track down this issue.

 

Thanks!

 

--------------------------------------------------------------

Jeffery S. Horsburgh

Utah Water Research Laboratory

Utah State University

8200 Old Main Hill

Logan, UT 84322-8200

Phone: (435) 797-2946  Fax: (435) 797-3663

jeff.ho...@usu.edu   http://jeffh.usu.edu

---------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages