Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
CTDAS
CTDAS
Commits
fdfa469e
Commit
fdfa469e
authored
13 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
moved the region to map conversion to the statevector object
parent
a1b88fac
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/ct/dasystem.py
+0
-25
0 additions, 25 deletions
da/ct/dasystem.py
with
0 additions
and
25 deletions
da/ct/dasystem.py
+
0
−
25
View file @
fdfa469e
...
...
@@ -22,31 +22,6 @@ class CtDaSystem(DaSystem):
"""
Information on the data assimilation system used. This is normally an rc-file with settings.
"""
def
Initialize
(
self
):
"""
Initialize the object
"""
import
da.tools.io4
as
io
import
numpy
as
np
mapfile
=
os
.
path
.
join
(
self
[
'
regionsfile
'
])
ncf
=
io
.
CT_Read
(
mapfile
,
'
read
'
)
self
.
regionmap
=
ncf
.
GetVariable
(
'
budget_region
'
)
dummy
=
ncf
.
close
()
msg
=
"
Regions map on 1x1 degree was read from file %s
"
%
self
[
'
regionsfile
'
]
;
logging
.
debug
(
msg
)
# dictionary for region <-> map conversions
nregions
=
self
.
regionmap
.
max
()
self
.
regiondict
=
{}
for
r
in
range
(
1
,
nregions
+
1
):
sel
=
(
self
.
regionmap
.
flat
==
r
).
nonzero
()
if
len
(
sel
[
0
])
>
0
:
self
.
regiondict
[
r
]
=
sel
msg
=
"
A dictionary to map grids to states and vice versa was created
"
;
logging
.
debug
(
msg
)
def
Validate
(
self
):
"""
Validate the contents of the rc-file given a dictionary of required keys
...
...
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