-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from COSIMA/truncation_file_issue
Truncation Output Issue: Fileset Flag and Filename Handling
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- ../MOM6/src/diagnostics/MOM_PointAccel.F90 2024-10-23 10:07:22.000000000 +1100 | ||
+++ ../MOM6/src/diagnostics/MOM_PointAccel.F90.new 2024-10-23 10:15:54.000000000 +1100 | ||
@@ -122,8 +122,8 @@ | ||
if (CS%u_file < 0) then | ||
if (len_trim(CS%u_trunc_file) < 1) return | ||
call open_ASCII_file(CS%u_file, trim(CS%u_trunc_file), action=APPEND_FILE, & | ||
- threading=MULTIPLE, fileset=SINGLE_FILE) | ||
- if (CS%u_file < 0) then | ||
+ threading=MULTIPLE, fileset=MULTIPLE) | ||
+ if (CS%u_file == -1) then | ||
call MOM_error(NOTE, 'Unable to open file '//trim(CS%u_trunc_file)//'.') | ||
return | ||
endif | ||
@@ -461,8 +461,8 @@ | ||
if (CS%v_file < 0) then | ||
if (len_trim(CS%v_trunc_file) < 1) return | ||
call open_ASCII_file(CS%v_file, trim(CS%v_trunc_file), action=APPEND_FILE, & | ||
- threading=MULTIPLE, fileset=SINGLE_FILE) | ||
- if (CS%v_file < 0) then | ||
+ threading=MULTIPLE, fileset=MULTIPLE) | ||
+ if (CS%v_file == -1) then | ||
call MOM_error(NOTE, 'Unable to open file '//trim(CS%v_trunc_file)//'.') | ||
return | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- ../MOM6/config_src/infra/FMS2/MOM_io_infra.F90 2024-10-23 10:07:33.000000000 +1100 | ||
+++ ../MOM6/config_src/infra/FMS2/MOM_io_infra.F90.new 2024-10-23 10:16:45.000000000 +1100 | ||
@@ -376,8 +376,7 @@ | ||
logical :: exists | ||
logical :: is_open | ||
character(len=6) :: action_arg, position_arg | ||
- character(len=:), allocatable :: filename | ||
- | ||
+ character(len=500) :: filename | ||
! NOTE: This function is written to emulate the original behavior of mpp_open | ||
! from the FMS1 library, on which the MOM API is still based. Much of this | ||
! can be removed if we choose to drop this compatibility, but for now we | ||
@@ -433,12 +432,12 @@ | ||
endif | ||
endif | ||
|
||
- inquire(file=filename, exist=exists) | ||
+ inquire(file=trim(filename), exist=exists) | ||
if (exists .and. action_flag == WRITEONLY_FILE) & | ||
call MOM_error(WARNING, 'open_ASCII_file: File ' // trim(filename) // & | ||
' opened WRITEONLY already exists!') | ||
|
||
- open(newunit=unit, file=filename, action=trim(action_arg), & | ||
+ open(newunit=unit, file=trim(filename), action=trim(action_arg), & | ||
position=trim(position_arg)) | ||
|
||
! This checks if open() failed but did not raise a runtime error. |