2016年3月17日星期四

为你写的一些话



这两年来我们说过的话有些一直记得,有些忘了的,最近也慢慢地蹦了出来。人和人的缘分可能是早已经注定好了的,比如第一天见到你眼前一亮,可惜后来关注点全在塑料盒子上。比如我所有涉外的社交活动都或多或少和你有关,比如我们总能在各个地方偶遇,比如最终我们还是熟悉了起来。

如果第一次你提到可以跳舞的那次,我没那么排斥,如果我们那时候有个契机一起跳舞,应该完全不一样了吧。也许我们变成了无话不说的好朋友,互相倾听和陪伴。也许我们产生了化学反应,从此幸福滴在一起。可能我的龟毛性格,也会让你陷入猜心的苦恼,可能我们也会在某个深夜争论约与不约。但至少那时候,我们,或者我,只用考虑对你的感觉。

在知道你们“在一起”的时候,我的确很震惊。我不否认,其实有点失落,那种失落主要来自于这个人明明是我先认识的,为什么别人都可以发展感情,为什么我一直单着。或许有一点,就那么一点,对你的好感?我不记得了,即使是因为长期的友善以及颜值堆积的好感,在我看到你们凝视对方的眼神后就消失殆尽了。取而代之的正直得不能再正直的不关己事,以及那是别人家的男朋友的认知确立。

可你为什么在这样的定位下接近我?一个正直的女青年被百般撩拨下依然坚定地挥舞友谊大旗~期间想着,热情奔放的性格果然名不虚传?到底是我自作多情还是怎样?他们到底还在不在一起?我要不要问问,啊,不用了,我又看到他们俩了。我不傻也不木,而且你表达得还那么直白明显。我只是在一次次怀疑与否定中,给自己穿上了最坚硬的铠甲。应该用心感受的你的喜欢,我的悸动,都被隔绝了。几个月来,你在各种花样示好,我在各种花样说服自己。我从来没能单纯地享受过我们在一起的时间。而你又怎么能希望我喜欢你呢?

其实那天我真正想说的是,我们先好好相处吧,不要那么着急,一点点来,让我适应从别人的男朋友到我的约会对象的这个转变。可我没能准确地说出来,或者说我没打算准确地说出来。不想给你过多的希望,让你觉得你只要继续这样下去就可以。另外也是对自己没信心,毕竟扪心评估过喜欢上你的可能性,很多东西是一开始就否定了的。

不想再去谈一场没有真心的恋爱。想给对方全心全意的自己,不想只是屈从于被爱的温暖。 不想和你讲过去的故事,教训记在心里就够了。如果有一天我准备好了,而你还在那里,那就让我们恋爱吧。不考虑别人,专注地享受在一起的美好。如果我们最终沦为朋友,我也会感激我们有过一段相知相伴的时间。

就这样吧,我压力好大,明明最该不问世事专心工作的时候,却荒废了那么多。
是时候好好工作,好好享受没有彼此的生活。

2014年9月18日星期四

NCL Overlay[1]

;XY overlay

;----------------------------------------------------------------------
; xy_32.ncl
;
; Concepts illustrated:
;   - Drawing a time series plot
;   - Drawing multiple legends outside an XY plot
;   - Overlaying XY plots on each other
;   - Changing the labels in a legend
;   - Labeling the X axis with nicely-formatted time labels
;----------------------------------------------------------------------
; In order to have the legends side-by-side, instead of one legend
; with 8 lines it in, it is necessary to create 4 XY plots, each with
; its own legend. Each legend is moved to the right or left 
; slightly so they don't overlap.  The plots are all "connected" into
; one plot using "overlay".
;----------------------------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"

begin
  dir = "$NCARG_ROOT/lib/ncarg/data/cdf/"
  a   = addfile(dir + "chi200_ud_smooth.nc","r")
  chi = transpose(a->CHI)
  chi = chi/1.e6                              ; scale for convenience

;---Start the graphics
  wks = gsn_open_wks("ps","xy")

