%Plots profiles and countours + PBL heights for one day at one location
%MAC-USERS: If you are using the argument pblhSourceOption=1, be sure to
%follow the file path instructions in plotProfilesContours_nc (or in
%plotProfiles_contours_csv if you have produced your own csv files and wish
%to read from them)
function[diurnalCycle_csv,smoothDiurnalCycle_csv,polyEvalTimes_csv,diurnalCycle_nc,smoothDiurnalCycle_nc,polyEvalTimes_nc,stationNum,latitude,longitude,altitude] = main_plotProfilesContours(stationNum, year, month, day,dataSourceOption,pblhSourceOption,dates,levelheights,snr,cloud_fracs_csv,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;
polyEvalTimes_csv=NaN;
diurnalCycle_nc=NaN;
smoothDiurnalCycle_nc=NaN;
polyEvalTimes_nc=NaN;


if strcmp(dataSourceOption,'csv') || strcmp(dataSourceOption,'both')
    [diurnalCycle_csv,smoothDiurnalCycle_csv,polyEvalTimes_csv,~,~,~,~,~,~,~,~,~,~,~]=plotProfilesContours_csv(month,day,year,levelheights,snr,dates,avgtime_csv,stationNum,pblhSourceOption);
end

if strcmp(dataSourceOption,'netcdf') || strcmp(dataSourceOption,'both')   
  [diurnalCycle_nc,smoothDiurnalCycle_nc,polyEvalTimes_nc,~,~,~,~,~,~,~,~,~,~,~,~]=plotProfilesContours_nc(month,day,year,heightVec_nc,snr_grid_nc,mask_for_snr,localTime_nc,utcTime_nc,cloud_fracs_nc,stationNum,pblhSourceOption);
end



end



