Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpointer fix for cesm #990

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could / should probably do error checking on this open ? @apcraig ?

Anyway - its unrelated to this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly why I added the status="old", the fortran error message provided if the file doesn't exist should be adequate.

read(nu_rst_pointer,'(a)') filename0
filename = trim(filename0)
close(nu_rst_pointer)
Expand Down
Loading