-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
334 monsoon wang charles review [WIP] #489
Conversation
…diags to netCDF for producing maps
else: | ||
ext = "" | ||
# We need to make sure there is no "dot" in filename or import will fail | ||
if fnm.find(".") > -1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zshaheen shouldn't your class already take care of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 Yes, the parser already does this.
highlights = parameters.highlights | ||
|
||
|
||
print '-----------------------------' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zshaheen does your Parser has a verbosity argument? If so we should use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 No, there's no verbosity arg. I'll add that into my fix for today.
from SeabarChart_mpl import BarChart | ||
import argparse | ||
from argparse import RawTextHelpFormatter | ||
import pdb #, pdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably take it out in production
|
||
|
||
|
||
# -- Exploring a way to handle an auxillary json file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleckler1 shouldn't we use the JSON class here?
@@ -0,0 +1 @@ | |||
from monsoon_precip_index_fncs import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 note to self edit this to import only what's needed.
import MV2 | ||
# SEASONAL RANGE - USING ANNUAL CYCLE CLIMATOLGIES 0=Jan, 11=Dec | ||
def mpd(d): | ||
mjjas = (d[4] + d[5] + d[6] + d[7] + d[8])/5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soo.... we're 100% certain the deal with climo files from Jan to Dec here, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All clim statistics in the PMP driver expect this too.
return annrange, mpi | ||
|
||
def mpi_skill_scores(annrange_mod_dom,annrange_obs_dom,thr): | ||
mt = MV2.where(MV2.greater(annrange_mod_dom,thr),1.,0.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mt = MV2.greater(annrange_mod_dom,thr).astype("i") does the same faster
hit = float(MV2.sum(hitmap)) | ||
|
||
mt1 = MV2.where(MV2.greater(annrange_mod_dom,thr),10.,0.) | ||
both1 = MV2.add(mt1,ot) # 10 for MOD above THRESHOLD, OTHERWISE 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not both1 = mt1 + ot ???
mt = MV2.where(MV2.greater(annrange_mod_dom,thr),1.,0.) | ||
ot = MV2.where(MV2.greater(annrange_obs_dom,thr),1.,0.) | ||
|
||
both = MV2.add(mt,ot) # HIT WILL MEAN 2, OTHERWISE 0 or 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just +
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 I thought it was better practice to use MV than + - / *
@gleckler1 c an you send me an example on how to run this? Thx! |
@doutriaux1 Check out comment on line 17 of your code: |
thx @gleckler1 |
default = 'rms', | ||
help = "Statistic:\n" | ||
"- Available options: bias, cor, rms") | ||
P.add_argument("-seas", "--season", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one dash should only be ONE letter, multiple letters with two dashes
not ready at all!!! |
@gleckler1 this branch computation part is ready for you to give it a test drive Things I need to do:
Things you need to do:
|
Outstanding CD ... may the world improve for you (and the rest of us)! |
@cd Is GH pull of 334_monsoon_wang_charles_review they way for me to install this and test it out? |
yep, please pull and checkout this branch then
Then
|
@doutriaux1 Followed instructions but something not right. I expected refactored code to be in: not This probably explains why: |
@gleckler1 yes i moved it into the main it's not in devel anymore since it's for merging in master. I had left stuff in devel because I think it was the graphics. I'll clean it so that --devel works again. |
@doutriaux1 OKBYME. I presume I should still do a test run before we merge. To do that, should I use python setup.py install |
do not merge yet