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
00237228
Commit
00237228
authored
11 years ago
by
Luis Kornblueh
Browse files
Options
Downloads
Patches
Plain Diff
All Fortran tests implemented so far work.
parent
1691d7f7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
src/libmtime.f90
+4
-3
4 additions, 3 deletions
src/libmtime.f90
test/example.f90
+3
-3
3 additions, 3 deletions
test/example.f90
with
9 additions
and
7 deletions
.gitignore
+
2
−
1
View file @
00237228
...
...
@@ -16,4 +16,5 @@ libtool
*.la
autom4te.cache
test/model_integration
test/time_calculus
\ No newline at end of file
test/time_calculus
test/example
This diff is collapsed.
Click to expand it.
src/libmtime.f90
+
4
−
3
View file @
00237228
...
...
@@ -150,7 +150,7 @@ module libmtime
function
my_datetostring
(
my_date
,
string
)
result
(
string_ptr
)
bind
(
c
,
name
=
'dateToString'
)
import
::
c_ptr
,
c_char
type
(
c_ptr
)
::
string_ptr
type
(
c_ptr
)
::
my_date
type
(
c_ptr
)
,
value
::
my_date
character
(
c_char
),
dimension
(
*
)
::
string
end
function
my_datetostring
!
...
...
@@ -178,7 +178,7 @@ module libmtime
function
my_timetostring
(
my_time
,
string
)
result
(
string_ptr
)
bind
(
c
,
name
=
'timeToString'
)
import
::
c_ptr
,
c_char
type
(
c_ptr
)
::
string_ptr
type
(
c_ptr
)
::
my_time
type
(
c_ptr
)
,
value
::
my_time
character
(
c_char
),
dimension
(
*
)
::
string
end
function
my_timetostring
!
...
...
@@ -206,7 +206,7 @@ module libmtime
function
my_datetimetostring
(
my_time
,
string
)
result
(
string_ptr
)
bind
(
c
,
name
=
'datetimeToString'
)
import
::
c_ptr
,
c_char
type
(
c_ptr
)
::
string_ptr
type
(
c_ptr
)
::
my_time
type
(
c_ptr
)
,
value
::
my_time
character
(
c_char
),
dimension
(
*
)
::
string
end
function
my_datetimetostring
!
...
...
@@ -230,6 +230,7 @@ module libmtime
integer
(
c_int
)
::
getdayofyearfromdatetime
type
(
c_ptr
),
value
::
currentdt
end
function
getdayofyearfromdatetime
!
end
interface
!_____________________________________________________________________________________________
interface
...
...
This diff is collapsed.
Click to expand it.
test/example.f90
+
3
−
3
View file @
00237228
...
...
@@ -25,21 +25,21 @@ program example
test_date
=>
newDate
(
'2012-09-01'
)
if
(
associated
(
test_date
))
print
*
,
'allocated test_date'
call
dateToString
(
test_date
,
test_date_string
)
print
*
,
'>1<'
,
trim
(
test_date_string
)
print
*
,
trim
(
test_date_string
)
call
deallocateDate
(
test_date
)
if
(
.not.
(
associated
(
test_date
)))
print
*
,
'deallocated test_date'
test_time
=>
newTime
(
'12:13:49.654'
)
if
(
associated
(
test_time
))
print
*
,
'allocated test_time'
call
timeToString
(
test_time
,
test_time_string
)
print
*
,
'>2<'
,
trim
(
test_time_string
)
print
*
,
trim
(
test_time_string
)
call
deallocateTime
(
test_time
)
if
(
.not.
(
associated
(
test_time
)))
print
*
,
'deallocated test_time'
start_date
=>
newDatetime
(
'2012-09-01T02:10:00.000'
)
if
(
associated
(
start_date
))
print
*
,
'allocated start_date'
call
datetimeToString
(
start_date
,
start_date_string
)
print
*
,
'>3<'
,
trim
(
start_date_string
)
print
*
,
trim
(
start_date_string
)
call
deallocateDatetime
(
start_date
)
! printf("Model time step: %s\n", timedeltatoString(timestep, current_step));
...
...
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