Last active
July 9, 2019 20:44
-
-
Save trondkr/61f2d31cf7d9c06159f73d3ba1d3671d to your computer and use it in GitHub Desktop.
Add empty sea-ice variables for ROMS init file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add empty sea-ice variables for ROMS init file. This is intended to make | |
# ROMS run by not failining on missing variables when initializing | |
export FINAL="hunnbunn50_ini_v5.nc" | |
export TMPFILE="tmp.nc" | |
rm -f ${FINAL} | |
rm -f ${TMPFILE} | |
echo "Copying original file to be modified" | |
scp "hunnbunn50_ini_v4.nc" ${FINAL} | |
echo "Load NOC module on Fram: module load NCO/4.7.7-intel-2018b" | |
module load NCO/4.7.7-intel-2018b | |
echo "Final output file will be named: ${FINAL}" | |
echo "Running ${dir}:" | |
ncap2 -O -s 'ageice=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'aice=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'hice=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'snow_thick=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'ti=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'sfwat=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'sig11=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'sig12=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'tisrf=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'uice=(u*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'vice=(v*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'sig22=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 's0mk=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 't0mk=(temp*0.0)' ${TMPFILE} ${FINAL} | |
ncap2 -O -s 'chu_iw=(temp*0.0)' ${FINAL} ${TMPFILE} | |
ncap2 -O -s 'tau_iw=(temp*0.0)' ${TMPFILE} ${FINAL} | |
echo "Program finished: ${FINAL}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment