Coder Social home page Coder Social logo

RVIC ignoring fraction about rvic HOT 9 OPEN

ghuidobro avatar ghuidobro commented on August 20, 2024
RVIC ignoring fraction

from rvic.

Comments (9)

jhamman avatar jhamman commented on August 20, 2024

Are you using the remap option in RVIC's parameter module?

from rvic.

ghuidobro avatar ghuidobro commented on August 20, 2024

from rvic.

jhamman avatar jhamman commented on August 20, 2024

Hmmm, I'm not sure why your setup isn't working as you would expect. I suggest looking at the diagnostic plots that RVIC generates during the parameters step and evaluating whether those make sense.

from rvic.

ghuidobro avatar ghuidobro commented on August 20, 2024

Thanks for making me look in the parameters step (I was looking in the convolution before), the plots had in fact some problems and the solution was a very small thing.

In the parameter configuration file I had the option "CONSTRAIN_FRACTIONS: False", because it said "# True when routing to coastal grid cells, else False" and I don't have coastal cells inside my basin (I thought that that's what it meant, maybe my english failed). But I set it to True and now the fraction created during the parameters step is the same as the one in the domain, and the streamflows generated in the convolution step are the right ones.

I thought that I've changed everything to see if something worked, but I must have missed that one.

from rvic.

jhamman avatar jhamman commented on August 20, 2024

Thanks for sticking with this @ghuidobro. I think it generally makes sense to use CONSTRAIN_FRACTIONS=TRUE as a default value. Would you be willing to update the documentation to this effect?

from rvic.

ghuidobro avatar ghuidobro commented on August 20, 2024

I'm not entirely sure of how to do that.
The change must be done here?:
https://github.com/UW-Hydro/RVIC/blob/master/docs/user-guide/parameters.md

You want me to delete "Note: True when routing to coastal grid cells, else False."?
Or change it to something like "Default: True"
I guess that that note must be there for some reason.

from rvic.

jhamman avatar jhamman commented on August 20, 2024

All my use cases have required constraining the fractions and I'm not aware of any specific applications that need the converse. So, yes, your proposed edits seem reasonable. It would be worth checking in the code to make sure there isn't a default=True value somewhere.

from rvic.

ghuidobro avatar ghuidobro commented on August 20, 2024

Ok, I've never done this so I hope it's ok.
I made a pull request, do you have to merge it?
#115
And I didn't get the last thing you said, what you wanted to be checked

from rvic.

kwhitney727 avatar kwhitney727 commented on August 20, 2024

@jhamman I have a related question/issue. I am also finding that the domain-wide sum of grid-cell runoff and baseflow volumes (volume computed as flux multiplied by grid-cell area and grid-cell fraction from the domain file) is less than the total streamflow produced at the main outlet (by about 10% in any given year). In my case, I am routing using nested basins and so I cannot use the "constrain_fractions" option (the documentation states that this variable "should be set to True unless routing is being done to nested basins, in which case, this should be set to False."). When I compute the domain-wide sum of runoff and baseflow volume without accounting for the grid-cell fraction (i.e., volume = flux * grid-cell area), the value is roughly equal to the domain-wide streamflow. So I believe the issue is that the source area fractions are not adjusted to account for the domain fraction values of the grid-cells along the edge of the basin (these cells have contributing cell fractions less than 1).

I've compared the diagnostic plots for the various fractions computed in RVIC (domain fractions, aggregated fractions, adjusted fractions, ratio fractions). It does see that "adjusted fractions" are the same as "aggregated fractions", not accounting for the basin boundary cells of fractions less than one (which can be seen in the "domain fractions" plot). Is there a way to adjust the fractions (e.g., set "constrain_fractions" to "True") to account for the domain fractions when using nested basins? I have attached my configuration (file prefix "cfg."), log (file prefix "log.") and diagnostic plot (file suffix ".png") files in case that helps. I appreciate any help you can provide, thank you!
cfg.rvic.convolution.txt
cfg.rvic.parameters.txt
log.rvic.convolution.txt
log.rvic.parameters.txt
adjusted_fractions_crb
uhs_before_subset_crb
domain_fractions_crb
ratio_fractions_crb
sum_uh_before_crb
sum_uh_final_crb
uhs_after_subset_crb
aggregated_fractions_crb

from rvic.

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.