Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new function to convert get_xml_files_param_df long format output to wide format #38

Open
plecharpent opened this issue Nov 7, 2023 · 0 comments
Labels
feature New feature or request OnGoing currently working on this issue

Comments

@plecharpent
Copy link
Contributor

plecharpent commented Nov 7, 2023

⚠️ Take care of plant index and soil layer index in initialisation data and take also into account plant files for cultivar ids!
The wide format generated by get_xml_files_param_df seems ok for plant files but not the wide format.

For the moment the long format table contains param names (col = param) attached to crop i.e. lai0_Crop1, lai0_Crop2 and also param names with soil layer id and plant id i.e. densinitial_1_Crop1, densinitial_2_Crop1,...

name type param id value
... ... ... ... ...
23 mais_ini.xml initialisations lai0_Crop1 NA 0.0
24 mais_ini.xml initialisations lai0_Crop2 NA
... ... ... ... ...
45 mais_ini.xml initialisations densinitial_1_Crop1 NA 0.0
46 mais_ini.xml initialisations densinitial_2_Crop1 NA 0.0
47 mais_ini.xml initialisations densinitial_3_Crop1 NA 0.0
48 mais_ini.xml initialisations densinitial_4_Crop1 NA 0.0
49 mais_ini.xml initialisations densinitial_5_Crop1 NA 0.0

So, soil id must be set into id column of the table and a new crop id col should be added as follows

name type param soilid cropid value
... ... ... ... ... ...
23 mais_ini.xml initialisations lai0_Crop1 NA 1 0.0
24 mais_ini.xml initialisations lai0_Crop2 NA 2
... ... ... ... ... ...
45 mais_ini.xml initialisations densinitial_1_Crop1 1 1 0.0
46 mais_ini.xml initialisations densinitial_2_Crop1 2 1 0.0
...

The actual function producing the long table from xml files (get_xml_files_param_df) has to be modified to take it into account.

@plecharpent plecharpent added the feature New feature or request label Nov 7, 2023
@plecharpent plecharpent added the OnGoing currently working on this issue label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request OnGoing currently working on this issue
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant