Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
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
mpim-sw
libcdi
Commits
569c73de
Commit
569c73de
authored
8 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add option to change datatype of written files.
parent
aa2273b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!34
Version 2.2.0
,
!13
Consolidation with CDI-PIO (develop)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/README.pio_write
+8
-0
8 additions, 0 deletions
doc/README.pio_write
tests/pio_write.c
+23
-2
23 additions, 2 deletions
tests/pio_write.c
with
31 additions
and
2 deletions
doc/README.pio_write
+
8
−
0
View file @
569c73de
...
...
@@ -172,3 +172,11 @@ Set the time unit to one of
* year
As with -qtaxis-type see the CDI library documentation for specifics.
-qdatatype=<DATATYPE>
Set the external representation of the written data. Valid values for
DATATYPE are pack followed by the number of significant bits for GRIB
and GRIB2 data and flt32 or flt64 for the other file formats (which
store raw floating point values) to use 32 and 64 bit float formats.
Note: this option must follow the -f option to become effective.
This diff is collapsed.
Click to expand it.
tests/pio_write.c
+
23
−
2
View file @
569c73de
...
...
@@ -182,8 +182,25 @@ parse_long_option(struct model_config *restrict setup, int pioConfHandle, pioRol
#endif
static
const
char
cacheRedistStr
[]
=
"no-cache-redists"
,
pioRoleSchemeOptionStr
[]
=
"pio-role-scheme"
,
curvilinearGridOptionStr
[]
=
"no-create-curvilinear-grid"
,
uuidCreateOptionStr
[]
=
"no-create-uuid"
,
useDistGridOptionStr
[]
=
"no-use-dist-grid"
,
taxistypeOptionStr
[]
=
"taxis-type"
,
taxisunitOptionStr
[]
=
"taxis-unit"
;
useDistGridOptionStr
[]
=
"no-use-dist-grid"
,
datatypeOptionStr
[]
=
"datatype"
,
taxistypeOptionStr
[]
=
"taxis-type"
,
taxisunitOptionStr
[]
=
"taxis-unit"
;
static
const
struct
string2int
datatypeArgMap
[]
=
{
{
"pack"
,
CDI_DATATYPE_PACK
},
{
"pack1"
,
CDI_DATATYPE_PACK1
},
{
"pack2"
,
CDI_DATATYPE_PACK2
},
{
"pack3"
,
CDI_DATATYPE_PACK3
},
{
"pack4"
,
CDI_DATATYPE_PACK4
},
{
"pack5"
,
CDI_DATATYPE_PACK5
},
{
"pack6"
,
CDI_DATATYPE_PACK6
},
{
"pack7"
,
CDI_DATATYPE_PACK7
},
{
"pack8"
,
CDI_DATATYPE_PACK8
},
{
"pack9"
,
CDI_DATATYPE_PACK9
},
{
"pack10"
,
CDI_DATATYPE_PACK10
},
{
"pack11"
,
CDI_DATATYPE_PACK11
},
{
"pack12"
,
CDI_DATATYPE_PACK12
},
{
"pack13"
,
CDI_DATATYPE_PACK13
},
{
"pack14"
,
CDI_DATATYPE_PACK14
},
{
"pack15"
,
CDI_DATATYPE_PACK15
},
{
"pack16"
,
CDI_DATATYPE_PACK16
},
{
"pack17"
,
CDI_DATATYPE_PACK17
},
{
"pack18"
,
CDI_DATATYPE_PACK18
},
{
"pack19"
,
CDI_DATATYPE_PACK19
},
{
"pack20"
,
CDI_DATATYPE_PACK20
},
{
"pack21"
,
CDI_DATATYPE_PACK21
},
{
"pack22"
,
CDI_DATATYPE_PACK22
},
{
"pack23"
,
CDI_DATATYPE_PACK23
},
{
"pack24"
,
CDI_DATATYPE_PACK24
},
{
"pack25"
,
CDI_DATATYPE_PACK25
},
{
"pack26"
,
CDI_DATATYPE_PACK26
},
{
"pack27"
,
CDI_DATATYPE_PACK27
},
{
"pack28"
,
CDI_DATATYPE_PACK28
},
{
"pack29"
,
CDI_DATATYPE_PACK29
},
{
"pack30"
,
CDI_DATATYPE_PACK30
},
{
"pack31"
,
CDI_DATATYPE_PACK31
},
{
"pack32"
,
CDI_DATATYPE_PACK32
},
{
"cpx32"
,
CDI_DATATYPE_CPX32
},
{
"cpx64"
,
CDI_DATATYPE_CPX64
},
{
"flt32"
,
CDI_DATATYPE_FLT32
},
{
"flt64"
,
CDI_DATATYPE_FLT64
},
{
"int8"
,
CDI_DATATYPE_INT8
},
{
"int16"
,
CDI_DATATYPE_INT16
},
{
"int32"
,
CDI_DATATYPE_INT32
},
{
"uint8"
,
CDI_DATATYPE_UINT8
},
{
"uint16"
,
CDI_DATATYPE_UINT16
},
{
"uint32"
,
CDI_DATATYPE_UINT32
},
};
static
const
struct
string2int
taxistypeArgMap
[]
=
{
{
"absolute"
,
TAXIS_ABSOLUTE
},
{
"relative"
,
TAXIS_RELATIVE
},
...
...
@@ -196,6 +213,7 @@ parse_long_option(struct model_config *restrict setup, int pioConfHandle, pioRol
};
enum
{
datatypeArgMapSize
=
sizeof
(
datatypeArgMap
)
/
sizeof
(
datatypeArgMap
[
0
]),
taxistypeArgMapSize
=
sizeof
(
taxistypeArgMap
)
/
sizeof
(
taxistypeArgMap
[
0
]),
taxisunitArgMapSize
=
sizeof
(
taxisunitArgMap
)
/
sizeof
(
taxisunitArgMap
[
0
]),
};
...
...
@@ -214,6 +232,9 @@ parse_long_option(struct model_config *restrict setup, int pioConfHandle, pioRol
else
if
(
parseLongOptionArgStringToInt
(
str
,
sizeof
(
taxisunitOptionStr
)
-
1
,
taxisunitOptionStr
,
taxisunitArgMapSize
,
taxisunitArgMap
,
argc
,
argv
,
&
setup
->
taxisunit
))
;
else
if
(
parseLongOptionArgStringToInt
(
str
,
sizeof
(
datatypeOptionStr
)
-
1
,
datatypeOptionStr
,
datatypeArgMapSize
,
datatypeArgMap
,
argc
,
argv
,
&
setup
->
datatype
))
;
else
if
(
!
strncmp
(
str
,
pioRoleSchemeOptionStr
,
sizeof
(
pioRoleSchemeOptionStr
)
-
1
))
{
#ifdef USE_MPI
...
...
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