def lon_lat_to_IJ(lon, lat, lon_size=5, lat_size=4):
    """
    Transform (lon, lat) coordinates to 4x5 grid

    Parameters:
        lon      (float) : longitude
        lat      (float) : latitude
        lon_size (int)   : number of degrees in lon grid
                           default is 5
        lat_size (int)   : number of degress in lat grid
                           default is 4

    Returns:
        (I, J) longitude/latitude coordinates

    NOTES:
    - this code is copied from the ./code/modified/grid_mod.f
      - the primary difference is that python arrays are indexed from 0
    """
    LON_idx = int((lon + 180) / lon_size + .5)
    LAT_idx = int((lat + 90) / lat_size + .5)

    if LON_idx >= 72:
        LON_idx = LON_idx - 72

    return LON_idx, LAT_idx