lastmonth = nmonthyear - firstmon + 1
firstmonth = (nmonthyear - firstmon + 1) +
lastmonth = (nmonthyear - firstmon + 1) +
firstmonth = (nmonthyear - firstmon) +
lastmonth = (nmonthyear - firstmon) +
integer firstmon
firstmon = mod(modelstartdate(1)/100,100)
lastmonth = lastmon - firstmon
lastmonth = lastmon - firstmon + 1