ENSO.ITCZ

ENSO.ITCZ.ITCZ_lat_x(var, lon, lat, weighted=True)[source]

Return the latitude of the ITCZ/SPCZ as a function of longitude with the option of being weighted by the intensity of the ITCZ/SPCZ

Parameters:
  • var (numpy.ndarray) – precipitation (...,lat,lon)
  • lon (numpy.array) – longitudes
  • lat (numpy.array) – latitudes
  • weighted (bool) – default True
Returns:

{‘NP’:latitudes (numpy array) of the ITCZ, ‘SP’:latitudes (numpy array) of the SPCZ}

Return type:

dict

ENSO.ITCZ.amp_sum(var, lon, lat)[source]

Return the sum for the ITCZ and SPCZ

Parameters:
  • var (numpy 2d array) – precipitation (lat,lon)
  • lon (numpy 1d array) – longitudes
  • lat (numpy 1d array) – latitudes
Returns:

dict(“NP”=for northern hemisphere, “SP”=for southern hemisphere)

ENSO.ITCZ.analysis(var, thres)[source]

Perform an analysis on the ITCZ pattern

Parameters:
Returns:

dict(“NP”=dict(key=[‘y0’,’x0’,’width’,’slope’,’y-intercept’,’amp’]),

“SP” : same as above }

where y0 is the latitude of the max zonal mean;

width is the gaussian width of the ITCZ/SPCZ across itself slope;

y-intercept gives the location of the ITCZ/SPCZ as lat = y-intercept + slope * lon

This function requires the GeoDAT library

ENSO.ITCZ.idealized(amp, x, y, x_loc, y_loc, slope, x_width, y_width, return_Variable=False)[source]

Return a 2D numpy array or a geodat.nc.Variable with a gaussian profile

Parameters:
  • amp (numeric) – amplitude of the profile
  • x (numpy 1d or 2d array) – the x axis
  • y (numpy 1d or 2d array) – the y axis
  • x_loc (numeric) – x coordinate for the maximum of the gaussian profile
  • y_loc (numeric) – y coordinate for the maximum of the gaussian profile
  • slope (numeric) – rotate the gaussian profile so that it makes an angle arctan(slope) with the horizontal axis
  • x_width (numeric) – width, standard deviation of the profile in the x direction (before rotation)
  • y_width (numeric) – wifth, standard deviation of the profile in the y direction (before rotation)
  • return_Variable (bool) –

    whether or not a geodat.nc.Variable is returned (supported if GeoDat is installed)

Returns:

numpy.ndarray or geodat.nc.Variable if return_Variable is True

ENSO.ITCZ.lines(precip, x1d, y1d, thres)[source]

Locate the ITCZ and SPCZ orientations (assumed straight line).

Parameters:
  • precip (numpy 2d array) –
  • x1d (numpy 1d array) – longitude
  • y1d (numpy 1d array) – latitude
  • thres (function) – a function that takes precip as the only argument, the result is used as the threshold for precipitation. e.g. lambda precip: numpy.percentile(precip,70.)
Returns:

{‘NP’: [slope,intercept],’SP’:[slope,intercept]}

Return type:

dict

ENSO.ITCZ.lines_var(var, thres)[source]

Shortcut for using lines with geodat.nc.Variable

Parameters:
  • var (geodat.nc.Variable) – precipitation
  • thres (function) – see ENSO.ITCZ.lines()
Returns:

{‘NP’: [slope,intercept],’SP’:[slope,intercept]}

Return type:

dict

This function requires the GeoDAT library

ENSO.ITCZ.precipfunc(var, region={'lat': (-20.0, 20.0), 'lon': (150.0, 260.0)})[source]

Select the region and perform time average

Parameters:
  • var (geodat.nc.Variable) –
  • region (dict) –
Returns:

geodat.nc.Variable

This function requires the GeoDAT library

ENSO.ITCZ.width(var, lon, lat, thres)[source]

Find the slopes of the central axes of the ITCZ; rotate the field and then find the widths of the ITCZ/SPCZ

Parameters:
  • var (numpy 2d array) – of shape (lat,lon)
  • lon (numpy 1d array) – longitudes
  • lat (numpy 1d array) – latitudes
  • thres (function) – a function that takes precip as the only argument, the result is used as the threshold for precipitation. e.g. lambda precip: numpy.percentile(precip,70.)
Returns:

{‘NP’:width in degree for the northern hemisphere, ‘SP’:same but for the southern hemisphere}

Return type:

dict

ENSO.ITCZ.x0(var, lon, lat)[source]

Find the longitude of the ITCZ/SPCZ where the rainfall is heaviest

Parameters:
  • var (numpy 2d array) – precipitation (lat,lon)
  • lon (numpy 1d array) – longitudes
  • lat (numpy 1d array) – latitudes
Returns:

{‘NP’:for northern hemisphere, ‘SP’:for southern hemisphere}

Return type:

dict

ENSO.ITCZ.xave_max(var, lon, lat)[source]

Compute the zonal average and then return the max for ITCZ and SPCZ

Parameters:
  • var (numpy 2d array) – precipitation (lat,lon)
  • lon (numpy 1d array) – longitudes
  • lat (numpy 1d array) – latitudes
Returns:

{‘NP’:for northern hemisphere, ‘SP’:for southern hemisphere}

Return type:

dict

ENSO.ITCZ.y0(var, lon, lat)[source]

Find the latitude of the ITCZ/SPCZ where the rainfall is heaviest

Parameters:
  • var (numpy 2d array) – precipitation (lat,lon)
  • lon (numpy 1d array) – longitudes
  • lat (numpy 1d array) – latitudes
Returns:

{‘NP’:latitude (scalar) of the ITCZ, ‘SP’:latitude (scalar) of the SPCZ}

Return type:

dict

Fork me on GitHub