Steps for running the fortran model (https://opensource.ncsa.illinois.edu/bitbucket/projects/VBD/repos/mir_model_f/browse)
/home/nan/WNV_WX/Not_smooth/run.get_forecast
gets csv of forcast
copies (renames) to ILCD_<year><month><day> in same directory
Get prism data
/home/nan/WNV_WX/MIR_model/run.cp_prism
get prism data
/home/mtimlin/estSTCD/estCDwestnile/estCD.csh
curl -o estCD.dir/estCDp --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"pcpn","area_reduce":"climdiv_mean"}]}' http://data.rcc-acis.org/GridData
curl -o estCD.dir/estCDn --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"mint","area_reduce":"climdiv_mean"}]}' http://data.rcc-acis.org/GridData
curl -o estCD.dir/estCDx --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"maxt","area_reduce":"climdiv_mean"}]}' http://data.rcc-acis.org/GridData
curl -o estCD.dir/estCDt --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"avgt","area_reduce":"climdiv_mean"}]}' http://data.rcc-acis.org/GridData
copy prism data
from timlin directory cd /home/mtimlin/estSTCD/estCDwestnile/estCD.dir/110x where x=[1,9] where x is the climate division
Run Model
/home/nan/WNV_WX/MIR_model/run.cmp_n_nweek
Lines | Function | Important variables Description | Important variables names | Issues |
---|---|---|---|---|
38-185 | initialize variables | |||
188-191 | characters to int | ayear→iyear CD->icd | ||
194 | ? | c=',' | ||
196-202 | create 3 20x360 arrays | initialized as: t=temperature p=precipitation d=? | t,p = 999.9 d =0.0 | |
209-212 | read week_days_2016.csv, | input days of week for year | wmonth(i),wday(i),wweek(i),wyear,wdate,wdow | |
216-231 | create output files | normals MIR plot, (move to ./output) | ||
241-423 | compute normals | |||
243-247 | set some time period length values | bmon = 12 | ||
250-293 | create 1d arrays for day and month convert fahrenheit to celcius convert inches to cm | dd(i) -day mm(i) - month | -running to the end of the file without indexes updating -added byear=1981, now finishes | |
297-327 | calculate weekly averages for temp and precip | averages of weekly temps and precips | wt(k,j) wp(k,j) | |
331-352 | calculate weekly normals | |||
356-358 | compute dw 30yr normals | |||
362-368 | if weekly average > 22deg | |||
371-401 | compute weekly 30 year normals | |||
404-417 | compute seasonal weekly normals | |||
435 | open ST//CD previous year quarterly temp and precip diffs | |||
436-439 | instantiate 2 1d 366n arrays at 999.9 | tmn(i)=999.9 | ||
445-452 | get year previous to input year values | byear, nday, bday, bmon | ||
454-480 | get daily means for previous year, convert to to celsius, cm | tmn ppt | ||
485-509 | compute weekly averages for previous year | wctmn wcppt | ||
511-530 | initalize to 0 | |||
533-560 | compute seasonal averages | |||
564-571 | compute quarterly previous year differences | |||
573-580 | write to file <state><climdiv>w_<year> | |||
598 | open ST//CD previous year quarterly temp and precip diffs (again) | |||
599-603 | initialize 366d arrays | tmn(i)=999.9 ppt(i)=999.9 ddd(i)=0.0 | ||
605-607 | initialize 53d array | df_wkd=0.0 | ||
610-617 | set year values | byear nday bday bmonth | ||
620-698 | calculate means for temp, precip | |||
700-826 | forecaste data for 2017 |
command | inputs |
---|---|
read | (unit, format, if end goto) |
write(*, | print to stdout |