function WriteWvlFile(Wvl,TempK,PressureMB,XSQY_ProgramDir)

nAvogadro = 6.0222E+23;
Rgas = 8.315;
AirDen = PressureMB*1e-4*nAvogadro/Rgas/TempK; 

XSQY_Path = [XSQY_ProgramDir,'inputs\Wvl_Input.txt'];
fidWvl = fopen(XSQY_Path,'w');

nWvl =length(Wvl);

fprintf(fidWvl,'%.3f\n',TempK);
fprintf(fidWvl,'%.3g\n',AirDen);
fprintf(fidWvl,'%i\n',nWvl);

for iWvl =1:nWvl
    fprintf(fidWvl,'%.3f\n',Wvl(iWvl));
end

fclose(fidWvl);