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
5ec87d23
Commit
5ec87d23
authored
10 years ago
by
Luis Kornblueh
Browse files
Options
Downloads
Patches
Plain Diff
Another classics missing: mo_kind.f90.
parent
69a67beb
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/mo_kind.f90
+106
-0
106 additions, 0 deletions
test/mo_kind.f90
with
106 additions
and
0 deletions
test/mo_kind.f90
0 → 100644
+
106
−
0
View file @
5ec87d23
!>
!! Module determines kinds for different precisions.
!!
!! Module determines kinds for different precisions
!! Number model from which the SELECTED_*\\_KIND are requested: <br>
!!
!! @f{tabular}{{r@{\hspace*{3em}}c@{\hspace*{3em}}c}
!! &4 byte REAL &8 byte REAL \\\
!! CRAY: &- &precision = 13 \\\
!! & &exponent = 2465 \\\
!! IEEE: &precision = 6 &precision = 15 \\\
!! &exponent = 37 &exponent = 307
!! @f}
!! \\medskip
!!
!! Most likely this are the only possible models.
!!
!! @par Revision History
!! Working precision and comments are added by Luis Kornblueh (2001)
!! Modification by Luis Kornblueh (2010-02-16):
!! Working precision selection is parameterized by values, which can be as
!! well used for selection of MPI data types associated with the respective
!! Fortran datatypes.
!!
!! @par Copyright
!! 2002-2010 by DWD and MPI-M
!! This software is provided for non-commercial use only.
!! See the LICENSE and the WARRANTY conditions.
!!
!! @par License
!! The use of ICON is hereby granted free of charge for an unlimited time,
!! provided the following rules are accepted and applied:
!! <ol>
!! <li> You may use or modify this code for your own non commercial and non
!! violent purposes.
!! <li> The code may not be re-distributed without the consent of the authors.
!! <li> The copyright notice and statement of authorship must appear in all
!! copies.
!! <li> You accept the warranty conditions (see WARRANTY).
!! <li> In case you intend to use the code commercially, we oblige you to sign
!! an according license agreement with DWD and MPI-M.
!! </ol>
!!
!! @par Warranty
!! This code has been tested up to a certain level. Defects and weaknesses,
!! which may be included in the code, do not establish any warranties by the
!! authors.
!! The authors do not make any warranty, express or implied, or assume any
!! liability or responsibility for the use, acquisition or application of this
!! software.
!!
!!
MODULE
mo_kind
IMPLICIT
NONE
PRIVATE
CHARACTER
(
len
=*
),
PARAMETER
,
PRIVATE
::
version
=
'$Id$'
!--------------------------------------------------------------------
!
! Floating point section
! ----------------------
!
INTEGER
,
PARAMETER
::
ps
=
6
INTEGER
,
PARAMETER
::
rs
=
37
!
INTEGER
,
PARAMETER
::
pd
=
12
INTEGER
,
PARAMETER
::
rd
=
307
!
INTEGER
,
PARAMETER
::
sp
=
SELECTED_REAL_KIND
(
ps
,
rs
)
!< single precision
INTEGER
,
PARAMETER
::
dp
=
SELECTED_REAL_KIND
(
pd
,
rd
)
!< double precision
!
INTEGER
,
PARAMETER
::
wp
=
dp
!< selected working precision
!
#ifdef __MIXED_PRECISION
INTEGER
,
PARAMETER
::
vp
=
sp
#else
INTEGER
,
PARAMETER
::
vp
=
wp
#endif
!
! Integer section
! ---------------
!
INTEGER
,
PARAMETER
::
pi2
=
4
INTEGER
,
PARAMETER
::
pi4
=
9
INTEGER
,
PARAMETER
::
pi8
=
14
! could be larger, but SX cannot do some operations otherwise
!
INTEGER
,
PARAMETER
::
i2
=
SELECTED_INT_KIND
(
pi2
)
!< at least 2 byte integer
INTEGER
,
PARAMETER
::
i4
=
SELECTED_INT_KIND
(
pi4
)
!< at least 4 byte integer
INTEGER
,
PARAMETER
::
i8
=
SELECTED_INT_KIND
(
pi8
)
!< at least 8 byte integer
!
!
! The following variable is made available internally only. configure needs to detect
! the addressing mode and according to this mo_kind has to be updated by an preprocessor
! directive and #include <config.h>. This needs some changes.
!
INTEGER
,
PARAMETER
::
wi
=
i4
!< selected working precission
!
PUBLIC
::
sp
,
dp
,
wp
,
vp
,
i4
,
i8
,
i2
!
!--------------------------------------------------------------------
END
MODULE
mo_kind
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