<% '============= Create and Open Database Connection ============= 'OPEN THE DATABASE If blnConnectToDB Then dim blnDBconnectionDown blnDBconnectionDown = false Err.Clear on error resume next set dbConn = Server.CreateObject("ADODB.Connection") 'Open the Connnection 'dbConn.Open Application("dbConn_ConnectionString") dbConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" ''New Error trapping. KC added 2/23/2012 If Err.Number <> 0 Then ''Response.Write (Err.Description& "

") dbConn.Close Set dbConn = nothing blnDBconnectionDown = true End If On Error GoTo 0 ''error trapping not working here KC removed 2/23/2012 ''tmpDBErrorNativeError = 0 '' For Each dbErr In dbConn.Errors '' strErrMsg = strErrMsg & _ '' "Source: " & dbErr.Source & vbCrLF & _ '' "Description: " & dbErr.Description & vbCrLF & _ '' "SQL State: " & dbErr.SQLState & vbCrLF & _ '' "NativeError: " & dbErr.NativeError & vbCrLF & _ '' "Number: " & dbErr.Number & vbCrLF & vbCrLF '' tmpDBErrorNativeError = dbErr.NativeError '' Next '' If (dbConn.Errors.Count > 0) AND (tmpDBErrorNativeError <> 5703) Then '' dbConn.Close '' Set dbConn = nothing '' blnDBconnectionDown = true '' Response.write(strErrMsg) '' Response.end '' End If dim arrErrors() Redim arrErrors(2,0) End If '============================================================== Public Function GetRS2(myCommand) On Error GoTo 0 'objConn: local connection object 'objRS: local recordset object 'objComm: command object passed in to the function Dim objConn, objRS, blnErrorLogged, objComm 'Create the command object Set objComm = Server.CreateObject("ADODB.Command") Set objComm = myCommand 'Create the connection object Set objConn = Server.CreateObject("ADODB.Connection") 'Open the connection object objConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" 'Set the active connection objComm.ActiveConnection = objConn 'Create the recordset object Set objRS = Server.CreateObject("ADODB.Recordset") 'Set the cursor location for disconnected recordsets 'objRS.CursorLocation = adUseClient 'Turn on error handling for just a second ' On Error Resume Next 'Open the recordset 'objRS.Open SQL, objConn, adOpenStatic, adLockOptimistic Set objRS = objComm.Execute 'Response.Write "State = " & objRS.State & "
" 'objRS.MoveLast 'objRS.MoveFirst 'Response.Write "Count = " & objRS.RecordCount & "
" 'Response.End 'Check for an error ' If Err.Number <> 0 Then ' Response.Write "Database Error Occured

" ' Response.Write "Error #" & Err.Number & "
" ' Response.Write Err.Description & "

" ' Response.Write "SQL:
" ' Response.Write SQL ' Response.End ' End If 'Turn off error handling ' On Error GoTo 0 'Disconnect the recordset 'Set objComm.ActiveConnection = Nothing 'Close the connection 'objConn.Close 'Set the connection to Nothing 'Set objConn = Nothing 'Set the Command to Nothing 'Set objComm = Nothing 'Return the recordset Set GetRS2 = objRS On Error Resume Next End Function '=============================================================== Function GetRS(sSQL) 'Declarations dim rs 'Create Recordset Object set rs = Server.CreateObject("ADODB.Recordset") If blnConnectToDB Then 'Open Recordset based on SQL rs.Open sSQL, dbConn, 1, 3, 1 End If 'Return Recordset set GetRs = rs End Function '=============================================================== Function ExecSQL(sSQL) 'Open the Command Object dim lRecordsAffected dbConn.Execute sSQL, lRecordsAffected 'Return the Records Affected ExecSQL = lRecordsAffected End Function '======================================================================== Function sendEmail(strFrom,strTo,strSubject,strMessage) Dim sch ' Schema sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "sendusing") = 2 .Item(sch & "smtpserver") = "mxrelay.doe.gov" .update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = strFrom .To = strTo .Subject = strSubject .TextBody = strMessage .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing End Function Function removeBadChars(tmpString) tmpString = Replace(tmpString , "<", "") tmpString = Replace(tmpString , ">", "") tmpString = Replace(tmpString , "'", "") tmpString = Replace(tmpString , """", "") tmpString = Replace(tmpString , ";", "") tmpString = Replace(tmpString , "(", "") tmpString = Replace(tmpString , ")", "") removeBadChars = tmpString End Function %> <% 'If there is a mobile version of this site, check the user_agent, and forward to 'the mobile version of the site (unless cookie or querystring var is set) if "true" = "true" then tmpSeeFullPage = Mid(Request.Querystring("m"),1,1) if ((isMobile) and (tmpSeeFullPage <> "1")) then tmpMobileURL = Request.servervariables("HTTP_URL") tmpMobileFileName = mid(tmpMobileURL, InStrRev(tmpMobileURL, "/")+1) tmpMobileURL = Left(tmpMobileURL, InStrRev(tmpMobileURL, "/")) tmpMobileURL = tmpMobileURL & "m/" & tmpMobileFileName Response.Clear Response.Redirect(tmpMobileURL) end if end if %>

