Skip to content

Commit

Permalink
rpointer fix for cesm (#990)
Browse files Browse the repository at this point in the history
With the change in cesm3_cice6_5_0_9 the correct cesm pointer_file name is written to the namelist file and so it is no longer required to append the instance number in a multi instance case.

* add status feature to open existing file, remove no longer needed cesm pointer_file modification

* add status for pointer_file open in netcdf
  • Loading branch information
jedwards4b authored Nov 5, 2024
1 parent 7f4065b commit d619592
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1198,10 +1198,6 @@ subroutine input_data
call broadcast_scalar(sw_frac, master_task)
call broadcast_scalar(sw_dtemp, master_task)

#ifdef CESMCOUPLED
pointer_file = trim(pointer_file) // trim(inst_suffix)
#endif

!-----------------------------------------------------------------
! update defaults
!-----------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ subroutine init_restart_read(ice_ic)
filename = trim(ice_ic)
else
if (my_task == master_task) then
open(nu_rst_pointer,file=pointer_file)
open(nu_rst_pointer,file=pointer_file, status='old')
read(nu_rst_pointer,'(a)') filename0
filename = trim(filename0)
close(nu_rst_pointer)
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ subroutine init_restart_read(ice_ic)
filename = trim(ice_ic)
else
if (my_task == master_task) then
open(nu_rst_pointer,file=pointer_file)
open(nu_rst_pointer,file=pointer_file, status='old')
read(nu_rst_pointer,'(a)') filename0
filename = trim(filename0)
close(nu_rst_pointer)
Expand Down

0 comments on commit d619592

Please sign in to comment.