FNL數(shù)據(jù)中,包含了Ice Cover數(shù)據(jù),在北極地區(qū)就是Sea ICE张症。
用wgrib2將FNL原始的grib2格式轉(zhuǎn)換成netcdf格式:
wgrib2 gdas1.fnl0p25.2016072400.f00.grib2 -netcdf gdas1.fnl0p25.2016072400.f00.nc
然后用NCL繪圖如下能庆,發(fā)腳本紀(jì)念。
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
;************************************************
begin
;************************************************
; read in atmospheric data
;************************************************
? a = addfile("gdas1.fnl0p25.2016072400.f00.nc","r")
? icec = a->ICEC_surface(0,:,:)
? ;------for time------------------
? times? = a->time
? times2? = times
? times2? = times + todouble(3600*8)? ; time to BJT
? format? = "%Y-%N-%D_%H:%M"
? stime? = cd_string(times2 , format) ;simulation time
;************************************************
; create plot
;************************************************
? wks = gsn_open_wks("png","polar_icec_ste")? ? ? ? ? ? ; send graphics to PNG file
? ;gsn_define_colormap(wks, "wgne15")
? cmap? = RGBtoCmap("./Color_seaice.rgb")
? res? ? ? ? ? ? ? ? ? ? ? ? = True
? res@gsnMaximize? ? ? ? ? ? = True
? res@gsnDraw? ? ? ? ? ? ? ? = False
? res@gsnFrame? ? ? ? ? ? ? = False
? res@mpProjection? ? ? ? ? = "Stereographic"
? res@mpCenterLatF? ? ? ? ? = 90? ? ? ? ? ? ? ; Centered over north pole
? res@mpCenterLonF? ? ? ? ? = 90? ? ? ? ? ? ? ; Centered over north pole
? res@mpLimitMode? ? ? ? ? ? = "LatLon"
? res@mpMinLatF? ? ? ? ? ? ? = 60.0
? res@pmTickMarkDisplayMode? = "Always"? ? ? ? ; Nicer tickmark labels
? res@mpGridAndLimbOn? ? ? ? = True? ? ? ? ? ? ; Turn on lat/lon grid
? ;res@gsnMajorLatSpacing? ? = 10.? ;---doesn't work---
? ;res@mpGridSpacingF? ? ? ? = 10.
? res@mpGridLonSpacingF? ? ? = 15.0
? res@mpGridLatSpacingF? ? ? = 10.0
? res@mpGridLineDashPattern? = 2? ? ? ? ? ? ? ? ; Dashed lines
? res@mpFillOn? = True;False
? res@mpLandFillColor? ? = "grey";"transparent"? ; fill land with "dafult"
? res@mpFillDrawOrder? ? = "PostDraw"?
? res@cnFillOn? ? ? ? ? = True? ? ? ? ? ? ? ? ? ; color fill
? res@cnLinesOn? ? ? ? = False? ? ? ? ? ? ? ? ; no contour lines
? res@cnFillColors? ? ? = cmap
? res@cnLevelSelectionMode = "ExplicitLevels"
? res@cnLevels? ? ? ? ? = fspan(0.15,0.95,17)
? res@lbLabelStride? ? = 3 ;
? res@tiMainString? ? ? = stime+" (BJT)"
? plot = gsn_csm_contour_map(wks,icec({50.:90.},:),res)? ? ? ? ? ? ? ? ? ; Create plot
;---Create lat/lon arrays for location of latitude labels.
? lats = ispan(60,90,10)
? nlat = dimsizes(lats)
? lons = new(nlat,integer)
? lons = res@mpCenterLonF;90 ;
;---Resources for text strings
? txres? ? ? ? ? ? ? = True
? txres@txFontHeightF = 0.015
? dum = gsn_add_text(wks,plot,""+lats+"~F34~0~F~N",lons,lats,txres)
;---Drawing the plot will draw the attached latitude labels
? draw(plot)
? frame(wks)
end