<% ''This code is strictly when a user clicks on a left nav and needs to be forwarded to another site/program/office if ("" <> "") then Response.Clear Response.Redirect ("") end if %>

Hydropower and Ocean Energy Resources and Technologies

Photo of water flowing from several openings in a hydropower dam.

Hydropower produces 10% of the nation's energy, including power from the Ice Harbor Dam in Burbank, Washington.

Photo of pipes floating on the Pacific Ocean with a barge floating alongside. Several people are photographed standing on the barge.

The Ocean Thermal Energy Conversion project at Hawaii's Natural Energy Lab was one of the first successful thermal ocean energy projects.

This page provides a brief overview of hydropower and ocean energy resources and technologies supplemented by specific information to apply these technologies within the Federal sector.


Hydropower has been used for centuries to power machinery, but the application most commonly associated with hydropower is electricity production through dams.

Ocean energy refers to various forms of renewable energy harnessed from the ocean. There are two primary types of ocean energy: mechanical and thermal.

  • Mechanical energy is derived from the earth's rotation. The rotation creates wind on the ocean surface that forms waves, while the gravitational pull of the moon creates coastal tides and currents. This motion allows energy to be captured and converted to electric power.

  • Thermal energy is derived from the sun, which heats the surface of the ocean while the depths remain colder. This temperature difference allows energy to be captured and converted to electric power.

Visit the Department of Energy's (DOE) Wind Program to learn more on hydropower and ocean energy basics and technologies.

Federal Application

Specific factors must be in place for hydropower and ocean energy technologies to be viable for Federal application. Before conducting an assessment or deploying technologies, Federal agencies must evaluate a series of questions and considerations.

What resources are available in my area?

Location and existing resources are critical for hydropower and ocean energy technology deployments.

  • Hydropower technologies are deployed across the U.S. by the Federal Government. Applying hydropower is typically not cost-effective unless the site has ready access to an existing hydroelectric dam. However, it is important for Federal energy managers to be knowledgeable about hydropower as it is a common form of renewable energy credits.

  • Ocean energy technologies depend on close proximity to ocean tides, currents, or deep waters with large temperature differences between depths. Large river currents can also be leveraged. This narrows the applicability of ocean energy technologies, but still leaves room for cost-effective deployments for coastal sites.

Before initiating a project, resources in your area must be measured and verified. It is important to consult an expert for a professional evaluation before implementing energy projects.

What are my energy goals?

Energy goals range from meeting regulatory requirements to powering remote applications to increasing energy security.

  • Regulatory Requirements: All ocean and hydrokinetic energy falls under the Energy Policy Act (EPAct) of 2005 definition of renewable energy and can be used to meet EPAct 2005 renewable energy requirements. The EPAct 2005 definition also includes new hydroelectric generation capacity achieved from increased efficiency or additions of new capacity at an existing hydroelectric project. Mechanical or thermal energy produced by these resources can be used to meet other Federal regulatory requirements. For example, if the system was put into service after January 1, 1999, it can be used to meet Executive Order 13423 requirements for new renewable energy.

  • Remote Power: Large-scale hydropower is not cost-effective or applicable for remote applications. Ocean energy technologies can be cost-effective for powering large facilities or campuses on remote islands and applications, but multiple factors must be in place.

  • Energy Security: Water is a natural energy resource that can provide consistent, around-the-clock energy production. Because of this, ocean energy and hydropower increases energy availability and security.

What kind of energy do I use?

Federal agencies must understand what type of energy is used before determining if hydropower or ocean energy is applicable. Ocean energy, for example, can be used for electricity, mechanical, and thermal power. The appropriate type of energy needed must be considered before undergoing any energy assessments or technology projects.

When do I need the energy?

Tidal and marine currents are quite predictable and can be used to generate power where and when it is demanded with increasing accuracy.

Is ocean energy cost-effective for my facility?

Ocean energy and hydropower technologies produce electricity ranging from the kilowatt-hour (kWh) range to multiple megawatt-hours (MWh). If resources are available and all other factors match up, Federal agencies should consider these technologies for applications between these size ranges. Technology deployments for energy production at smaller amounts typically are not cost-effective.

What is my budget?

Ocean energy systems vary in price, as does the cost of installation, operation, and maintenance. The following factors play a role in the cost of ocean energy technologies:

  • Cost of the technology system itself
  • Permitting time and related costs
  • Construction costs
  • Metering equipment
  • Maintenance and repair

It is important to consult an expert for a professional evaluation to see if ocean energy fits into your current budget.

Next steps

Visit the project planning section for detailed information on planning and deploying renewable energy projects. Federal case studies are available to provide specific examples of viable energy projects.


Detailed information on hydropower and ocean energy resources and technologies is available through: