Пример #1
0
def main(info):

    for i in range(info.ntimes):
        raw_data = io_routines.load_data(info.times[i], info)
        processed_data = convert.era2gard(raw_data)
        output.write_file(info.times[i], info, processed_data)

    if info.daily:
        daily.make_daily(info)
Пример #2
0
def main(info):
    
    for k in info.keys():
        if k!="times" and k!="lat_data" and k!="lon_data":
            print(k,info[k])
    
    print(info.times[0],info.times[-1])

    curyear=info.times[0].year
    lastyear=info.times[0].year-1
    for curtime in info.times:
        if curtime.year>lastyear:
            raw_data=io_routines.load_data(curtime,info)
            processed_data=convert.cmip2icar(raw_data)
            output.write_file(curtime,info,processed_data)
            lastyear=curtime.year
Пример #3
0
def main(info):

    for k in info.keys():
        if k != "times" and k != "lat_data" and k != "lon_data":
            print(k, info[k])

    print(info.times[0], info.times[-1])

    curyear = info.times[0].year
    lastyear = info.times[0].year - 1
    for curtime in info.times:
        if curtime.year > lastyear:
            raw_data = io_routines.load_data(curtime, info)
            processed_data = convert.cmip2icar(raw_data)
            output.write_file(curtime, info, processed_data)
            lastyear = curtime.year
Пример #4
0
def main(info):
    
    for k in info.keys():
        if k!="times" and k!="lat_data" and k!="lon_data":
            print(k,info[k])
    
    print(info.times[0],info.times[-1])

    curtime=info.times[0]
    curpos=0
    while curtime<=info.end_date:
        raw_data=io_routines.load_data(curtime,info)
        processed_data=convert.ccsm2icar(raw_data)
        output.write_file(curtime,info,processed_data)
        
        curpos+=raw_data.atm.ntimes
        curtime=info.times[curpos]
Пример #5
0
def main(info):

    for k in info.keys():
        if k!="times" and k!="lat_data" and k!="lon_data":
            print(k,info[k])

    print(info.times[0],info.times[-1])

    curtime=info.times[0]
    firsttime=curtime

    timesteps_per_year=365*4 # no leap calendar, 4 steps per day
    starttime=0
    endtime=timesteps_per_year
    for i in range(info.nyears):
        print(curtime)
        raw_data=io_routines.load_data(firsttime,info,starttime,endtime)
        processed_data=convert.cesm2icar(raw_data)
        output.write_file(curtime,info,processed_data)

        curtime=datetime.datetime(curtime.year+1,curtime.month,curtime.day)
        starttime=endtime
        endtime=endtime+timesteps_per_year
Пример #6
0
def main(info):
    
    for k in info.keys():
        if k!="times" and k!="lat_data" and k!="lon_data":
            print(k,info[k])
    
    print(info.times[0],info.times[-1])

    curtime=info.times[0]
    firsttime=curtime
    
    timesteps_per_year=365*4 # no leap calendar, 4 steps per day
    starttime=0
    endtime=timesteps_per_year
    for i in range(info.nyears):
        print(curtime)
        raw_data=io_routines.load_data(firsttime,info,starttime,endtime)
        processed_data=convert.cesm2icar(raw_data)
        output.write_file(curtime,info,processed_data)
        
        curtime=datetime.datetime(curtime.year+1,curtime.month,curtime.day)
        starttime=endtime
        endtime=endtime+timesteps_per_year
Пример #7
0
def main(info):

    for i in range(info.ntimes):
        raw_data = io_routines.load_data(info.times[i], info)
        processed_data = convert.era2icar(raw_data)
        output.write_file(info.times[i], info, processed_data)
Пример #8
0
def main(info):
    
    for i in range(info.ntimes):
        raw_data=io_routines.load_data(info.times[i],info)
        processed_data=convert.era2icar(raw_data)
        output.write_file(info.times[i],info,processed_data)