Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AMBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
esde
machine-learning
AMBS
Commits
d472006a
Commit
d472006a
authored
2 years ago
by
Michael Langguth
Browse files
Options
Downloads
Patches
Plain Diff
Add final merging step to get_era5_forecasts.sh.
parent
e4345740
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#105857
failed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jupyter_Notebooks/get_era5_forecasts.sh
+12
-9
12 additions, 9 deletions
Jupyter_Notebooks/get_era5_forecasts.sh
with
12 additions
and
9 deletions
Jupyter_Notebooks/get_era5_forecasts.sh
+
12
−
9
View file @
d472006a
...
@@ -50,18 +50,21 @@ for hh in ${hh_list[@]}; do
...
@@ -50,18 +50,21 @@ for hh in ${hh_list[@]}; do
ncrename
-O
-d
time
,fcst_hour
-v
time
,fcst_hour
${
outfile
}
${
outfile
}
ncrename
-O
-d
time
,fcst_hour
-v
time
,fcst_hour
${
outfile
}
${
outfile
}
ncap2
-O
-s
'fcst_hour=int(fcst_hour)'
${
outfile
}
${
outfile
}
ncap2
-O
-s
'fcst_hour=int(fcst_hour)'
${
outfile
}
${
outfile
}
# add ground truth data and persistence forecast from trained model
# add ground truth data and persistence forecast from trained model
patt
=
${
indir_ref
}
/vfp_date_
${
date1
}${
hh0
}
_sample_ind
*
.nc
patt
=
${
indir_ref
}
/vfp_date_
${
date1
}${
hh0
}
_sample_ind
*
.nc
if
ls
$patt
1>/dev/null 2<&1
;
then
if
ls
$patt
1>/dev/null 2<&1
;
then
file_src
=
`
ls
$patt
`
file_src
=
`
ls
$patt
`
ncks
-d
fcst_hour,5,11
-v
2t_ref,2t_persistence_fcst
-A
${
file_src
}
${
outfile
}
ncks
-d
fcst_hour,5,11
-v
2t_ref,2t_persistence_fcst
-A
${
file_src
}
${
outfile
}
else
else
echo
"Could not find reference data for
${
date2
}
..."
echo
"Could not find reference data for
${
date2
}
..."
mv
${
outfile
}
"
${
oufile
/.nc/_ref_miss.nc
}
"
mv
${
outfile
}
"
${
oufile
/.nc/_ref_miss.nc
}
"
fi
fi
date1
=
"
$(
date
-u
--date
=
"
$date1
tomorrow"
'+%Y%m%d'
)
"
date1
=
"
$(
date
-u
--date
=
"
$date1
tomorrow"
'+%Y%m%d'
)
"
date2
=
"
$(
date
-u
--date
=
"
$date2
tomorrow"
'+%Y-%m-%d %H:%M:00'
)
"
date2
=
"
$(
date
-u
--date
=
"
$date2
tomorrow"
'+%Y-%m-%d %H:%M:00'
)
"
done
done
done
done
# finally merge all data into a single file
cdo
-v
mergetime
${
outdir
}
/
*
_allfc.nc
${
outdir
}
/
${
yr
}
_era5_short_range_fcst
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