Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HD-Couple
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
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
hd-model
HD-Couple
Commits
23833171
Commit
23833171
authored
4 months ago
by
Stefan Hagemann
Browse files
Options
Downloads
Patches
Plain Diff
convert_inflow.com: set river_mouth_mask for source grid
parent
c3bc554a
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
util/convert_inflow.com
+28
-4
28 additions, 4 deletions
util/convert_inflow.com
with
28 additions
and
4 deletions
util/convert_inflow.com
+
28
−
4
View file @
23833171
...
...
@@ -133,7 +133,8 @@ fi
#
# *** Is mask file for the mouths on the source grid provided.
if
[
"
$dn_src_mouth
"
=
""
]
;
then
echo
" No mouth mask on source grid provided - defintion in script expected "
echo
" No mouth mask on source grid provided "
echo
" Mask is obtained from HD parameter variable FDIR, or it must be defined in the script"
else
if
[
-s
$dn_ocean
]
;
then
echo
" Mouth mask on source grid: "
$dn_src_mouth
...
...
@@ -514,7 +515,8 @@ esac
# *** Allocate HD mouths
${
F90
}
${
DSRC
}
/mo_grid.f90
${
DSRC
}
/mo_time.f90
${
DSRC
}
/mo_flow_inout.f90
${
DSRC
}
/mo_interpol.f90
${
DSRC
}
/mo_convert.f90
${
DSRC
}
/convert_discharge.f90
-o
convert.exe
$NC_INCLUDE
$NC_LIB
#
case
$ISRC
in
if
[
"
$dn_src_mouth
"
=
""
]
;
then
case
$ISRC
in
[
123]
)
cdo setctomiss,0.
-eqc
,0.
-selvar
,FDIR
$DNHDPARA
hdmouth_mask.nc
cdo setvar,FMOUTH hdmouth_mask.nc rivmouth_source.nc
rm
hdmouth_mask.nc
;;
...
...
@@ -533,7 +535,18 @@ case $ISRC in
rm
t[12345].nc
;;
[
67]
)
cdo setvar,FMOUTH
$DNHDPARA
rivmouth_source.nc
;;
*
)
echo
'Treatment of mouth mask needs to be specified -> STOP'
;
exit
;;
esac
esac
else
case
$ISRC
in
[
1234]
)
cdo
-selvar
,FDIR
$DNHDPARA
ts.nc
cdo setvar,FMOUTH
-setgrid
,ts.nc
$dn_src_mouth
rivmouth_source.nc
rm
ts.nc
;;
5
)
cdo
-selvar
,lon
$DNHDPARA
ts.nc
cdo setvar,FMOUTH
-setgrid
,ts.nc
$dn_src_mouth
rivmouth_source.nc
rm
ts.nc
;;
*
)
cdo setvar,FMOUTH
$dn_src_mouth
rivmouth_source.nc
;;
esac
fi
#
# *** Run the Program to create data that will be used for the remapping of mouth points
# *** --> Creates files hd_to_ocean_mouth.nc, hdmouth_on_oceangrid.nc
...
...
@@ -549,7 +562,18 @@ fi
#
# Add script settings to coupling file
ncatted
-O
-h
-a
Settings,global,o,c,
"IMODE =
$IMODE
, ISRC=
$ISRC
, IOCEAN=
$IOCEAN
, IBGC=
$IBGC
"
$DNOUT
if
[
"
$dn_src_mouth
"
!=
""
]
;
then
ncatted
-O
-h
-a
Source_mask,global,o,c,
"River mouth mask on source grid:
$dn_src_mouth
"
$DNOUT
fi
YEAR
=
$YBEG
while
[
$YEAR
-le
$YEND
]
;
do
DNOUTFLOW
=
${
DATA_OUT
}
/
${
CFLOW
}
_
${
CDIS
}
_on_
${
OM
}${
OVS
}
_
${
YEAR
}
.nc
ncatted
-O
-h
-a
Settings,global,o,c,
"IMODE =
$IMODE
, ISRC=
$ISRC
, IOCEAN=
$IOCEAN
, IBGC=
$IBGC
"
$DNOUTFLOW
if
[
"
$dn_src_mouth
"
!=
""
]
;
then
ncatted
-O
-h
-a
Source_mask,global,o,c,
"River mouth mask on source grid:
$dn_src_mouth
"
$DNOUTFLOW
fi
YEAR
=
`
expr
$YEAR
+ 1
`
done
#
if
[
$ISRC
-eq
6
]
;
then
mv
$DNOUT
${
DIN
}
/
${
OM
}
/
${
EXP
}
_
$DNOUT
...
...
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