;---Plotting options for time series plot
  res             = True

  res@gsnMaximize = True

  res@gsnDraw     = False      ; Will draw later, after overlaying
  res@gsnFrame    = False      ; all plots

  res@vpWidthF    = 0.8        ; Make plots wider
  res@vpHeightF   = 0.4

  res@trXMinF     = min(chi&time)
  res@trXMaxF     = max(chi&time)
  res@trYMinF     = min(chi)
  res@trYMaxF     = max(chi)

;---Resources for legend
  res@pmLegendDisplayMode    = "Always"              ; turn on legend
  res@pmLegendWidthF         = 0.12                  ; Change width and
  res@pmLegendHeightF        = 0.15                  ; height of legend.
  res@pmLegendOrthogonalPosF = -0.08                 ; move up slightly 
  res@lgLabelFontHeightF     = .011                  ; change font height
  res@lgPerimOn              = False                 ; no box around
  res@lgItemOrder            = (/1,0/)               ; reverse legend

;---Titles
  res@tiMainString           = chi@long_name
  res@tiYAxisString          = ""

;---Turn off some tickmarks
  res@tmXTOn                 = False    ; bottom off
  res@tmYROn                 = False    ; right off

  res@xyLineThicknessF       = 2.0      ; default is 1
  res@xyMonoDashPattern      = True     ; force all solid lines

;--------------------------------------------------
; The time_axis_label function adds additional
; resources to "res" to produce nicely-formatted
; time labels on X axis. This function only works
; if you have a time "units" recognized by the
; cd_calendar function.
;---------------------------------------------------
  restick                = True
  restick@ttmFormat      = "%N/%D/%y"
  time_axis_labels(chi&time,res,restick)

;---Subset of longitudes to plot for the four plots
  lon1_start_idx = 0
  lon1_end_idx   = 1
 

;---Set resources for colors and labels
  colors1 = (/"blue","red"/)

  labels4 = "lon = " + chi&lon(lon4_start_idx:lon4_end_idx)

;---Create the four XY plots
  res@xyLineColors           = colors1
  res@xyExplicitLegendLabels = labels1
  res@pmLegendParallelPosF   = 0.15

  plot1 = gsn_csm_xy(wks,chi&time,chi(lon1_start_idx:lon1_end_idx,:),res)

 

;---Overlay one plot on the other, so they become one plot.
  overlay(plot1,plot2)
  overlay(plot1,plot3)
  overlay(plot1,plot4)

  draw(plot1)            ; This will draw all four plots
  frame(wks)
end





;CONTOUR overlay
;-----------------------------------------------------------------------------------------

 plot = gsn_csm_contour_map_overlay(wks,temp,uwnd,res,sres)  ; create the overlay plot

;--------------------------

 wks = gsn_open_wks("ps","overlay")
 res@gsnFrame     =  False                   ; do not advance the frame
;Create individual plotsand use overlay to combine them
plot = gsn_csm_contour_map(wks,temp,res)    ; create the temperature plot
  plot_ov = gsn_csm_contour(wks,uwnd,sres)    ; create the U-wind plot
  overlay(plot,plot_ov)                       ; overlay the U-wind plot on the temperature plot
  draw(plot)                                  ; draw the temperature plot (with the U-wind plot overlaid)
  frame(wks)                                  ; advance the frame



;-----------------
;Overlaying plots manually by not advancing the frame

 res@gsnFrame     =  False                   ; do not advance the frame

  plot = gsn_csm_contour_map(wks,temp,res)    ; create and draw the temperature plot
  plot2 = gsn_csm_contour_map(wks,uwnd,sres)  ; create and draw the U-wind plot on top of the temperature plot
  frame(wks)                                  ; advance the frame

2014年8月27日星期三

NCL 填色图笔记

现在不是那么烦NCL了,只是有一点烦,呵呵。

来自:http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/examples.shtml
以及http://blog.sina.com.cn/s/articlelist_1157087364_0_1.html


-------------------------------------------------------------------

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

begin

;-----------  基本必备的设置-----------------------------------------
  xwks = gsn_open_wks("x11","plot_name")      ; Open an X11 workstation.

  resources  = True       ; Indicate you want to set some
                                         ; resources.


;--------标题设定------------------
resources@tiMainString    = "Temperature (C)"  ; Create a title.
resources@tiMainString    = pres@long_name

resources@tiMainFont      = 26
resources@tiXAxisFont     = 26
resources@tiYAxisFont     = 26

