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
0ec2519b
Commit
0ec2519b
authored
5 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
instituteDefaultEntries: added CNMC.
parent
8b44a062
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
src/institution.c
+11
-11
11 additions, 11 deletions
src/institution.c
with
15 additions
and
11 deletions
ChangeLog
+
4
−
0
View file @
0ec2519b
...
...
@@ -2,6 +2,10 @@
* Version 1.9.8 released
2019-07-11 Uwe Schulzweida
* instituteDefaultEntries: added CNMC [patch: Florian Prill]
2019-07-08 Uwe Schulzweida
* varInsertTileSubtype: bug fix [report: Florian Prill]
...
...
This diff is collapsed.
Click to expand it.
src/institution.c
+
11
−
11
View file @
0ec2519b
...
...
@@ -40,7 +40,7 @@ static const resOps instituteOps = {
};
static
void
instituteDefaultValue
(
institute_t
*
instituteptr
)
void
instituteDefaultValue
(
institute_t
*
instituteptr
)
{
instituteptr
->
self
=
CDI_UNDEFID
;
instituteptr
->
used
=
0
;
...
...
@@ -50,7 +50,7 @@ void instituteDefaultValue ( institute_t * instituteptr )
instituteptr
->
longname
=
NULL
;
}
void
instituteDefaultEntries
(
void
)
void
instituteDefaultEntries
(
void
)
{
cdiResH
resH
[]
=
{
institutDef
(
98
,
0
,
"ECMWF"
,
"European Centre for Medium-Range Weather Forecasts"
),
...
...
@@ -66,21 +66,20 @@ void instituteDefaultEntries ( void )
institutDef
(
74
,
0
,
"METOFFICE"
,
"U.K. Met Office"
),
institutDef
(
97
,
0
,
"ESA"
,
"European Space Agency"
),
institutDef
(
99
,
0
,
"KNMI"
,
"Royal Netherlands Meteorological Institute"
),
institutDef
(
80
,
0
,
"CNMC"
,
"Reparto per la Meteorologia, Rome (REMET)"
),
// institutDef( 0, 0, "IPSL", "IPSL (Institut Pierre Simon Laplace, Paris, France)");
};
/* (void) institutDef( 0, 0, "IPSL", "IPSL (Institut Pierre Simon Laplace, Paris, France)"); */
size_t
n
=
sizeof
(
resH
)
/
sizeof
(
*
resH
);
const
size_t
n
=
sizeof
(
resH
)
/
sizeof
(
*
resH
);
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
reshSetStatus
(
resH
[
i
],
&
instituteOps
,
RESH_IN_USE
);
}
static
int
instituteCompareKernel
(
institute_t
*
ip1
,
institute_t
*
ip2
)
instituteCompareKernel
(
institute_t
*
ip1
,
institute_t
*
ip2
)
{
int
differ
=
0
;
size_t
len1
,
len2
;
if
(
ip1
->
name
)
{
...
...
@@ -91,8 +90,8 @@ instituteCompareKernel(institute_t * ip1, institute_t * ip2)
{
if
(
ip2
->
name
)
{
len1
=
strlen
(
ip1
->
name
);
len2
=
strlen
(
ip2
->
name
);
const
size_t
len1
=
strlen
(
ip1
->
name
);
const
size_t
len2
=
strlen
(
ip2
->
name
);
if
(
(
len1
!=
len2
)
||
memcmp
(
ip2
->
name
,
ip1
->
name
,
len2
)
)
differ
=
1
;
}
}
...
...
@@ -101,8 +100,8 @@ instituteCompareKernel(institute_t * ip1, institute_t * ip2)
{
if
(
ip2
->
longname
)
{
len1
=
strlen
(
ip1
->
longname
);
len2
=
strlen
(
ip2
->
longname
);
const
size_t
len1
=
strlen
(
ip1
->
longname
);
const
size_t
len2
=
strlen
(
ip2
->
longname
);
if
(
(
len1
<
len2
)
||
memcmp
(
ip2
->
longname
,
ip1
->
longname
,
len2
)
)
differ
=
1
;
}
}
...
...
@@ -110,6 +109,7 @@ instituteCompareKernel(institute_t * ip1, institute_t * ip2)
{
if
(
!
(
ip2
->
center
==
ip1
->
center
&&
ip2
->
subcenter
==
ip1
->
subcenter
))
differ
=
1
;
if
(
ip1
->
subcenter
>
0
&&
ip1
->
subcenter
!=
255
&&
ip2
->
subcenter
!=
ip1
->
subcenter
)
differ
=
1
;
}
return
differ
;
...
...
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