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