r code for working with portal climate data