Does anyone know how to calculate a 12 hours signal (Climatic data)?

1 view (last 30 days)
I need to replicate the hydraulic resistances of tree compartments for a sap-transport model. In the beginning I thought that a daily average value would suffice but I found that the studied trees have a very strong stomatal control. Thus, the hydraulic resistance in the canopy change hourly following the solar radiation and the humidity in the air. This means that the resistance is close to zero during the night, increases during the day and if it gets very hot and dry the resistance reaches its maximum limit.
I need a function or code that allows me to create a 12-hours cycle signal, with its maximum peak at 12:00 and its minimum peak at 00:00.
I am using the following script to calibrate the Resistance by changing the amplitude and the offset:
Resistance = ((sin(time * frequencyMultiplier) * amplitude) + offset)
But the sin function does not provide me with enough control to produce realistic Resistance patterns and sometimes it produces signals out of the 12-hours cycle...
In the lower image it can be seen some of the climatic drivers of the model. The ideas is that my "simulated" Resistance follows the patterns of either the VPD or the air temperature.
<<7640d4d0-a-62cb3a1a-s-sites-googlegroups-com-site-leokmlfiles-ImageQues-jpg-attachauth-ANoY7cq-q0JrP8TSsbY4q3F6sdsKsWAYDU6NvHY5Y5v0t8kyX6H0z7Yyk2hJys3sxRctishrJivTOezBJY8g3P91wfPoV30TbaHAHT6Q1M_aOy3ohiYAyY_MlPvqEO8XS01QNqybnMQNGCbYn7UhiOVe2bRo4yMbyH3FL-b_SNNXXtcsMqjkKKqG6Ww1r1W-Pb7lAcX4F7Q4JECQsCBcEv8sU4s3eMisnw-3D-3D-attredirects.0>>
Any idea would be appreciated !!

Answers (1)

Wayne King
Wayne King on 29 Jun 2012
You can do that by sampling every hour
hrs = 0:59; % 5 periods for example
x = cos(2*pi/12*hrs);

Categories

Find more on Climate Science and Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!