Ejemplo n.º 1
0
def updatebc_init(datestart):
    '''
    Initialize WPS timestep
    '''
    WRFDA = wrfda()  # initialize object
    WRFDA.prepare_updatebc(datestart)
    WRFDA.updatebc_run(1)
    WRFDA.prepare_wrfda()  # prepare for running da_wrfvar.exe
    #shutil.copyfile('/home/haren/dtest/ob.radar', '/scratch-shared/haren/newd/wrfda/d01/ob.radar')
    WRFDA.wrfvar_run(1)
    wrfda_interpolate()
    #bumpskin()
    WRFDA.prepare_updatebc_type('lateral', datestart,
                                1)  # prepare for updating lateral bc
    WRFDA.updatebc_run(1)  # run da_updatebc.exe
    WRFDA.wrfda_post()  # copy files over to WRF run_dir
Ejemplo n.º 2
0
 def __init__(self, datestring):
     config.__init__(self)
     datestart = utils.convert_cylc_time(datestring)
     # initialize WRFDA object
     WRFDA = wrfda(datestart)
     WRFDA.prepare_updatebc(datestart)
     # update lower boundary conditions
     for domain in range(1, WRFDA.max_dom + 1):
         WRFDA.updatebc_run(domain)  # run da_updatebc.exe
     # copy radar data into WRFDA workdir if available
     try:
         radarFile = self.config['filesystem']['radar_filepath']
         radarTarget = os.path.join(self.config['filesystem']['work_dir'],
                                    'wrfda', 'd01', 'ob.radar')
         shutil.copyfile(radarFile, radarTarget)
     except (KeyError, IOError):
         pass
     # prepare for running da_wrfvar.exe
     WRFDA.prepare_wrfda()
     # run da_wrfvar.exe
     WRFDA.wrfvar_run(1)
     # interpolate rural variables from wrfda
     wrfda_interpolate(itype='rural')
     try:
         urbanData = self.config['options_urbantemps']['urban_stations']
     except KeyError:
         urbanData = False
     if urbanData:
         bskin = bumpskin(urbanData,
                          dstationtypes=['davis', 'vp2', 'vantage'])
     # update URBPARM.TBL with anthropogenic heat factors
     try:
         urbparmFile = self.config['options_wrf']['urbparm.tbl']
     except KeyError:
         urbparmFile = False
     if urbparmFile:
         urbparm(datestart, urbparmFile)
     # update lateral boundary conditions
     WRFDA.prepare_updatebc_type('lateral', datestart, 1)
     WRFDA.updatebc_run(1)
     # copy files over to WRF run_dir
     WRFDA.wrfda_post(datestart)
Ejemplo n.º 3
0
def obsproc_run(datestart):
    '''
    Initialize WPS timestep
    '''
    WRFDA = wrfda(datestart)  # initialize object
    WRFDA.obsproc_run()