original_docstring:  Read in netCDF grid and pull out specific gridbox 
docstring: Read in netCDF grid and pull out specific gridbox
docstring_tokens: Read in netCDF grid and pull out specific gridbox
code: def ExtractGB(FileName,LongPoint,LatPoint,GBarr,YrStart,YrEnd,NameSources,ThisSource):
      ''' Read in netCDF grid and pull out specific gridbox '''
      f=netcdf.netcdf_file(FileName,'r')
      if (NameSources[ThisSource] == 'HadISDH.2.0.1.2014p'):
          var=f.variables['t_anoms']
      else:
          var=f.variables['temperature_anomaly']
      tmpvar=np.array(np.transpose(var.data[:]))
      f.close()
      
      lnn=np.int(np.floor((LongPoint-(-180))/5.))
      ltt=np.int(np.floor((LatPoint-(-90))/5.))
      st=(YrStart[0]-YrStart[ThisSource+1])*12
      ed=((YrEnd[0]+1)-YrStart[ThisSource+1])*12
      
      print(lnn,ltt,st,ed)
      
      GBarr=tmpvar[lnn,ltt,st:ed+1]
  
      return GBarr
code_tokens: def ExtractGB ( FileName , LongPoint , LatPoint , GBarr , YrStart , YrEnd , NameSources , ThisSource ) : f = netcdf . netcdf_file ( FileName , 'r' ) if ( NameSources [ ThisSource ] == 'HadISDH.2.0.1.2014p' ) : var = f . variables [ 't_anoms' ] else : var = f . variables [ 'temperature_anomaly' ] tmpvar = np . array ( np . transpose ( var . data [ : ] ) ) f . close ( ) lnn = np . int ( np . floor ( ( LongPoint - ( - 180 ) ) / 5. ) ) ltt = np . int ( np . floor ( ( LatPoint - ( - 90 ) ) / 5. ) ) st = ( YrStart [ 0 ] - YrStart [ ThisSource + 1 ] ) * 12 ed = ( ( YrEnd [ 0 ] + 1 ) - YrStart [ ThisSource + 1 ] ) * 12 print ( lnn , ltt , st , ed ) GBarr = tmpvar [ lnn , ltt , st : ed + 1 ] return GBarr
short_docstring: Read in netCDF grid and pull out specific gridbox
short_docstring_tokens: Read in netCDF grid and pull out specific gridbox
comment: ''' Read in netCDF grid and pull out specific gridbox '''