From 71d70c3eaa08b746e3fcabc827447260b94100bf Mon Sep 17 00:00:00 2001 From: Nic Hannah Date: Tue, 14 Apr 2020 21:29:13 +1000 Subject: [PATCH] Fix introduced bug initialise and save ice to ocean coupling fields. https://github.com/COSIMA/access-om2/issues/155 --- drivers/auscom/cpl_forcing_handler.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/auscom/cpl_forcing_handler.F90 b/drivers/auscom/cpl_forcing_handler.F90 index 61cd89f..c369750 100644 --- a/drivers/auscom/cpl_forcing_handler.F90 +++ b/drivers/auscom/cpl_forcing_handler.F90 @@ -203,7 +203,7 @@ subroutine get_time0_i2o_fields(fname) if (my_task == master_task) write(il_out,*) '(get_time0_i2o_fields) reading in i2o fields......' #endif call ice_open_nc(fname, ncid_i2o) - do i=1, num_fields_from_ocn + do i=1, num_fields_to_ocn vwork(:, :, :) = 0.0 call ice_read_nc(ncid_i2o, 1, trim(fields_to_ocn(i)) , vwork, .true.) @@ -221,7 +221,7 @@ subroutine get_time0_i2o_fields(fname) iohtflx = vwork elseif (trim(fields_to_ocn(i)) == 'swflx_io') then ioswflx = vwork - elseif (trim(fields_to_ocn(i)) == 'qflx_io') then + elseif (trim(fields_to_ocn(i)) == 'qflux_io') then ioqflux = vwork elseif (trim(fields_to_ocn(i)) == 'shflx_io') then ioshflx = vwork @@ -242,7 +242,7 @@ subroutine get_time0_i2o_fields(fname) elseif (trim(fields_to_ocn(i)) == 'licefh_io') then iolicefh = vwork else - call abort_ice('ice: bad initialization array name '//fields_to_ocn(i)) + call abort_ice('ice: bad initialization array name '//trim(fields_to_ocn(i))) endif enddo if (my_task == master_task) call ice_close_nc(ncid_i2o) @@ -388,7 +388,7 @@ subroutine save_time0_i2o_fields(fname, nstep) call write_nc_1Dtime(real(nstep), 1, 'time', ncid) endif - do i=1, num_fields_from_ocn !2:13 + do i=1, num_fields_to_ocn if (trim(fields_to_ocn(i)) == 'strsu_io') then vwork = iostrsu elseif (trim(fields_to_ocn(i)) == 'strsv_io') then @@ -403,7 +403,7 @@ subroutine save_time0_i2o_fields(fname, nstep) vwork = iohtflx elseif (trim(fields_to_ocn(i)) == 'swflx_io') then vwork = ioswflx - elseif (trim(fields_to_ocn(i)) == 'qflx_io') then + elseif (trim(fields_to_ocn(i)) == 'qflux_io') then vwork = ioqflux elseif (trim(fields_to_ocn(i)) == 'shflx_io') then vwork = ioshflx @@ -424,7 +424,7 @@ subroutine save_time0_i2o_fields(fname, nstep) elseif (trim(fields_to_ocn(i)) == 'licefh_io') then vwork = iolicefh else - call abort_ice('ice: bad initialization array name '//fields_to_ocn(i)) + call abort_ice('ice: bad save array name '//trim(fields_to_ocn(i))) endif call gather_global(gwork, vwork, master_task, distrb_info)