%Plots profiles and countours + PBL heights for one day at one location
function[diurnalCycle_csv,smoothDiurnalCycle_csv,time_vector_unsmooth_csv,time_vector_smooth_csv,actualLevels_csv,actualProfiles_csv,emergeTime_csv,emergeHeight_csv,diurnalCycle_nc,smoothDiurnalCycle_nc,time_vector_unsmooth_nc,time_vector_smooth_nc,actualLevels_nc,actualProfiles_nc,emergeTime_nc,emergeHeight_nc,stationNum,latitude,longitude,altitude] = getDiurnal(stationNum,month,day,year,dataSourceOption,dates,levelheights,snr,avgtime_csv,heightVec_nc,utcTime_nc,localTime_nc,cloud_fracs_nc,snr_grid_nc,mask_for_snr,latitude,longitude,altitude)

%dataSourceOption='csv' will use the SNR data from a .csv file (which
%can be produced by following the 'Produce Restructured CSV files from UKMO Raw 
%Wind Profiler Data Pathway' described in the accompanying paper and README). 
%This option is recommended if you would like to utilize UKMO data from after 2020
%or if you would like to alter in any way how the SNR data was restructured
%in the provided GRWP_SNRgrid data set.
%dataSourceOption='netcdf' will use the SNR from the .netcdf files
%provided in the GRWP_SNRgrid dataset. This option is recommended for convenience
%and speed as the SNR data has already been restructured for efficient use and
%cloud fractions have already been calculated.
%dataSourceOption='both' will use the data from both the corresponding
%.csv and .netcdf file to allow for comparison to ensure they are producing
%the same results.

    diurnalCycle_csv=NaN;
    smoothDiurnalCycle_csv=NaN;
    time_vector_unsmooth_csv=NaN;
    time_vector_smooth_csv=NaN;
    actualLevels_csv=NaN;
    actualProfiles_csv=NaN;
    emergeTime_csv=NaN;
    emergeHeight_csv=NaN;
    diurnalCycle_nc=NaN;
    smoothDiurnalCycle_nc=NaN;
    time_vector_unsmooth_nc=NaN;
    time_vector_smooth_nc=NaN;
    actualLevels_nc=NaN;
    actualProfiles_nc=NaN;
    emergeTime_nc=NaN;
    emergeHeight_nc=NaN;


    if strcmp(dataSourceOption,'csv') || strcmp(dataSourceOption,'both')
        [diurnalCycle_csv,smoothDiurnalCycle_csv,time_vector_smooth_csv,~,~,actualLevels_csv,actualProfiles_csv,~,~,~,~,~,~,~,~,emergeTime_csv,emergeHeight_csv,time_vector_unsmooth_csv,~,~,~,~,~]=getDiurnal_csv(month,day,year,levelheights,snr,dates,avgtime_csv);
    end

    if strcmp(dataSourceOption,'netcdf') || strcmp(dataSourceOption,'both')   
        [diurnalCycle_nc,smoothDiurnalCycle_nc,time_vector_smooth_nc,~,~,actualLevels_nc,actualProfiles_nc,~,~,~,~,emergeTime_nc,emergeHeight_nc,time_vector_unsmooth_nc,~,~,~,~,~,~,~,~,~,~]=getDiurnal_nc(month,day,year,heightVec_nc,snr_grid_nc,mask_for_snr,localTime_nc,utcTime_nc,cloud_fracs_nc);
    end



end



