Git Product home page Git Product logo

p8modules's People

Contributors

christianurich avatar leznik avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p8modules's Issues

Graphs for different realisations (or music files)

The Treat Performance and EB are not plotting correctly, the orders are confusing ( they are adding the results in a different order)

While Treat Perf
E,16.0,67.0,53.0,30.0 (4th MUSIC file)
E,16.0,66.0,52.0,30.0 (3rd MUSIC file)
E,19.0,72.0,57.0,36.0 (2nd MUSIC file)
E,35.0,90.0,75.0,57.0 (1st MUSIC file)

treatmentperformanceplot

The EB

1,-82.2,64.8,8.9,73.9 (1st MUSIC file)
1,-83.5,64.7,57.5,73.4 (2nd MUSIC file)
1,-83.5,64.7,57.5,73.3 (3rd MUSIC file)

eviromentalbenefitsplot

Reading Perf_TTE.txt

the new MUSIC version we are using generates the following Perf_TTE.txt

"",Sources,Residual Load,% Reduction
Flow (ML/yr),0.403,0.262,35.1
Total Suspended Solids (kg/yr),609,3.56,99.4
Total Phosphorus (kg/yr),0.641,41.6E-3,93.5
Total Nitrogen (kg/yr),2.70,0.335,87.6
Gross Pollutants (kg/yr),14.5,0.00,100.0

The old version generated 1 extra line:
,Sources,Residual Load,% Reduction
Flow (ML/yr),0.403,0.262,35.1
PEAK FLOW BLA BLA BLA
Total Suspended Solids (kg/yr),609,3.56,99.4
Total Phosphorus (kg/yr),0.641,41.6E-3,93.5
Total Nitrogen (kg/yr),2.70,0.335,87.6
Gross Pollutants (kg/yr),14.5,0.00,100.0

So, the code has to be adjusted to NOT SKIP any line.

Model has to read any MUSIC file

As we are now decoupling the modules from UrbanBEATS. We need a module that reads MUSIC msf files. I suggested something as the current realisation, but instead of typing the number we load a msf file.

Issue 1

Just learning how to use this...

ReadTableSecondary3 - few comments

  • the source nodes (houses) are also linked to the ET Fluxes node and we select evapotranspiration.
  • can we save a secondary msf file, so we keep the original (same as we were doing before with UranBEATS)
  • the generated msf file is running perfectly with MUSIC!
  • now that this file works, we only need to add one type of node "Node Type,RainWaterTankNode,{Node Type}" and create a secondary link from this to the ETfluxes node and select the "Reuse" option (i sent msf example via email)
  • also can we change the name of the ETfluxes node for "Reuse and ET fluxes"

Generating MUSIC files with different modules

Ideally, we should not modify the original msf file imported by the user; so maybe we can save a new one in each step:

when we replace with the rainfall, NewRain added to the file name.
The same way, for the other modules (I saw that you did for SEI adding the word Secondary, but secondary is for the EB):

Rainfall >> NewRain
Treatment Performance >> TP (this is equal to the one imported by the user but uploaded rain, if any)
Environmental Benefit >> Secondary (also with uploaded rain, if any)
SEI - SEI

and also use these for the batch and mcf file

StreamErosionIndex (SEI)

StreamErosionIndex should use the msf file uploaded in the ImportMSF module and have the option of user uploading a new or selecting an existing rain.csv file (same format that we have been using), and ask user to define the parameters N (number of years- default 10) and alpha (default 0.4), then generate another msf file with the extra nodes; then run MUSIC and do the remaining calculations and somehow display the values for SEI. In addition it should connect to Analyser and the analyser will present the the loglog graph (well go through the graph after the module is working).

Rainfall module only reads csv file properly if the csv is exactly the one generated with the netcdf file .

Rainfall module only reads csv file properly if the csv is exactly the one generated with the netcdf file. If I only delete rows to have a shorter time series in the one generated with the netcdf file, I get the following:

STANDARD Thu 18. Jul 14:09:58 2013| Start RainModule {f58c9361-07b0-4cf4-9d73-4d4122809ef1} Counter 0
ERROR Thu 18. Jul 14:09:58 2013| Traceback (most recent call last):
ERROR Thu 18. Jul 14:09:58 2013| File "C:/P8_Github/P8Modules/scripts\P8Modules\rain2.py", line 47, in run
ERROR Thu 18. Jul 14:09:58 2013| self.changeMusicFile(realstring,self.csvFile)
ERROR Thu 18. Jul 14:09:58 2013| File "C:/P8_Github/P8Modules/scripts\P8Modules\rain2.py", line 148, in changeMusicFile
ERROR Thu 18. Jul 14:09:58 2013| timestep = timestep + int(tmp[2]) - int(tmp2[2])
ERROR Thu 18. Jul 14:09:58 2013| IndexError : list index out of range
DEBUG Thu 18. Jul 14:09:58 2013| SetExecuted 1 RainModule {f58c9361-07b0-4cf4-9d73-4d4122809ef1}
STANDARD Thu 18. Jul 14:09:58 2013| Success RainModule {f58c9361-07b0-4cf4-9d73-4d4122809ef1} Counter 0 time 0.014

Fix the timestep in the rain.csv file generated by the rainfall module

When we generate the .csv file from the netcdf file, the first column in the csv file needs to match the dates and specific timestep in the netcdf file.
According to the NETCDF FORMAT that Bhupendra sent us and that we are using, we should be able to read the date/time (e.g. units = 'seconds since 1970-01-01 00:00:00 UTC') and the timestep (e.g. units = 'mm/hr') and this should be the time and timestep in the csv file that we generate.

Rainfall file

Why we are not generating raind_data.csv anymore?

ERROR Fri 9. Aug 10:50:48 2013| Traceback (most recent call last):
ERROR Fri 9. Aug 10:50:48 2013| File "C:/P8_Github/P8Modules/scripts\P8Modules\rain_gui.py", line 33, in preview
ERROR Fri 9. Aug 10:50:48 2013| f = open("RainData.csv","r")
ERROR Fri 9. Aug 10:50:48 2013| IOError : [Errno 2] No such file or directory: 'RainData.csv'
DEBUG Fri 9. Aug 10:51:01 2013| SetExecuted 0 RainModule {7936b32e-2072-4776-9f5b-c0b0bf9f2aea}
DEBUG Fri 9. Aug 10:51:01 2013| SetExecuted 0 RainModule {7936b32e-2072-4776-9f5b-c0b0bf9f2aea}

Update the graph and the types of rainfall file that the rain module reads

1 - the netcdf file contains the timestep of the rainfall in it, therefore we need to adjust the x axis label in the histogram to matches with the units (and these will vary from file to file)

2 - As we spoke in Innsbruck, can we update the module to
a- Give the option to open either a Rain.csv file or read the data corresponding to the centroid of the catchment in the netcdf file (as it is now).
b- when we read the data either from csv provided by the user, or the csv generated with netcdf file, we have to adjust the MUSIC files to use the data.

In the .msf files (main and secondary ones), we replace the whole line 7: (MeteorologicalTemplate, …………)

by

RainfallFile,C:\Program Files (x86)\hydro-IT\P8-WSC\Rain.csv
PETFile,C:\Program Files (x86)\hydro-IT\P8-WSC\et.txt
StartDate,01/01/1990
EndDate,03/01/1990
Timestep,360

In which ‘StartDate’, ‘EndDate’ and ‘Timestep’ (in seconds) need to match the content in the rain cvs file we are reading.

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.