original_docstring:  Calculate climatology for each month if 50% of months present 
docstring: Calculate climatology for each month if 50% of months present
docstring_tokens: Calculate climatology for each month if 50% of months present
code: def CalcAnoms(GBarr,StClim,EdClim,TheMDI):
      ''' Calculate climatology for each month if 50% of months present '''
      ''' Get climate anomalies for all months '''
      GBarr=np.reshape(GBarr,(len(GBarr)/12,12))
      for mm in range(12):
          subarr=GBarr[:,mm]
  	climarr=GBarr[StClim:EdClim+1,mm]
  	climgots=np.where(climarr != TheMDI)[0]
  	gots=np.where(subarr != TheMDI)[0]
  	if len(climgots) >= 15:
  	    subarr[gots]=subarr[gots]-np.mean(climarr[climgots])
  	else:
  	    subarr[:]=TheMDI
  	GBarr[:,mm]=subarr
      GBarr=np.reshape(GBarr,np.size(GBarr))	
  	
      return GBarr
code_tokens: def CalcAnoms ( GBarr , StClim , EdClim , TheMDI ) : ''' Get climate anomalies for all months ''' GBarr = np . reshape ( GBarr , ( len ( GBarr ) / 12 , 12 ) ) for mm in range ( 12 ) : subarr = GBarr [ : , mm ] climarr = GBarr [ StClim : EdClim + 1 , mm ] climgots = np . where ( climarr != TheMDI ) [ 0 ] gots = np . where ( subarr != TheMDI ) [ 0 ] if len ( climgots ) >= 15 : subarr [ gots ] = subarr [ gots ] - np . mean ( climarr [ climgots ] ) else : subarr [ : ] = TheMDI GBarr [ : , mm ] = subarr GBarr = np . reshape ( GBarr , np . size ( GBarr ) ) return GBarr
short_docstring: Calculate climatology for each month if 50% of months present
short_docstring_tokens: Calculate climatology for each month if 50% of months present
comment: ''' Calculate climatology for each month if 50% of months present '''$SEP$''' Get climate anomalies for all months '''