eWaterCycle / globe-experiment-finder

Using Typescript, Angular 4 and Cesium, we create a globe visualization to display all of the models per watershed, global etc. of the world and all of the previously run experiments.
Apache License 2.0
0 stars 0 forks source link

Determine discharge pixel and variable name to use for display #12

Open bpmweel opened 6 years ago

bpmweel commented 6 years ago

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.

jeromaerts commented 6 years ago

Lobith PCR-GLOBWB: 5;1 (x,y) WFLOW: 24;5

jeromaerts commented 6 years ago
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')
bpmweel commented 6 years ago

Lobith PCR-GLOBWB: 5;1 to flat index => 517+1 = 86 WFLOW: 24;5 to flat index => 24 187 + 5 = 4493

goord commented 6 years ago

You can search the Lobith coordinate using the BMI

goord commented 6 years ago

The functions get_grid_x and get_grid_y provide pixel coordinates for lookup

jeromaerts commented 6 years ago

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)