From 84a370b53a4ffff8fc0a9f87f6804f055987fbb7 Mon Sep 17 00:00:00 2001 From: Nic Hannah Date: Mon, 20 Jan 2020 16:45:09 +1100 Subject: [PATCH] Get test working on new machine. Why was Oasis accepting termination when there were hanging puts? Closes #38 --- ocean_stub/src/ocean.F90 | 13 ++++++++----- tests/copy_test_data.sh | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ocean_stub/src/ocean.F90 b/ocean_stub/src/ocean.F90 index b7f98b8..9717f9e 100644 --- a/ocean_stub/src/ocean.F90 +++ b/ocean_stub/src/ocean.F90 @@ -78,9 +78,8 @@ program ocean call coupler%init_end(accessom2%get_total_runtime_in_seconds(), & accessom2%get_coupling_field_timesteps()) - do while (.not. accessom2%run_finished()) - cur_runtime_in_seconds = accessom2%get_cur_runtime_in_seconds() - + cur_runtime_in_seconds = accessom2%get_cur_runtime_in_seconds() + do ! Get fields from ice do i=1, size(in_fields) call coupler%get(in_fields(i), cur_runtime_in_seconds, err) @@ -88,13 +87,17 @@ program ocean ! Do work, i.e. use the in_fields and populate the out_fields + call accessom2%progress_date(dt) + if (accessom2%run_finished()) then + exit + endif + cur_runtime_in_seconds = accessom2%get_cur_runtime_in_seconds() + ! Send fields to ice do i=1, size(out_fields) out_fields(i)%data_array(:, :) = 0.0 call coupler%put(out_fields(i), cur_runtime_in_seconds, err) enddo - - call accessom2%progress_date(dt) enddo ! Write out restart. diff --git a/tests/copy_test_data.sh b/tests/copy_test_data.sh index 40cc4f8..87c2bb5 100755 --- a/tests/copy_test_data.sh +++ b/tests/copy_test_data.sh @@ -3,10 +3,10 @@ mkdir -p test_data # Copy over OASIS remap weights -cp /short/public/access-om2/input_rc/common_1deg_jra55/* test_data/ +cp /g/data/ik11/inputs/access-om2/input_rc/common_1deg_jra55/* test_data/ # Copy over river runoff remap weights -cp /short/public/access-om2/input_rc/yatm_1deg/rmp_jrar_to_cict_CONSERV.nc test_data/ +cp /g/data/ik11/inputs/access-om2/input_rc/yatm_1deg/rmp_jrar_to_cict_CONSERV.nc test_data/ # Copy ice grid and OASIS restarts -cp /short/public/access-om2/input_rc/cice_1deg/* test_data/ +cp /g/data/ik11/inputs/access-om2/input_rc/cice_1deg/* test_data/