Ejemplo n.º 1
0
  thpgrad = dpgradrange[0][0]
  #----------------------------
  psldir_root     = "/media/disk2/data/JRA25/sa.one.%s/6hr/PRMSL"%(model)
  pgraddir_root   = "/media/disk2/out/JRA25/sa.one.%s/6hr/pgrad"%(model)
  lifedir_root    = "/media/disk2/out/JRA25/sa.one.%s/6hr/life"%(model)
  nextposdir_root = "/media/disk2/out/JRA25/sa.one.%s/6hr/nextpos"%(model)
  #************************************
  dtrack     = {}
  for iclass in lclass:
    dtrack[iclass] = []
  #------------------------------------
  for year in range(iyear, eyear+1):
    #************************
    # load TCs
    #------------------------
    dTC  = tc_func.ret_ibtracs_dpyxy_saone(year)

    #------------------------
    for mon in lmon:
      eday = calendar.monthrange(year,mon)[1]
      ###############
      ## no leap
      ###############
      #if (mon==2)&(calendar.isleap(year)):
      #  eday = calendar.monthrange(year,mon)[1] -1
      #else:
      #  eday = calendar.monthrange(year,mon)[1]
  
      #if singleday == True:
      #  eday = iday
      ##############
 
 
 for iclass in lclass:
   thgrad_min    = dpgradrange[iclass][0]
   thgrad_max    = dpgradrange[iclass][1]
 
   #---------------------
   # for only figure, comment out from here
   #---------------------
   i = 0
   for year in range(iyear, eyear+1):
     #***********************
     #-- TC best track
     #-----------------------
     if bsttc == True:
       ddatbst = tc_func.ret_ibtracs_dpyxy_saone(year)
     #***********************
     for mon in lmon:
       eday  = calendar.monthrange(year, mon)[1]
       if singleday == True:
         eday = iday
       #---- dummy ------------------------------
       a2one             = ones([ny_eqgrid, nx_eqgrid], float32)
       
       a2sum_eqgrid      = zeros([ny_eqgrid, nx_eqgrid], float32)
       a2num_eqgrid      = zeros([ny_eqgrid, nx_eqgrid], float32)
       #---- dummy for cor. coef ----------------
       a2cor_num         = zeros([ny_eqgrid, nx_eqgrid], float32)
       a2cor_SA          = zeros([ny_eqgrid, nx_eqgrid], float32)
       a2cor_SB          = zeros([ny_eqgrid, nx_eqgrid], float32)
       a2cor_SAB         = zeros([ny_eqgrid, nx_eqgrid], float32)