Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
96e3e271
Commit
96e3e271
authored
11 years ago
by
Luis Kornblueh
Browse files
Options
Downloads
Patches
Plain Diff
Started adding read of restart and linking via execute_command_line(F2008). Does not work yet
parent
5a7bcfbf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/iconoce.f90
+33
-1
33 additions, 1 deletion
test/iconoce.f90
with
33 additions
and
1 deletion
test/iconoce.f90
+
33
−
1
View file @
96e3e271
...
...
@@ -449,6 +449,35 @@ contains
print
*
,
'ERROR: could not open namelist file.'
stop
else
write
(
unit
=
iunit
,
iostat
=
ierror
,
iomsg
=
error_message
,
fmt
=
'(a,a)'
)
'restart: '
,
trim
(
dstring
)
if
(
ierror
/
=
0
)
then
print
*
,
'ERROR: could not write restart/checkpoint file.'
print
*
,
' '
,
trim
(
error_message
)
stop
else
call
execute_command_line
(
'ln -s '
//
trim
(
filename
)//
' restart_oce.dat'
,
wait
=
.true.
)
!exitstat int, cmdstat int, cmdmsg
endif
close
(
unit
=
iunit
)
endif
end
subroutine
writeRestart
!________________________________________________________________________________________________
!
subroutine
readRestart
(
currentDate
)
type
(
datetime
),
pointer
::
currentDate
character
(
len
=
max_datetime_str_len
)
::
dstring
character
(
len
=
max_datetime_str_len
+16
)
::
filename
integer
::
iunit
,
ierror
call
datetimeToString
(
currentDate
,
dstring
)
write
(
filename
,
'(a,a,a)'
)
'restart_oce_'
,
trim
(
dstring
),
'.dat'
open
(
file
=
'test/'
//
trim
(
filename
),
newunit
=
iunit
,
iostat
=
ierror
)
if
(
ierror
/
=
0
)
then
print
*
,
'ERROR: could not open namelist file.'
stop
else
! write (unit=iunit, iostat=ierror, iomsg=error_message, format='(a,a)') 'restart: ', trim(dstring)
write
(
iunit
,
'(a,a)'
)
'restart: '
,
trim
(
dstring
)
if
(
ierror
/
=
0
)
then
...
...
@@ -459,7 +488,10 @@ contains
close
(
unit
=
iunit
)
endif
end
subroutine
writeRestart
call
datetimeToString
(
currentDate
,
dstring
)
print
*
,
'Read restart/ceckpoint file for '
,
trim
(
dstring
)
end
subroutine
readRestart
!________________________________________________________________________________________________
!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment