Coder Social home page Coder Social logo

Comments (2)

dnyates avatar dnyates commented on June 16, 2024

Thanks for looking into these issues James.. I see that these are on the
edge of the domain, where they have a higher streamorder, but coming into
the domain (usually have thought of these boundary issue links of flowing
out of the domain.. ).
I assume that these NaN's are for the "streamflow' variable?
y

On Tue, Oct 6, 2015 at 1:29 PM, James McCreight [email protected]
wrote:

This appears to be a domain issue with the front range Route_Link file.
There are 3 reaches with NaNs in the test case 4DAY/NHDPLUS run, for the
entire length of the run. These are NOT first order reaches, but there are
no points in the domain above them according to the Route_Link file. This
is likely the issue.

Here's the analysis in R showing their comIds and the issue with a plot at
the end.

path <- "/d6/jamesmcc/WRF_Hydro/FRNG_NHD/4DAY/NHDPLUS/run.pmoOpenLoop/frxst_pts_out.txt"
frxst <- ReadFrxstPts(path)
rlFile <- '/d6/jamesmcc/WRF_Hydro/FRNG_NHD/4DAY/NHDPLUS/DOMAIN/Route_Link_2.gagesAllLinks.nc'
rl <- as.data.frame(GetNcdfFile(rlFile, q=TRUE))
naLinkNames <- unique(frxst$st_id[which(is.na(frxst$q_cms))])
rlNa <- subset(rl, trimws(rl$gages) %in% trimws(naLinkNames))
naLinks <- rlNa$link
naLinks
[1] 2897845 2919687 2876787

Those are the comIds. Here's the rest of the associated information in
Route_Link.

rlNa
BtmWdth Qi So link from to lon lat alt type
10509 5 0.1 0.00797 2897845 0 2897865 -105.0422 40.93214 1821.80 0
10570 3 0.1 0.01391 2919687 0 2919697 -104.7983 40.92731 1738.39 0
12199 3 0.1 0.00256 2876787 0 2876807 -104.5269 40.93164 1641.92 0
order MusK MusX Length n ChSlp LkHZArea LkMxH WeirC WeirL OrificeC
10509 3 3600 0.2 552 0.035 0.05 -9999 -9999 -9999 -9999 -9999
10570 2 3600 0.2 92 0.035 0.05 -9999 -9999 -9999 -9999 -9999
12199 2 3600 0.2 156 0.035 0.05 -9999 -9999 -9999 -9999 -9999
OrificeA OrificeE time gages
10509 -9999 -9999 0 g2897845
10570 -9999 -9999 0 g2919687
12199 -9999 -9999 0 g2876787

and, lo, the likely problem:

which(rl$to %in% naLinks)
integer(0)

There are no upstream reaches though these are 2nd and 3rd order streams.

To generate the plot, a few more steps

library(rwrfhydro)
VisRl <- VisualizeRouteLink(rlFile)
visRlObj <- VisRl()
Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=39.758913,-105.096191&zoom=8&size=640x640&scale=2&maptype=terrain&language=en-EN&sensor=false
#names(visRlObj)
#str(visRlObj$rl)
#str(rl)
rlNa <- subset(visRlObj$rl, trimws(visRlObj$rl$gages) %in% trimws(naLinkNames))
visRlObj$ggObj+

  • ggplot2::geom_segment(data=rlNa,
  •                     ## a little fudge factor necess since these reaches have no "from"
    
  •                    ggplot2::aes(x=lon-.01, y=lat-.01, xend=to_lon, yend=to_lat),
    
  •                    color='cyan', size=9)
    

The cyan bits at the top of the screen are the three links with Na values.
[image: screen shot 2015-10-06 at 1 04 57 pm]
https://cloud.githubusercontent.com/assets/12465248/10319958/1a2c22fc-6c2e-11e5-86b0-26765bb0fd43.png


Reply to this email directly or view it on GitHub
#631.

David Yates
NCAR
303.497.8394 (o)
303.809.6604 (m)
skype: dnyates

from wrf_hydro_nwm_public.

jmccreight avatar jmccreight commented on June 16, 2024

Yes, they are qlink.


James L. McCreight
office: (303) 497-8404
cell: (831) 261-5149

On Tue, Oct 6, 2015 at 1:38 PM, dnyates [email protected] wrote:

Thanks for looking into these issues James.. I see that these are on the
edge of the domain, where they have a higher streamorder, but coming into
the domain (usually have thought of these boundary issue links of flowing
out of the domain.. ).
I assume that these NaN's are for the "streamflow' variable?
y

On Tue, Oct 6, 2015 at 1:29 PM, James McCreight [email protected]
wrote:

This appears to be a domain issue with the front range Route_Link file.
There are 3 reaches with NaNs in the test case 4DAY/NHDPLUS run, for the
entire length of the run. These are NOT first order reaches, but there
are
no points in the domain above them according to the Route_Link file. This
is likely the issue.

Here's the analysis in R showing their comIds and the issue with a plot
at
the end.

path <-
"/d6/jamesmcc/WRF_Hydro/FRNG_NHD/4DAY/NHDPLUS/run.pmoOpenLoop/frxst_pts_out.txt"
frxst <- ReadFrxstPts(path)
rlFile <- '/d6/jamesmcc/WRF_Hydro/FRNG_NHD/4DAY/NHDPLUS/DOMAIN/
Route_Link_2.gagesAllLinks.nc'
rl <- as.data.frame(GetNcdfFile(rlFile, q=TRUE))
naLinkNames <- unique(frxst$st_id[which(is.na(frxst$q_cms))])
rlNa <- subset(rl, trimws(rl$gages) %in% trimws(naLinkNames))
naLinks <- rlNa$link
naLinks
[1] 2897845 2919687 2876787

Those are the comIds. Here's the rest of the associated information in
Route_Link.

rlNa
BtmWdth Qi So link from to lon lat alt type
10509 5 0.1 0.00797 2897845 0 2897865 -105.0422 40.93214 1821.80 0
10570 3 0.1 0.01391 2919687 0 2919697 -104.7983 40.92731 1738.39 0
12199 3 0.1 0.00256 2876787 0 2876807 -104.5269 40.93164 1641.92 0
order MusK MusX Length n ChSlp LkHZArea LkMxH WeirC WeirL OrificeC
10509 3 3600 0.2 552 0.035 0.05 -9999 -9999 -9999 -9999 -9999
10570 2 3600 0.2 92 0.035 0.05 -9999 -9999 -9999 -9999 -9999
12199 2 3600 0.2 156 0.035 0.05 -9999 -9999 -9999 -9999 -9999
OrificeA OrificeE time gages
10509 -9999 -9999 0 g2897845
10570 -9999 -9999 0 g2919687
12199 -9999 -9999 0 g2876787

and, lo, the likely problem:

which(rl$to %in% naLinks)
integer(0)

There are no upstream reaches though these are 2nd and 3rd order streams.

To generate the plot, a few more steps

library(rwrfhydro)
VisRl <- VisualizeRouteLink(rlFile)
visRlObj <- VisRl()
Map from URL :
http://maps.googleapis.com/maps/api/staticmap?center=39.758913,-105.096191&zoom=8&size=640x640&scale=2&maptype=terrain&language=en-EN&sensor=false
#names(visRlObj)
#str(visRlObj$rl)
#str(rl)
rlNa <- subset(visRlObj$rl, trimws(visRlObj$rl$gages) %in%
trimws(naLinkNames))
visRlObj$ggObj+

  • ggplot2::geom_segment(data=rlNa,
  • a little fudge factor necess since these reaches have no "from"

  • ggplot2::aes(x=lon-.01, y=lat-.01, xend=to_lon, yend=to_lat),
  • color='cyan', size=9)

The cyan bits at the top of the screen are the three links with Na
values.
[image: screen shot 2015-10-06 at 1 04 57 pm]
<
https://cloud.githubusercontent.com/assets/12465248/10319958/1a2c22fc-6c2e-11e5-86b0-26765bb0fd43.png


Reply to this email directly or view it on GitHub
#631.

David Yates
NCAR
303.497.8394 (o)
303.809.6604 (m)
skype: dnyates


Reply to this email directly or view it on GitHub
#631
.

from wrf_hydro_nwm_public.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.