Commits (2)
......@@ -6,8 +6,10 @@
4
$END
# -------------------------------------------------------------------------------------------------
#86400 604800
# 2 days in seconds
$RUNTIME
86400
172800
$END
# -------------------------------------------------------------------------------------------------
$NLOGPRT
......@@ -18,7 +20,7 @@
# =================================================================================================
# Fields send from Atmosphere to Ocean
# =================================================================================================
A_f1_oce O_f1 1 2700 2 rstas.nc EXPOUT
A_f1_oce O_f1 1 2700 2 rstas.nc EXPORTED
A128 O1u0 LAG=2700
P 0 P 2
LOCTRANS SCRIPR
......@@ -28,7 +30,7 @@
# =================================================================================================
# Fields send from Atmosphere to Runoff mapper
# =================================================================================================
A_f2_rnf R_f2 1 2700 3 rstas.nc EXPOUT
A_f2_rnf R_f2 1 2700 3 rstas.nc EXPORTED
R128 RnfA LAG=2700
P 0 P 0
LOCTRANS SCRIPR CONSERV
......@@ -40,7 +42,7 @@
# Fields send from Runoff mapper to the Ocean
# =================================================================================================
# --- Runoff --- [rnfmapper nemo]
R_f3_oce O_f3 1 2700 3 rstas.nc EXPOUT
R_f3_oce O_f3 1 2700 3 rstas.nc EXPORTED
RnfO O1t0 LAG=0
P 0 P 2
SCRIPR CONSERV BLASNEW
......@@ -51,7 +53,7 @@
# =================================================================================================
# Fields send from Ocean to Atmosphere
# =================================================================================================
O_f4_atm A_f4 1 2700 2 rstos.nc EXPOUT
O_f4_atm A_f4 1 2700 2 rstos.nc EXPORTED
O1t0 L128 LAG=2700
P 2 P 0
LOCTRANS SCRIPR
......
......@@ -20,6 +20,7 @@ import time
# OASIS PUT
# ++++++++++++++++
def run_oasis_put():
logging.info('Entering OASIS_PUT')
logging.debug('ITAP_SEC: {} sending fields'.format(itap_sec))
logging.debug(str(out_coupling_fields.keys()))
for id, field in out_coupling_fields.items():
......@@ -41,12 +42,13 @@ def run_oasis_put():
# OASIS GET
# ++++++++++++++++
def run_oasis_get():
logging.debug('ITAP_SEC: {} receiving fields'.format(itap_sec))
logging.debug(str(in_coupling_fields.keys()))
for id, field in in_coupling_fields.items():
field.get(itap_sec, field_data)
logging.debug('{} -> {:.3e} {:.3e} {:.3e}'.format( id, np.min(field_data), np.mean(field_data), np.max(field_data)))
logging.debug('--------------------------------------\n')
logging.info('Entering OASIS_GET')
logging.debug('ITAP_SEC: {} receiving fields'.format(itap_sec))
logging.debug(str(in_coupling_fields.keys()))
for id, field in in_coupling_fields.items():
field.get(itap_sec, field_data)
logging.debug('{} -> {:.3e} {:.3e} {:.3e}'.format( id, np.min(field_data), np.mean(field_data), np.max(field_data)))
logging.debug('--------------------------------------\n')
......@@ -121,7 +123,7 @@ if __name__ == '__main__':
else:
offset = mype * local_size + remainder
print('MPI rank is {}, Local size is {}, Offset is {}'.format(mype, local_size, offset))
logging.debug('MPI rank is {}, Local size is {}, Offset is {}'.format(mype, local_size, offset))
partition = pyoasis.ApplePartition(offset, local_size)
......@@ -183,12 +185,13 @@ if __name__ == '__main__':
field_data = pyoasis.asarray(np.full(local_size, -1.0))
for itap_sec in range(0, simulation_run_length_sec, simulation_coupling_interval):
logging.info('timestep: {}'.format(itap_sec))
# Call OASIS_GET
run_oasis_get
run_oasis_get()
# Simulate component computation (sleep)
time.sleep(timestep_length)
# Call OASIS_PUT
run_oasis_put
run_oasis_put()
logging.debug('End of the program')
......