Steps for running the fortran model (

  • Original Code and setup on idea.

    • Steps in run process (cron)

        • The 3 routines that are run on the original server
      • Get forecast 
      • Get prism data

        • /home/nan/WNV_WX/MIR_model/run.cp_prism

        • get prism data

          • /home/mtimlin/estSTCD/estCDwestnile/estCD.csh

            • set d1 to 19810101 and d2 to `date +"%Y%m%d"` the get 4 files:
              • curl -o estCD.dir/estCDp --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"pcpn","area_reduce":"climdiv_mean"}]}'

              • curl -o estCD.dir/estCDn --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"mint","area_reduce":"climdiv_mean"}]}'

              • curl -o estCD.dir/estCDx --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"maxt","area_reduce":"climdiv_mean"}]}'

              • curl -o estCD.dir/estCDt --data 'params={"state":"IL","sdate":"'$d1'","edate":"'$d2'","grid":"21","elems":[{"name":"avgt","area_reduce":"climdiv_mean"}]}'

        • copy prism data

          • from timlin directory cd /home/mtimlin/estSTCD/estCDwestnile/estCD.dir/110x  where x=[1,9]  where x is the climate division

          • to WNV_WX/Not_smooth/110x
      • Run Model

        • /home/nan/WNV_WX/MIR_model/run.cmp_n_nweek

          • run the model
            • ./cmp_n_nweek 11 0x 2017 where x=[1,9]
          • rename plots
          • copy plots (rename) (110x_2017_plot → 110x_YRcur_plot) to webapp directory
    • Step through fortran code

      • LinesFunctionImportant variables DescriptionImportant variables namesIssues
        38-185initialize variables

        188-191characters to int
        ayear→iyear CD->icd
        196-202create 3 20x360 arraysinitialized as: t=temperature p=precipitation d=?t,p = 999.9 d =0.0
        209-212read week_days_2016.csv,input days of week for yearwmonth(i),wday(i),wweek(i),wyear,wdate,wdow
        216-231create output filesnormals MIR plot, (move to ./output)

        241-423compute normals

        243-247set some time period length values

        bmon = 12
        bday = 29
        emon = 12
        eday = 28

        250-293create 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-327calculate weekly averages for temp and precipaverages of weekly temps and precipswt(k,j) wp(k,j)
        331-352calculate weekly normals

        356-358compute dw 30yr normals

        362-368if weekly average > 22deg

        371-401compute weekly 30 year normals

        404-417compute seasonal weekly normals

        435open ST//CD previous year quarterly temp and precip diffs

        436-439instantiate 2 1d 366n arrays at 999.9


        445-452get year previous to input year values
        byear, nday, bday, bmon
        454-480get daily means for previous year, convert to to celsius, cm
        tmn ppt
        485-509compute weekly averages for previous year
        wctmn wcppt
        511-530initalize to 0

        533-560compute seasonal averages

        564-571compute quarterly previous year differences

        573-580write to file <state><climdiv>w_<year>

        598open ST//CD previous year quarterly temp and precip diffs (again)

        599-603initialize 366d arrays
        tmn(i)=999.9 ppt(i)=999.9 ddd(i)=0.0
        605-607initialize 53d array
        610-617set year values
        byear nday bday bmonth
        620-698calculate means for temp, precip

        700-826forecaste data for 2017

        mntemp mxtemp prcpd
        730-735open data/ILCD_20171024 read header line

        740-742initalize 0 counters for min and max temp and precip

        743loop climate divs

        744-777validate counts for min and max templs and precip

        780-789set values of prcpd
        prcpd(x,j) x=[1,10], j=climatediv
        795-816convert to celsius and calculated diff from 22 convert to cm

        830-884compute weekly averages for analysis year

        887-899compute weekly dw

Fortran Help

read(unit, format, if end goto)
write(*,print to stdout

  • No labels