Skip to content

Commit

Permalink
Fix introduced bug initialise and save ice to ocean coupling fields. C…
Browse files Browse the repository at this point in the history
  • Loading branch information
nichannah committed Apr 16, 2020
1 parent eab7998 commit 4e4aefd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/auscom/cpl_forcing_handler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 4e4aefd

Please sign in to comment.