Closed mdekauwe closed 8 years ago
Thanks. @tonygardella could you make that fix, since you were the one that wrote the function originally.
This instance is much easier to fix than the met one because this all is occurring within write.configs.MAESPA, which does have access to the full PEcAn settings and all the input files. Specifically, Tony, you should add stem density (i.e. num_trees/plot_size) as an argument to model2netcdf.MAESPA and then add that variable to the pattern matching you do in the jobs.sh template
In model2netcdf.MAESPA.R the flux units are currently being returned as, for example, gross photosynthesis mol tree-1 d-1. These units are bit useless if you ever wish to compare the fluxes to any other models or data.
To get them in sensible m-2 units you need to: e.g. for GPP (python pandas syntax)
where plot size is xmax * ymax. The information on plot_size and num_trees is in the input file trees.dat
This is therefore another instance where one would need to be able to access the input file. If this is going to be a problem I can speak to Remko about potentially changing this, though I imagine he won't be keen as this may break a lot of their existing structure.