Patricia_Assignment_1

Part 1: Create 1D Histogram and the Associated PDF

 * 1) Choose 1 variable that is interesting to you, and create a histogram of that variable.
 * Quick Plot: hist(mydata, NBINS) -- try different values of NBINS.
 * What is the best number of bins, why?
 * 1) Using the same variable create a PDF (normalized).

Study case: Hurricane Ike WRF- 4DVar Forecast initialized on 2008091112. In this case only the initial time dynamics are analyzed.
Here is the an example of 10-m Winds (2D) of Hurricane Ike



1 & 2. First Variable Selected: Surface Winds (10-m)
The NBINS selected value was: 50. To see all the details from this variable. It is clear that the most frequent values of windspeed are in the 20-30 m/s range. Figure #1 and #2 :



3. Compute the first 4 moments using a loop over the histogram bins.

 * **Moments:** || **Calculated using the loop** || **Matlab function** ||
 * < 1. First moment: mean || 24.5078 ||< 24.5057 ||
 * < 2. Second Moment: variance || 42.7640 || 42.7336 ||
 * < 3. Third Moment: Skew || -0.2021 || 0.1166 ||
 * 4. Fourth Moment: Kurtosis || 2.5423 || 2.5432 ||

Part 2: Scatter Plot, 2D Histogram/PDF, covariance, and marginal distributions

 * 1) Scatterplot of two variables: ** 10-m Windspeed (m/s) and Surface Pressure (hPa) **




 * These results indicate the strong correlation between "relative higher" pressure values with "weaker" winds and low pressure values with higher/stronger winds. In addition, the eye features are present, indicated by the "lowest" pressure values with almost no winds; calm conditions.

2. Make a 2D histogram of the same data in the scatter plot of Part 2, Question 1
The NBINS selected value was: 30. To see all the details from these variables.

3. Normalize your 2D histogram so that it is a true joint PDF (as in Part 1 Question 2).



4. Compute covariance from the 2D PDF using by looping over the PDF bins, as in Eq. 3.27 and Fig. 3.16, p53-54 in the book.

Covariance from the calculation: __**-31.2057**__ Covariance from the matlab function: 42.7336 **//-30.4803//**
 * //-30.4803//** 108.5095

Part 3: Study a conditional sample
The conditional sample selected was evaluated by the scatterplot shown above. The tails selected were based on two conditions found in that plot. The variables selected to compare with surface winds and pressure are 3-km Relative Vorticity and 3-km Water Vapor Mixing Ratio (QVapor)


 * Condition #1: Relative 'High Pressure' with 'weaker' winds. Pressure (1000-995 hPa) range and Winds (20-25 m/s) range**


 * Condition #2: Lower Pressure values with strongest winds. Pressure (990-980 hPa) range and Winds (35-40 m/s)**

Part 4: Scientific Interpretation
This study investigate the relationship between various dynamical variables during the initial time (model initialization) forecast of Hurricane Ike. The snapshot selected was at 12UTC of September 11, 2008. The model used to create the forecast was the WRF with 4D Variational Data Assimilation (DA).

Let's see the results of part 2 and part 3:
 * Part 2: Scatterplot with histogram
 * As mentioned before, the figure showed the expected results. Area of weaker winds represents two areas of the hurricane structure, the eye and the outer regions. Is confirmed by the pressure values within this range of winds, low pressure (eye region) and higher values (outer region).
 * If we look at the region of weaker winds with lower pressure, i.e eye of the storm, there are only few points. We can interpret that the size of the eye was small. The result is expected because this DA technique assimilate inner core structure with airborne doppler radar observations, which reduce the inner core bias of previous non-DA model forecast.
 * The histogram of pressure show the uni-modal distribution, while the wind histogram show more like a bi-modal distribution.
 * Part 3: Conditional Sample
 * Condition #1: Giving the condition of both variables (weaker winds and higher pressure) that represent in general the outer region of the hurricane, let's see the relative vorticity response. The histogram show symmetric distribution with the most frequent higher value around 0.The water vapor mixing ratio histogram is very similar to the condition #2 in terms of variability of values. But in terms of frequency, higher frequency is observed in this condition than in condition #2. This could be interpret in terms of there is more region/area of the hurricane is covered by this condition rather than in the core region (condition #2).
 * Condition #2: Inner core region (higher winds with low pressure) relative vorticity histogram show an increase of vorticity (more positive values), as expected, because now the rotation rate increase as we move inward the storm. In contrast, the frequency of this values are smaller in comparison with the condition #1. The reason could be that either some values were missed by setting the condition or the high vorticity region was not radially symmetric.

Additional scripts: