;;;;------------------------------------------------------------ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PRO WRITE_McIDASV_NetCDF,input, out_pre fdate=STRTRIM(input.adate.yy)+STRTRIM(input.adate.mm)+STRTRIM(input.adate.dd)+'_'+ $ STRTRIM(input.adate.hrs)+STRTRIM(input.adate.mins) ;;+STRTRIM(input.adate.secs) output=out_pre + fdate + '.nc' ; cdfid=NCDF_CREATE(output, /clobber) ww=size(input.lat, /dimensions) yy=LONG(ww(1)) & xx=LONG(ww(0)) zz=LONG(101) & tt=LONG(2378) ydimid =ncdf_dimdef(cdfid, 'Along_Track_Y', yy) xdimid =ncdf_dimdef(cdfid, 'Cross_Track_X', xx) zdimid =ncdf_dimdef(cdfid, 'Pressure_Levels', zz) ;;;pressure levels tdimid =ncdf_dimdef(cdfid, 'Total_Channels', tt) ;;;Emissivity of full spectrum ;;;; variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;Write time ;; varid0= ncdf_vardef(cdfid, 'validTime', /double) ;; ncdf_attput, cdfid, varid0, 'units' , 'Seconds since 1970-1-1 00:00:00.00 0:00' ;; ;;;;;;;Write Latiudes varid1= ncdf_vardef(cdfid, 'lat', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid1, 'long_name' , 'latitudes' ncdf_attput, cdfid, varid1, 'units' , 'Degrees' ncdf_attput, cdfid, varid1, 'valid_range' , '90.0, -90.0' ncdf_attput, cdfid, varid1, '_FillValue' , -9999.0 ;;;;;;;Write Longitudes varid2= ncdf_vardef(cdfid, 'lon', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid2, 'long_name' , 'longitudes' ncdf_attput, cdfid, varid2, 'units' , 'Degrees' ncdf_attput, cdfid, varid2, 'valid_range' , '180.0, -180.0' ncdf_attput, cdfid, varid2, '_FillValue' , -9999.0 ;;; ;;; ;;;;;;;Write Surface Skin Temperature ;;; varid3= ncdf_vardef(cdfid, 'TSurfStd', [xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid3, 'long_name' , 'Surface Skin Temp.' ;;; ncdf_attput, cdfid, varid3, 'units' , 'Kelvin' ;;; ;;; ;;;;;;;Write 101 Vertical Retrievals of Temperature ;;; varid4= ncdf_vardef(cdfid, 'TAirStd', [zdimid, xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid4, 'long_name' , '101 Vertical Retrievals of Temp.' ;;; ncdf_attput, cdfid, varid4, 'units' , 'Kelvin' ;;;;;;;Write Total Precipitable Water Vapor Array varid5= ncdf_vardef(cdfid, 'totH2Ostd', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid5, 'long_name' , 'Total Precipitable Water Vapor' ncdf_attput, cdfid, varid5, 'units' , 'mm' ncdf_attput, cdfid, varid5, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid5, 'valid_range' , '33.0 0.0' ncdf_attput, cdfid, varid5, '_FillValue' , -9999.0 ;;; ;;; ;;;;;;;Write 101 Vertical Retrievals of Mixing Ratio ;;; varid6= ncdf_vardef(cdfid, 'H2OMMRStd', [zdimid, xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid6, 'long_name' , '101 Vertical Retrievals of Mixing Ratio' ;;; ncdf_attput, cdfid, varid6, 'units' , 'g/kg' ;;;;;;;Write Total Ozone Array varid7= ncdf_vardef(cdfid, 'totO3std', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid7, 'long_name' , 'Total Ozone Array' ncdf_attput, cdfid, varid7, 'units' , 'Dobson' ncdf_attput, cdfid, varid7, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid7, 'valid_range' , '1000.0 0.0' ;;;???????????????????????? ncdf_attput, cdfid, varid7, '_FillValue' , -9999.0 ;;; ;;;;;;;Write 101 Vertical Rerievals of Ozone (ppmv) ;;; varid8= ncdf_vardef(cdfid, 'O3VMRStd', [zdimid, xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid8, 'long_name' , '101 Vertical Rerievals of Ozone' ;;; ncdf_attput, cdfid, varid8, 'units' , 'ppmv' ;;; ;;; ;;;;;;;Write Emissivity for the full AIRS spectrum ;;; varid9= ncdf_vardef(cdfid, 'emisIRStd', [tdimid, xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid9, 'long_name' , 'Surface_Emissivity_Wavelengths' ;;; ncdf_attput, cdfid, varid9, 'units' , 'None' ;;;;;;;Write Cloud Top Pressure varid10= ncdf_vardef(cdfid, 'Cloud_Top_Pressure', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid10, 'long_name' , 'Cloud Top Pressure' ncdf_attput, cdfid, varid10, 'units' , 'mb' ncdf_attput, cdfid, varid10, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid10, 'valid_range' , '6000.0 0.0' ncdf_attput, cdfid, varid10, '_FillValue' , -9999.0 ;;; ;;;;;;;Write Quality flag array ;;; varid11= ncdf_vardef(cdfid, 'Quality_Flag', [xdimid, ydimid], /float) ;;; ncdf_attput, cdfid, varid11, 'long_name' , 'Quality flags' ;;; ncdf_attput, cdfid, varid11, 'units' , 'None' ;;;;;;;Write Lifted Index varid12= ncdf_vardef(cdfid, 'Lifted_Index', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid12, 'LI' , 'Lifted Index' ncdf_attput, cdfid, varid12, 'units' , 'Celsius' ncdf_attput, cdfid, varid12, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid12, 'valid_range' , '25.0 -15.0' ncdf_attput, cdfid, varid12, '_FillValue' , -9999.0 ;;;;;;;Write Convective Avalilable Potential Energy (CAPE) varid13= ncdf_vardef(cdfid, 'CAPE', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid13, 'long_name' , 'Convective Avalilable Potential Energy' ncdf_attput, cdfid, varid13, 'units' ,'J/Kg' ncdf_attput, cdfid, varid13, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid13, 'valid_range' , '6000.0 0.0' ncdf_attput, cdfid, varid13, '_FillValue' , -9999.0 ;;;;;;;Write Precipitable Water 1 (surface - 900 mbar) varid14= ncdf_vardef(cdfid, 'PW1', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid14, 'long_name' , 'Precipitable Water 1' ncdf_attput, cdfid, varid14, 'units' , 'mm' ncdf_attput, cdfid, varid13, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid14, 'valid_range' , '66.0 0.0' ncdf_attput, cdfid, varid14, '_FillValue' , -9999.0 ;;;;;;;Write Precipitable Water 2 (900 - 700 mbar) varid15= ncdf_vardef(cdfid, 'PW2', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid15, 'long_name' , 'Precipitable Water 2' ncdf_attput, cdfid, varid15, 'units' , 'mm' ncdf_attput, cdfid, varid15, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid15, 'valid_range' , '66.0 0.0' ncdf_attput, cdfid, varid15, '_FillValue' , -9999.0 ;;;;;;;Write Precipitable Water 3 (700 - 300 mbar) varid16= ncdf_vardef(cdfid, 'PW3', [xdimid, ydimid], /float) ncdf_attput, cdfid, varid16, 'long_name' , 'Precipitable Water 3' ncdf_attput, cdfid, varid16, 'units' , 'mm' ncdf_attput, cdfid, varid16, 'coordinates' ,'latitude longitude' ncdf_attput, cdfid, varid16, 'valid_range' , '66.0 0.0' ncdf_attput, cdfid, varid16, '_FillValue' , -9999.0 ;;; ;;; ;;;;;;;Write the 101 pressure levels ;;; varid17= ncdf_vardef(cdfid, 'plevels', [zdimid], /float) ;;; ncdf_attput, cdfid, varid17, 'long_name' , '101 Pressure Levels' ;;; ncdf_attput, cdfid, varid17, 'units' , 'mb' ;;; ;;; ;;;;;;;Write the 101 retrieval levels ;;; varid18= ncdf_vardef(cdfid, 'rlevels', [zdimid], /float) ;;; ncdf_attput, cdfid, varid18, 'long_name' , '101 Retrieval Levels' ;;; ncdf_attput, cdfid, varid18, 'units' , 'None' ;;; ;;;global variables eastconus ncdf_attput, cdfid, 'depictorName', 'ABImesoscale02' , /global ncdf_attput, cdfid, 'projName','LAMBERT', /global ncdf_attput, cdfid, 'projIndex',LONG(3), /global ;;; ncdf_attput, cdfid, 'lat00', 34.0977, /global ;;; ncdf_attput, cdfid, 'lon00', -99.2358, /global ;;; ncdf_attput, cdfid, 'latNxNy', 40.7122, /global ;;; ncdf_attput, cdfid, 'lonNxNy', -90.8786,/global ncdf_attput, cdfid, 'centralLat', 37.2944 ,/global ncdf_attput, cdfid, 'centralLon', -95.1339 ,/global ;;; ncdf_attput, cdfid, 'latDxDy', 37.27 ,/global ;;; ncdf_attput, cdfid, 'lonDxDy',-95.13 ,/global ;;; ncdf_attput, cdfid, 'dyKm', 2.00 ,/global ;;; ncdf_attput, cdfid, 'dxKm', 2.00 ,/global ;;; ncdf_attput, cdfid, 'rotation', 0.0 ,/global ;;; ncdf_attput, cdfid, 'xMin', 0.0 ,/global ;;; ncdf_attput, cdfid, 'xMax', 0.0 ,/global ;;; ncdf_attput, cdfid, 'yMin', 0.0 ,/global ;;; ncdf_attput, cdfid, 'yMax', 0.0 ,/global ncdf_control, cdfid, /endef aa=WHERE(input.tpw NE -9999.0) input.tpw(aa)= input.tpw(aa)*10 bb=WHERE(input.pw1 NE -9999.0) input.pw1(bb)= input.pw1(bb)*10 cc=WHERE(input.pw2 NE -9999.0) input.pw2(cc)= input.pw2(cc)*10 dd=WHERE(input.pw3 NE -9999.0) input.pw3(dd)= input.pw3(dd)*10 ncdf_varput, cdfid, varid1, input.lat ;Latitudes ncdf_varput, cdfid, varid2, input.lon ;Longitudes ;; ncdf_varput, cdfid, varid3, input.sfct ;Surface Skin Temperature ;; ncdf_varput, cdfid, varid4, input.tprof ;101 Vertical Retrievals of Temperature ncdf_varput, cdfid, varid5, input.tpw ;Total Precipitable Water Vapor ;; ncdf_varput, cdfid, varid6, input.wprof ;101 Vertical Retrievals of Mixing Ratio ncdf_varput, cdfid, varid7, input.toto ;Total Ozone Array ;; ncdf_varput, cdfid, varid8, input.ozone ;101 Vertical Rerievals of Ozone ;; ncdf_varput, cdfid, varid9, input.emiss ;Emissivity for the full AIRS spectrum ncdf_varput, cdfid, varid10, input.ctp ;Cloud Top Pressure ;; ncdf_varput, cdfid, varid11, input.qf ;Quality flag array ncdf_varput, cdfid, varid12, input.li ;Lifted Index ncdf_varput, cdfid, varid13, input.cape ;Convective Avalilable Potential Energy ncdf_varput, cdfid, varid14, input.pw1 ;Precipitable Water 1 ncdf_varput, cdfid, varid15, input.pw2 ;Precipitable Water 2 ncdf_varput, cdfid, varid16, input.pw3 ;Precipitable Water 3 ;; ncdf_varput, cdfid, varid17, input.plevs ;AIRS pressure levels ;; ncdf_varput, cdfid, varid18, input.rlevs ;AIRS Retrieval levels ncdf_close, cdfid print, 'WRITE_McIDASV_NetCDF Done' END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;----------------------------------------------------------------------------- ;;;;; ;;;;; IF (ii GT 6) THEN vmax=(300/scale1) ELSE vmax=(1/scale1) ;;;;; varid1= ncdf_vardef(cdfid, dname1, [ydimid, xdimid], /SHORT) ;;;;; ncdf_attput, cdfid, varid1, 'long_name' , lname1 ;;;;; ncdf_attput, cdfid, varid1, 'units' , units1 ;;;;; ncdf_attput, cdfid, varid1, 'central_wavelength' , FLOAT(cwlength1) ;;;;; ;;ncdf_attput, cdfid, varid1, 'coordinates' ,'latitude longitude' ;;;;; ncdf_attput, cdfid, varid1, 'valid_min' , 0 ;;;;; ncdf_attput, cdfid, varid1, 'valid_max' , vmax ;;;;; ncdf_attput, cdfid, varid1, 'scale_factor' , scale1 ;;;;; ncdf_attput, cdfid, varid1, '_FillValue' , miss1