views.py
def csvCreationRequest(): #rStart,rEnd,yStart,mStart,dStart,hStart,yEnd,mEnd,dEnd,hEnd
    """This method allows to generate csv file of netCDF"""
    if request.is_xhr and request.method=="POST":
        startDate = request.form["startDate"]
        startDate = startDate.split("-")
        yStart = startDate[0]
        mStart = startDate[1]
        dStart = startDate[2]
        hStart = request.form["startHour"]
        endDate = request.form["endDate"]
        endDate = endDate.split("-")
        yEnd = endDate[0]
        mEnd = endDate[1]
        dEnd = endDate[2]
        hEnd = request.form["endHour"]
        rStart =request.form["rStart"]
        rEnd = request.form["rEnd"]
        print(rStart,rEnd,yStart,mStart,dStart,hStart,yEnd,mEnd,dEnd,hEnd)
        result = pointInPolygon(session["username"],int(rStart),int(rEnd),int(yStart),int(mStart),int(dStart),int(hStart),int(yEnd), int(mEnd), int(dEnd), int(hEnd))
        countTot = result
        if countTot == -1:
            return json.dumps({"result": "error"})
        if countTot == None:
            return json.dumps({"result": "error1"})
        if countTot == 0:
            return json.dumps({"result": "nofiles","count":str(countTot)})
        else:
            return json.dumps({"result": "files","count":str(countTot)})
This method allows to generate csv file of netCDF
This method allows to generate csv file of netCDF
This method allows to generate csv file of netCDF
def csvCreationRequest(): 
    if request.is_xhr and request.method=="POST":
        startDate = request.form["startDate"]
        startDate = startDate.split("-")
        yStart = startDate[0]
        mStart = startDate[1]
        dStart = startDate[2]
        hStart = request.form["startHour"]
        endDate = request.form["endDate"]
        endDate = endDate.split("-")
        yEnd = endDate[0]
        mEnd = endDate[1]
        dEnd = endDate[2]
        hEnd = request.form["endHour"]
        rStart =request.form["rStart"]
        rEnd = request.form["rEnd"]
        print(rStart,rEnd,yStart,mStart,dStart,hStart,yEnd,mEnd,dEnd,hEnd)
        result = pointInPolygon(session["username"],int(rStart),int(rEnd),int(yStart),int(mStart),int(dStart),int(hStart),int(yEnd), int(mEnd), int(dEnd), int(hEnd))
        countTot = result
        if countTot == -1:
            return json.dumps({"result": "error"})
        if countTot == None:
            return json.dumps({"result": "error1"})
        if countTot == 0:
            return json.dumps({"result": "nofiles","count":str(countTot)})
        else:
            return json.dumps({"result": "files","count":str(countTot)})
def csvCreationRequest ( ) : if request . is_xhr and request . method == "POST" : startDate = request . form [ "startDate" ] startDate = startDate . split ( "-" ) yStart = startDate [ 0 ] mStart = startDate [ 1 ] dStart = startDate [ 2 ] hStart = request . form [ "startHour" ] endDate = request . form [ "endDate" ] endDate = endDate . split ( "-" ) yEnd = endDate [ 0 ] mEnd = endDate [ 1 ] dEnd = endDate [ 2 ] hEnd = request . form [ "endHour" ] rStart = request . form [ "rStart" ] rEnd = request . form [ "rEnd" ] print ( rStart , rEnd , yStart , mStart , dStart , hStart , yEnd , mEnd , dEnd , hEnd ) result = pointInPolygon ( session [ "username" ] , int ( rStart ) , int ( rEnd ) , int ( yStart ) , int ( mStart ) , int ( dStart ) , int ( hStart ) , int ( yEnd ) , int ( mEnd ) , int ( dEnd ) , int ( hEnd ) ) countTot = result if countTot == - 1 : return json . dumps ( { "result" : "error" } ) if countTot == None : return json . dumps ( { "result" : "error1" } ) if countTot == 0 : return json . dumps ( { "result" : "nofiles" , "count" : str ( countTot ) } ) else : return json . dumps ( { "result" : "files" , "count" : str ( countTot ) } )
This method allows to generate csv file of netCDF
This method allows to generate csv file of netCDF
#rStart,rEnd,yStart,mStart,dStart,hStart,yEnd,mEnd,dEnd,hEnd """This method allows to generate csv file of netCDF"""