rsofun icon indicating copy to clipboard operation
rsofun copied to clipboard

Moving generate_biomee/pmodel_driver_data.R from FluxDataKit to rsofun

Open marcadella opened this issue 1 year ago • 3 comments

Related to issue #228 and the fact that we are homogenizing the interfaces: should we move rsofun/data-raw/generate_biomee_driver_data.R to DataFluxKit? It looks like it is related to FluxDataKit/analysis/05_generate_demo_rsofun_drivers.R

marcadella avatar Oct 21 '24 13:10 marcadella

This would also affect the generation of pmodel drivers.

The README.md states that the use https://github.com/geco-bern/FluxDataKit/blob/main/analysis/05_generate_demo_rsofun_drivers.R. However, this script has disappeared in the meantime. For the phydro branch the forcing input is anyway extended with the columns: forcing, forcing_24h, forcing_daytime, and forcing_3hrmax

  • [ ] use the phydro-updated data (generated with this script and the function fdk_format_drivers()) including the columns: forcing, forcing_24h, forcing_daytime, and forcing_3hrmax
  • [x] also include site properties AI and MAT (according to https://github.com/geco-bern/FluxDataKit/issues/100)

fabern avatar Oct 21 '24 13:10 fabern

The mentioning of rsofun/data-raw/generate_biomee_driver_data.R can be removed from FluxDataKit. The complete driver object for all sites and years is generated in FluxDataKit (analysis/02_batch_format_rsofun_drivers.R). In rsofun, let's keep the scripts that generate the demo data from that (subsetting to one site and a couple of years within that). This is done by data-raw/generate_biomee_driver_data.R and data-raw/generate_pmodel_driver_data.R. In that sense, I think there is no change needed for creating the P-model drivers. But then, the BiomeE drivers generated by rsofun/data-raw/generate_biomee_driver_data.R may be updated?

stineb avatar Oct 21 '24 23:10 stineb

The way I understand it, there are the following tasks still to be done:

  • [ ] remove mentions of rsofun data generation from the FluxDataKit repository [EDIT: following this PR: https://github.com/geco-bern/FluxDataKit/pull/101]
    • [ ] also consider treating/following up the issues: https://github.com/geco-bern/sofunCalVal/issues/18 and https://github.com/geco-bern/sofunCalVal/issues/5
  • [ ] regenerate drivers for p-model and BiomeE-model
    • [ ] generation scripts should be put: into the data-raw-folder of the repo rsofun
      • [ ] for p-model it should use analysis/b_02_batch_format_rsofun_drivers.R from the updated FDK PR
        • [x] for p-model it currently uses the Zenodo files generated with analysis/b_02_batch_format_rsofun_drivers.R
      • [x] for BiomeE there is already a script generate_biomee_driver_data.R
        • [ ] but is missing a script that generates CH-LAE_forcing.rda
    • [ ] the data-raw-folder of the repo rsofun also contains data needed for the generation
      • [x] for BiomeE this is CH-LAE_forcing.rda
      • [ ] for p-model should we add a reduced FDK csv (containing only FR-Pue, Reichetal_Colorado, Reichetal_New_Mexico, Reichetal_Venezuela, and Reichetal_Wisconsin)?
    • [ ] updated drivers replace the *.rda-files in the data-folder of the repo rsofun

fabern avatar Oct 24 '24 12:10 fabern