pnnl / DHSVM-PNNL

41 stars 32 forks source link

Be able to read lapse rates as maps #28

Open wperkins opened 5 years ago

wperkins commented 5 years ago

In the [CONSTANTS] section, a temperature and precipication lapse rates are specified like

Temperature Lapse Rate   = -0.0065
Precipitation Lapse Rate =  0.000

which are constant over the entire domain. For larger domains, these could vary spatially. I propose that these be handled as the snow parameters in that these phrases would either specify a numeric constant or a path to a map file. So, valid phrases would be

Temperature Lapse Rate   = -0.0065
Temperature Lapse Rate   = ../input/tlapse.bin
Precipitation Lapse Rate =  0.000
Precipitation Lapse Rate =  ../input/plapse.bin

Perhaps there are other constants that should be handled this way?

zrduan commented 5 years ago

@wperkins I think the way you suggested would work great.

One concern I have though, is about the memory needed to run the model - with a lot of spatial parameters and gap model, it would be hard to run the model on a PC with small memories. Users probably need to be aware of that. Or is there any smart ways we can reduce the memory occupancy? Not necessarily needs to be fixed right away but something to consider.

wperkins commented 5 years ago

I should have looked at this closer. I have it wrong. Temperature lapse is currently handled with these phrases:

[OPTIONS]
Temperature lapse rate = CONSTANT | VARIABLE
[CONSTANTS]
Temperature Lapse Rate   = -0.006

where the CONSTANT option caused the value in the constants section to be used and with the VARIABLE option, the lapse rate is read as an extra field from from met station data. The precipitation lapse rate is currently handled with the following phrases:

[OPTIONS]
Precipitation Lapse Rate = CONSTANT | VARIABLE  | MAP
[CONSTANTS]
Precipitation Lapse Rate =  0.0007
[METEOROLOGY]
Precipitation Lapse Rate Map = map.file

where CONSTANT and VARIABLE options are the same as with the temperature lapse and the MAP option causes the map in METEOROLOGY to be read.
It would be less disruptive, relative to the original suggestion, to just handle the temperature lapse just like the precipitation lapse by adding a MAP option.