Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. A Matlab program has been written up for you to calculate daily mean solar insolation and its saved in the file solar_insolation.m. Run it

4. A Matlab program has been written up for you to calculate daily mean solar insolation and its saved in the file solar_insolation.m. Run it on your computer. (You may simply save the file to your working directory and type solar_insolation at the command prompt of Matlab, or alternatively, you can copy and paste the code piece by piece onto the Matlab Command Window to run it). After running the program, you should see a figure of solar insolation as a function of latitude and month that is the same as I show in class. Study solar_insolation.m carefully. Try to understand how it does the calculation, especially how it constructs the two-dimensional array insolation (i.e., solar insolation as a function of latitude and season). Build upon the code and do the following:

4.1 (10 points) Plot solar insolation as a function of time (i.e., 12 months) for latitude 40N, i.e., latitude of NYC. Include both your code and figure in your report. Hint: Insolation is a 2D array, one dimension is latitude and the other is time. A 2D array is like an Excel table. When latitude is fixed (40N), the only dimension that varies is the time dimension. This is like checking a specific column (or row) of a 2D table. All you need to do is to find out which column (or row) you should select. Note that in the code, latitude increases by 5 degree from -90 (South Pole) to 90 (North Pole). You need to figure out the index for latitude 400N

4.2 (10 points) Do the same as 1.1 for latitude zero, i.e., the Equator. Include both your code and figure.

4.3 (10 points) Which month shows the maximum solar insolation for 400N? What about the Equator: which months show the maximum? Why does the equator have multiple peaks in solar radiation, whereas 400N only has one peak?

4.4 (10 points) Plot solar insolation as a function of latitude for 1) January and 2) July. Hint: now fix the time dimension and let the latitude dimension vary. Include your code and figure.image text in transcribedimage text in transcribed

% ------- 18- clear 10 11 % Define the two independent variables: day & latitude 13 14 - 15 - month=1:12; lat=(-90:5:90)*pi/180; % From 905 to 90N with increment of 5 deg 16 17 18 19 20 % Declination angle for twelve month (we use the angle for the 15th day of each month to represent that month). Information for declination angle % can be found at http://www.sci.ccny.cuny.edu/~luo/EAS488/Table_Declination_of_the_Sun.pdf 22. dec_angle_deg=[ -21 -12 -2 9 18 23 21 14 3-8 -18 -23]; % declination angle: degree dec angle min=1-16 -58 -22 33 43 17 37 15 16 -18 -20 -14]; % declination angle: minute delta=(dec_angle_deg+dec_angle_min/60)*pi/180; % 60 min is 1 degree; timing pi/180 converts it to radian |24 - 25 - 26 - 27 28 29 30 - 31 % solar constant S0=1361; % Two loops to calculate insolation as a function of month and latitude 33 34 for i= 1:length(month) for j = 1: length(lat) 37 % hour angle for sunrise/sunset: note the range for cos is -1 to 1 check=-tan(lat(j))*tan(delta(i)); % hour angle for sunrise/sunset: note the range for cos is -1 to 1 check=-tan(lat(j))*tan(delta(i)); if(check>=1) h=0; % this is the case for polar darkness (no surrise nor sunset) elseif (check=1) h=0; % this is the case for polar darkness (no surrise nor sunset) elseif (check

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago