Open bpmweel opened 6 years ago
Lobith PCR-GLOBWB: 5;1 (x,y) WFLOW: 24;5
def pixelfinder(xcord,ycord,modelname):
if modelname == 'PCRGLOB-WB':
xpixel = (3.5 - xcord)/-0.5
ypixel = (52.5 - ycord)/0.5
return xpixel, ypixel
if modelname == 'WFLOW':
xpixel = (5.20883 - xcord)/-0.0366667
ypixel = (52.0726 - ycord)/0.0366667
return xpixel, ypixel
lobith_PCR = pixelfinder(6.1178,51.86,'PCRGLOB-WB')
lobith_WFLOW = pixelfinder(6.1178,51.86,'WFLOW')
Lobith PCR-GLOBWB: 5;1 to flat index => 517+1 = 86 WFLOW: 24;5 to flat index => 24 187 + 5 = 4493
You can search the Lobith coordinate using the BMI
The functions get_grid_x
and get_grid_y
provide pixel coordinates for lookup
For the WFLOW variable to display we used the variable (self.SurfaceRunoffCatchmentMM), while I would suggest to use self.SurfaceRunoff: Surface runoff in the kinematic wave [m^3/s] instead of Surface runoff in the dyn-wave reservoir expressed in mm over the upstream (catchment) area.
Source: https://media.readthedocs.org/pdf/wflow/latest/wflow.pdf (page 71)
For the MVP we need to know which pixel in the output has the interesting discharge.
We need this for all the models we want to support, but for now just PCR-GLOBWB en WFLOW.