;--------some useful settings-------------

 res@gsnMaximize        = True     ; maximize plot in frame

res@cnFillMode         = "MeshFill"   ; for faster draw 网眼填充
;--------坐标轴设定------------
  resources@tiXAxisString    = lon@long_name   ;x name
  resources@tiYAxisString    = lat@long_name   ;y name 注意这个@long_name的用法,很实用
  resources@sfXArray         = lon       ;指定X轴的变量
  resources@sfYArray         = lat


;-----------填色----------------------------------------

  resources@cnMonoLineColor = False      ; Turn off the drawing of
                                         ; contours lines in one color.
  resources@cnFillOn          = True        ; Turn on contour line fill.
  res@cnFillDrawOrder = "PreDraw"         ; draw contours first
  resources@cnMonoFillPattern = False       ; Turn off using a single fill
  resources@cnMonoFillPattern     = True     ; Turn solid fill back on.                                          ; pattern.

  resources@cnMonoFillColor   = True
  resources@cnMonoFillColor       = False    ; Use multiple colors.


  resources@cnMonoLineColor   = True


;使用特定的Level值和配色方案对等值区间进行设置
  res@cnLevelSelectionMode = "ExplicitLevels"       ; set explicit contour levels
  res@cnLevels    = (/-30.,-20.,-10.,0.,10.,20./) ; set levels
  res@cnFillColors = (/5,6,7,8,9,10,11/) ; set the colors to be used

;---------- Contour line ------------------------------------------


  resources@cnLineLabelsOn        = False    ; Turn off line labels.
  resources@cnInfoLabelOn         = False    ; Turn off informational
                                             ; label.
  resources@cnLinesOn             = False    ; Turn off contour lines. 等值线不显示

  resources@pmLabelBarDisplayMode = "Always" ; Turn on label bar.
  resources@lbPerimOn             = False    ; Turn off perimeter on
                                             ; label bar.




  plot = gsn_contour(xwks,Z,resources)    ; Draw a contour plot.

;---------- color map ------------------------------------------
;http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml


;---Using the color map to define colors for contours or vectors
  res@cnFillPalette = "BkBlAqGrYeOrReViWh200"
  res@vcLevelPalette = "BkBlAqGrYeOrReViWh200"

;---Reading the colormap into an N x 4 (RGBA) array
  cmap = read_colormap_file("ncl_default")

;---Using the color map to define a color map for the workstation
  gsn_define_colormap(wks,"BlueYellowRed")


;---define your own

  cmap = (/(/0.,0.,0./),(/1.,1.,1./),(/.1,.1,.1/),(/.15,.15,.15/),\
         (/.2,.2,.2/),(/.25,.25,.25/),(/.3,.3,.3/),(/.35,.35,.35/),\
         (/.4,.4,.4/),(/.45,.45,.45/),(/.5,.5,.5/),(/.55,.55,.55/),\
         (/.6,.6,.6/),(/.65,.65,.65/),(/.7,.7,.7/),(/.75,.75,.75/),\
         (/.8,.8,.8/),(/.85,.85,.85/)/)

  gsn_define_colormap(xwks,cmap)          ; Define a new color map.


;-----------------总算能绘图了-----------------------------------------------------
  plot = gsn_contour(xwks,pres,resources) ; Draw a contour plot.


;--------------叠加绘图的话------------------------------------------------------

gsn_csm_contour_map_overlay(wks,pdata,vdata,res,res2)

overlay(map,wplot) ;叠加plot给之前的map
  draw(map)

  delete(plot)       ; Clean up.
  delete(temp)
  delete(resources)
end

2014年8月4日星期一

关于学习以及个人提升

经常想不出中文的合适表达是怎么回事,难道以后我会变成那种中英文混杂的类型。。。。????

不管了,反正总算找个地方开始记录自己对这三年(or 两年半)的职业规划啦。

R 算是一个契机,让我好好地从头学习一门工具,虽然我会的也不少,但是精通的真的木有。

这个星期本身上课就够呛,结合课程内容,主要进行:统计分析和绘图两样(话说R的学习目标其实也就是这俩吧),入门知识掌握。

加油!休息五分钟后开始看分析,明天马上要用到了呢!