femiguez / apsimx

R package for APSIM-X
https://femiguez.github.io/apsimx-docs/
45 stars 19 forks source link

Missing Units from get_power_apsim_met #152

Closed wentama closed 2 months ago

wentama commented 2 months ago

Hi, for some reason whether I use get_power_apsim_met and write it to met using get_power_apsim_met, the met file is always missing the units in row 9: '() () (MJ/m2/day) (oC) (oC) (mm) (%) (m/s)'. It could be manually fixed if I go in and paste the units after the file is created but just wondering what could be wrong. Thanks.

This is the code: image

This is the output met file:

image

femiguez commented 2 months ago

@wentama Thanks for the report! I have fixed this issue and submit it soon. I'll be adding an additional check for units in the 'check_apsim_met' function.

wentama commented 2 months ago

@femiguez thanks for adding the check constraint! I attempted to use the updated apsimx R package to load the weather data and I'm now getting the message from check_apsim_met regarding the missing units from get_power_apsim_met (shown below). Just wondering why were the units auto-filled the first time I used get_power_apsim_met maybe 2 months ago, but now the units are missing for get_power_apsim_met? I also don't recall syncing apsimx with any new commits during that time.

image

femiguez commented 2 months ago

@wentama This is fixed now on github (I believe). I will be submitting a new version of the package to CRAN soon and I suggest getting that as soon as it is available