converted AgMIP-Climate-IT-pilot-tools into R