NCAR / wrf_hydro_py

Python API for the WRF-Hydro model
59 stars 43 forks source link

Pbs custom #201

Closed jmccreight closed 4 years ago

jmccreight commented 4 years ago

This branch allows "custom" overrides to PBS schedulers. For example

sched = wrfhydropy.PBSCheyenne(
    account='NRAL0017',
    nproc=2,
    nnodes=2,
    ppn=1,
    email_who='bob@dum.com',
    email_when='abe',
    queue='regular',
    walltime='00:10:00',
    custom={'-l':'select=1:ncpus=36:mpiprocs=36:mem=109GB+1:ncpus=36:mpiprocs=36'}
)

the above, instead of requesting 2 nodes each with 1 processor and default memory, would request 2 nodes both with 36 processors and the first with 109GB (large) memory.

It's a bit hacky, but c'est la vie. it's a power user option in an interface that aims to simplify.

pep8speaks commented 4 years ago

Hello @jmccreight! Thanks for opening this PR.

Line 52:54: W291 trailing whitespace Line 56:1: E265 block comment should start with '# ' Line 57:1: E265 block comment should start with '# ' Line 58:1: E265 block comment should start with '# ' Line 59:1: E265 block comment should start with '# ' Line 60:1: E265 block comment should start with '# ' Line 60:101: E501 line too long (244 > 100 characters) Line 61:1: E265 block comment should start with '# ' Line 63:1: E265 block comment should start with '# '

Line 52:101: E501 line too long (101 > 100 characters) Line 81:101: E501 line too long (101 > 100 characters) Line 391:101: E501 line too long (102 > 100 characters) Line 401:101: E501 line too long (102 > 100 characters) Line 443:101: E501 line too long (103 > 100 characters)

Line 126:1: W293 blank line contains whitespace

Line 49:18: E203 whitespace before ',' Line 50:27: E203 whitespace before ',' Line 51:26: E203 whitespace before ',' Line 52:24: E203 whitespace before ',' Line 53:21: E203 whitespace before ',' Line 54:20: E203 whitespace before ',' Line 55:9: E203 whitespace before ',' Line 56:34: E203 whitespace before ',' Line 57:46: E203 whitespace before ',' Line 58:9: E203 whitespace before ',' Line 59:77: E203 whitespace before ',' Line 60:76: E203 whitespace before ',' Line 61:31: E203 whitespace before ',' Line 62:31: E203 whitespace before ',' Line 63:9: E203 whitespace before ',' Line 64:78: E203 whitespace before ',' Line 65:48: E203 whitespace before ',' Line 66:25: E202 whitespace before ']' Line 112:51: E231 missing whitespace after ',' Line 125:5: E722 do not use bare 'except' Line 128:101: E501 line too long (106 > 100 characters)

Local linting (style checking) can be peformed using pycodestyle General guidelines can be found at the Hitchhiker's guide to code style

jmccreight commented 4 years ago

I forgot that I put this on top of a documentation branch that is not yet merged... Ignoring those, the substantial changes in this PR are found in wrfhydropy/core/schedulers.py wrfhydropy/tests/test_schedulers_pbs.py