

all <- NULL

one <- "##start   YYYYSTA  000000" 
two <-  "##end     YYYYEND  000000"
three <- "##layer         1"
four <- "/new species    ,units     ,expression"

all <- rbind(one,two,three,four)



specs <- c("ASO4I","ASO4J","ANH4I","ANH4J","ANAI","ANAJ","AMGJ","ACAJ","APOCI","APOCJ","APNCOMI","APNCOMJ","AECI","AECJ","AFEJ","AOTHRI","AOTHRJ","AALJ","ASIJ","ATIJ","AMNJ")
n <- length(specs) - 1




slist <- NULL
slist <- paste("PM_ALL,ug/m3,",sep="")
for (i in 1:n) {
slist <- paste(slist,specs[i],"[1]+",sep="")
}
slist <- paste(slist,specs[length(specs)],"[1]",sep="")
slist

all <- rbind(all,slist)




cats <- c("ICO","BCO","OTH","MOBILE","POINT","NAT","OB","WF","CAN","MEX","RXB","RXP","RXG","SOY","CORN","FAL","RICE","SUG","WHE","MAG","RANG","AGO","MWD")
names <- c("ICON","BCON","OTHER","MOBILE","POINT","NAT","OPEN","USWF","CANFIRE","MEXFIRE","BROAD","PILE","GRASS","SOY","CORN","FALLOW","RICE","SUGAR","WHEAT","COMBO","RANGE","AGOTH","DITCH")
 
ncats <- length(cats)

slist <- NULL
for (j in 1:ncats) {
slist <- paste("PM_",names[j],",ug/m3,",sep="")
 for (i in 1:n) {
slist <- paste(slist,specs[i],"_",cats[j],"[2]+",sep="")
 }
slist <- paste(slist,specs[length(specs)],"_",cats[j],"[2]",sep="")
all <- rbind(all,slist)
}


all


write.table(all, file='species.pm.temp', sep="",quote=FALSE,row.names=FALSE,col.names=FALSE)

