cdmuir / tealeaves

Solve for leaf temperature using energy balance
Other
11 stars 1 forks source link

System command error when installing tealeaves #8

Closed MorningGlory747 closed 5 years ago

MorningGlory747 commented 5 years ago

Greetings,

I am new to R but have experience with python and Matlab.

I am currently trying to install the tealeaves but receive the following error :

devtools::install_github("cdmuir/tealeaves")

Downloading GitHub repo cdmuir/tealeaves@master √ checking for file 'C:\Users****\AppData\Local\Temp\RtmpgVj5NM\remotes2234792b794a\cdmuir-tealeaves-a306691/DESCRIPTION' (671ms) preparing 'tealeaves': (1.1s) √ checking DESCRIPTION meta-information ... checking for LF line-endings in source and make files and shell scripts (621ms) checking for empty or unneeded directories looking to see if a 'data/datalist' file should be added building 'tealeaves_0.0.9.tar.gz'

Error in (function (command = NULL, args = character(), error_on_status = TRUE, : System command error

I had previous issues with installing tealeaves because I did not have RTools installed, but even after doing so I received this message. I hope that the current error message isn't related to that.

I am currently using devtools v2.0.2 with R v3.5.3 and Rtools 3.5

Thank you

cdmuir commented 5 years ago

I'm sorry to hear that. What kind of computer are you using?

MorningGlory747 commented 5 years ago

Hello,

Windows 10 profesionnal edition on a Lenovo Thinkpad, but I think now that it's an issue that goes beyond that of installing tealeaves, so I posted the issue in the devtools github issue directory, hopefully I will have more luck there. If not, then I will consider perhaps translating your script into python... A previous coworker who no longer works here developped his own leaf temperature model in order to compute leaf wetness duration but I am unsure about how he considers the latent heat exchanges so I wanted to compare your method with his.

In any case, thank you for your consideration!

cdmuir commented 5 years ago

I don't have a Windows machine to test it myself, so I have been wondering if there would be any problems. Hopefully (for me) it's a problem with devtools, because otherwise I'm not even sure where to begin.

Just out of curiosity, where are you working and what's the application for compute leaf wetness? If you do get tealeaves working, I'd appreciate feedback from users on what they are doing and if any features could be changed or added.

MorningGlory747 commented 5 years ago

Hi there,

Sorry for the late reply. I have yet to receive a reply from the devtools development team, but you bring out a fair point that perhaps this could be system related.

While the coworker who no longer works here built a leaf wetness duration model, my duty is to model stigma temperature on apple trees and events of condensation. I have yet to find any model that use a physical approach to predict the stigma temperature. I will try to use a modified leaf temperature model by assuming that I’m trying to predict a sphere rather than a 2d plane, but what greatly differs from both models is the consideration for latent heat which presently I am unsure about how it works for the stigma. In any case, it would be a pleasure to provide you with some feedback in the near future (in the event where I can get devtools working!)

cdmuir commented 5 years ago

Interesting. Monteith & Unsworth 2013 (Principles of Environmental Physics, 4th Ed) provide Nusselt numbers for spheres in their Table A.5:

0 > Re > 300, Nu = 2 + 0.54 * Re ^ 0.5 50 > Re > 1.5 x 10^5, Nu 0.34 Re ^ 0.6

(Not sure what you should do if Re is between 50 and 300).

Not sure how much latent heat loss there would be. Do apples have dry or wet stigmas?

MorningGlory747 commented 5 years ago

Yes I have actually considered the set of equations provided by M&U the 4th edition, but instead I opted for an equation developped by Whitaker (1972) that gives an Nu for 3.5 < Re < 7.6e4. Both give similar results for identical Reynold numbers.

My academic background is in Meteorology so my answer may not be proper but I believe the stigmas to be dry stigmas as they don't really have any stickiness like what a wet stigma should... but that's the best reason I can give.

MorningGlory747 commented 5 years ago

@cdmuir Hey there, just so you know I was able to fix the issue, it was completely unrelated to R and devtools, but rather with the way my system command was set up in the registry. I am hence able to install tealeaves on R now, shame because last night I just finished translating the code into python haha! I suppose that this translation gave me a good understanding of how your code works and by getting the (python) results, it does seem like the way my previous colleague was computing leaf temperature was erroneous. Since you have an interest in updating the script, it would be foolish of me to stay with my python equivalent especially since I don't know for how long i'll be working on this project. We'll see I suppose. Thanks for your help!

cdmuir commented 5 years ago

ok. good luck. let me know if you any other issues.