Пример #1
0
inputs1 = copy.deepcopy(inputs)
inputs1['outdir'] = dirbasepath
inputs1['runname'] = rundirname
inputs1['year0'] = 1
inputs1['month0'] = 11
inputs1['day0'] = 1
inputs1['lastday'] = 10
inputs1['mrestart'] = 0
inputs1['init_with_instance_state'] = True
inputs1['compiled_form'] = 'parts'

model = Qtcm(**inputs1)
model.run_session()
model.u1.value[52:55,13:16] = model.u1.value[52:55,13:16] * 2.0
model.init_with_instance_state = False
model.run_session(cont=30)
del model

if os.path.exists('qtcm_00011110.restart'):  os.remove('qtcm_00011110.restart')
if os.path.exists('qtcm_00011210.restart'):  os.remove('qtcm_00011210.restart')


#- Case 7:  Regular aquaplanet run using compiled_form 'full', run
#  in two passes (10 and 30 days), not using restart, in two output
#  files but same model instance object.  Both passes use the instance 
#  state to initialize.  After the first pass, set u1 to twice the 
#  value for select areas.  Check if cont keyword works for 
#  compiled_form 'full'; it shouldn't since this version doesn't call 
#  the varinit method in the Python level, calling the Fortran init 
#  routines which do not reference the Python field states (or even 
Пример #2
0
inputs1 = copy.deepcopy(inputs)
inputs1['outdir'] = dirbasepath
inputs1['runname'] = rundirname
inputs1['year0'] = 1
inputs1['month0'] = 11
inputs1['day0'] = 1
inputs1['lastday'] = 10
inputs1['mrestart'] = 0
inputs1['init_with_instance_state'] = True
inputs1['compiled_form'] = 'parts'

model = Qtcm(**inputs1)
model.run_session()
model.u1.value[52:55, 13:16] = model.u1.value[52:55, 13:16] * 2.0
model.init_with_instance_state = False
model.run_session(cont=30)
del model

if os.path.exists('qtcm_00011110.restart'): os.remove('qtcm_00011110.restart')
if os.path.exists('qtcm_00011210.restart'): os.remove('qtcm_00011210.restart')

#- Case 7:  Regular aquaplanet run using compiled_form 'full', run
#  in two passes (10 and 30 days), not using restart, in two output
#  files but same model instance object.  Both passes use the instance
#  state to initialize.  After the first pass, set u1 to twice the
#  value for select areas.  Check if cont keyword works for
#  compiled_form 'full'; it shouldn't since this version doesn't call
#  the varinit method in the Python level, calling the Fortran init
#  routines which do not reference the Python field states (or even
#  existing Fortran field states):