forked from NorESMhub/BLOM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
11 deletions.
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,43 @@ | ||
! ------------------------------------------------------------------------------ | ||
! Copyright (C) 2015-2024 Mats Bentsen, Ping-Gin Chiu | ||
! | ||
! This file is part of BLOM. | ||
! | ||
! BLOM is free software: you can redistribute it and/or modify it under the | ||
! terms of the GNU Lesser General Public License as published by the Free | ||
! Software Foundation, either version 3 of the License, or (at your option) | ||
! any later version. | ||
! | ||
! BLOM is distributed in the hope that it will be useful, but WITHOUT ANY | ||
! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
! FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for | ||
! more details. | ||
! | ||
! You should have received a copy of the GNU Lesser General Public License | ||
! along with BLOM. If not, see <https://www.gnu.org/licenses/>. | ||
! ------------------------------------------------------------------------------ | ||
|
||
subroutine setlogunit | ||
|
||
use mod_config, only: inst_suffix | ||
use mod_xc, only: mnproc, lp | ||
use shr_file_mod, only: shr_file_getUnit, shr_file_setIO | ||
|
||
implicit none | ||
|
||
character(len = 256) :: nlfnm | ||
logical :: exists | ||
|
||
! --------------------------------------------------------------------------- | ||
! Redirect standard out to a log file if requested | ||
! --------------------------------------------------------------------------- | ||
if (mnproc.eq.1) then | ||
nlfnm = 'ocn_modelio.nml'//trim(inst_suffix) | ||
inquire(file = nlfnm, exist = exists) | ||
if (exists) then | ||
lp = shr_file_getUnit() | ||
call shr_file_setIO(nlfnm, lp) | ||
endif | ||
endif | ||
|
||
end subroutine setlogunit |
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