{"id":24507101,"url":"https://github.com/jvail/crop.js","last_synced_at":"2025-03-15T09:12:13.502Z","repository":{"id":24281458,"uuid":"27676146","full_name":"jvail/crop.js","owner":"jvail","description":"A dynamic crop and grassland growth model","archived":false,"fork":false,"pushed_at":"2016-01-31T11:49:47.000Z","size":6041,"stargazers_count":1,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T23:44:28.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jvail.github.io/crop.js/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-07T16:22:34.000Z","updated_at":"2016-01-10T17:13:29.000Z","dependencies_parsed_at":"2022-08-22T14:00:31.020Z","dependency_job_id":null,"html_url":"https://github.com/jvail/crop.js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvail%2Fcrop.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvail%2Fcrop.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvail%2Fcrop.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvail%2Fcrop.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvail","download_url":"https://codeload.github.com/jvail/crop.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707378,"owners_count":20334619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T23:44:59.757Z","updated_at":"2025-03-15T09:12:13.486Z","avatar_url":"https://github.com/jvail.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"crop.js\n=======\n\ncrop.js is a dynamic, deterministic generic crop (-rotation) and grassland growth model in JavaScript. It is a JS port of the soil, water and crop processes of [MONICA (C++) code](https://github.com/zalf-lsa/monica) and an implementation of the grassland/pasture growth sub-model of [SGS Pasture Model](http://imj.com.au/sgs/) from the publicly available documentation.\n\n## Examples \u0026 Usage\n\n```javascript\nvar debug = true,\n    verbose = true,\n    weather = { // find complete description of optional or mandatory input data in src/configuration.js \n      tmin: [/*...your data...*/],\n      tmax: [/*...your data...*/],\n      precip: [/*...your data...*/]\n    };\n\n/* create a configuration */\nvar configuration = new crop.Configuration(weather, debug, verbose, \n    // optional callback\n    function (dayOfSimulation, dateString, models, done) {\n      var model, cropGrowth, soilTemperature, soilMoisture,\n          soilOrganic, soilColumn, soilTransport;\n          \n      for (var m = 0; m \u003c models.length; m++) {\n        model = models[m];\n        // access sub-models\n        if (model.isCropPlanted())\n          cropGrowth = model.cropGrowth();\n        soilTemperature = model.soilTemperature();\n        soilMoisture = model.soilMoisture();\n        soilOrganic = model.soilOrganic();\n        soilColumn = model.soilColumn()\n        soilTransport = model.soilTransport();\n        /* do stuff */\n      }\n\n    });\n\n/* set up simulation, soil and crop parameters */\nvar simulation = {\n      time: {\n        startDate: '1996-01-01',\n        endDate: '1997-12-31'\n      },\n      switches: {\n        nitrogenResponseOn: true,\n        waterDeficitResponseOn: true\n      },\n      init: {\n        percentageFC: 1\n      }\n    },\n    site: {\n      latitude: 52.625,\n      slope: 0,\n      heightNN: 1,\n      horizons: [{\n        thickness: 2,\n        organicMatter: 0.015,\n        sand: 0.60,\n        clay: 0.05,\n        sceleton: 0.02\n      }]\n    },\n    production: {\n      crops: [{ /* a rotation or single crop: dates should not collide */\n        model: 'generic',\n        species: [\n          {\n            // see available crops at genericcrop.js and grassland.js\n            // with varying parameter quality!\n            name: 'winter rye'\n          }\n        ],\n        sowingDate: '1996-10-01',\n        plantDryWeight: 225,\n        finalHarvestDate: '1997-07-01',\n        tillageOperations: [],\n        irrigations: [],\n        organicFertilisers: [],\n        mineralFertilisers: []\n      }]\n    };\n\n/* run the simulation */\nconfiguration.run(simulation, { site: site, production: production });\n```\n\nSee also [code](https://github.com/jvail/crop.js/tree/master/exp) and examples: http://jvail.github.io/crop.js/, https://zalf-lse.github.io/solid-dss/. A configuration's parameter description is available from [here](https://github.com/jvail/crop.js/tree/master/cfg/meta.json).\n\n## Model Genealogy\n[MONICA](http://monica.agrosystem-models.com/) is based on [HERMES](http://www.zalf.de/en/forschung/institute/lsa/forschung/oekomod/hermes/Pages/default.aspx) and [DAISY](https://code.google.com/p/daisy-model/). HERMES is based on [SUCROS](http://models.pps.wur.nl/node/3). The grassland model is based on the [SGS Pasture Model](http://imj.com.au/sgs/).\n\nNendel, C., M. Berg, K.C. Kersebaum, W. Mirschel, X. Specka, M. Wegehenkel, K.O. Wenkel, R. Wieland (2011). The MONICA model: Testing predictability for crop growth, soil moisture and nitrogen dynamics. Ecol. Model. 222 (9), 1614–1625.\n\nJohnson I. R., Lodge G. M., White R. E. (2003). The Sustainable Grazing Systems Pasture Model: description, philosophy and application to the SGS National Experiment. Australian Journal of Experimental Agriculture 43, 711–728. \n\n## Aims\n- [x] Replace MONICA's generic grass-legume model with a more sophisticated grassland model that is able to simulate mixtures of species.\n- [ ] Provide additional nutritional parameters (e.g. digestibility) for forage crops (e.g. maize, whole-crop silage) that may be consumend by animal (ruminants) models.\n- [x] Add multi-model support to allow interaction of models (rotations, paddocks).\n- [x] Add routines to interact with animal models (grazing).\n- [x] Add other grassland species (or functional groups) if parameters are available.\n- [ ] Add simple rountines for automatic seed, harvest, fertilization, irrigation and tillage date predictions.\n- [x] Simplify MONICA's input parameters, configuration and API.\n- [x] Provide infrastructure and unified API to easily extend crop.js with custom crop growth models\n\n## Acknowledgements\n\nThe study has been supported by the TRY initiative on plant traits (http://www.try-db.org). The TRY initiative and database is hosted, developed and maintained by J. Kattge and G. Bönisch (Max Planck Institute for Biogeochemistry, Jena, Germany). TRY is currently supported by DIVERSITAS/Future Earth and the German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig\n\nThe research leading to these results has received funding from the European Community’s Seventh Framework Programme (FP7/2007–2013) under grant agreement No. FP7-266367 (SOLID).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvail%2Fcrop.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvail%2Fcrop.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvail%2Fcrop.js/lists"}