Commit eca69378 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Fri Feb 1 00:00:25 EST 2019

parent dbbfd214
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; shar.ncl
; Carl Schreck (carl@cicsnc.org)
; January 2012
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Calculate vertical wind shear
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
begin
print_clock( "Here we go!" )
basePath = "~/data/ncep1/monthly/"
uPath = basePath + "uwnd.mon.mean.nc"
vPath = basePath + "vwnd.mon.mean.nc"
uFile = addfile( uPath, "r" )
vFile = addfile( vPath, "r" )
print_clock( "Reading uLow" )
uLow = uFile->uwnd(:,{850},:,:)
print_clock( "Reading vLow" )
vLow = vFile->vwnd(:,{850},:,:)
print_clock( "Reading uHigh" )
uHigh = uFile->uwnd(:,{200},:,:)
print_clock( "Reading vHigh" )
vHigh = vFile->vwnd(:,{200},:,:)
print_clock( "Calculating Shear" )
uShear = uHigh - uLow
copy_VarMeta( uHigh, uShear )
uShear@long_name = "Zonal Wind Shear"
uShear@units = "m/s"
vShear = vHigh - vLow
copy_VarMeta( vHigh, vShear )
vShear@long_name = "Meridional Wind Shear"
vShear@units = "m/s"
magnitude = sqrt( uShear^2 + vShear^2 )
copy_VarMeta( uShear, magnitude )
magnitude@long_name = "Wind Shear Magnitude"
magnitude@units = "m/s"
print_clock( "Writing" )
setfileoption( "nc", "Format", "LargeFile" )
magPath = basePath + "shear.mon.mean.nc"
uShearPath = basePath + "uShear.mon.mean.nc"
vShearPath = basePath + "vShear.mon.mean.nc"
system( "rm " + magPath )
outFile = addfile(magPath,"c")
outFile->shear = magnitude
delete(outFile)
system( "rm " + uShearPath )
outFile = addfile(uShearPath,"c")
outFile->uShear = uShear
delete(outFile)
system( "rm " + vShearPath )
outFile = addfile(vShearPath,"c")
outFile->vShear = vShear
delete(outFile)
print_clock( "Thank you, come again." )
end
......@@ -21,24 +21,24 @@ begin
print_clock( "Here we go! " )
; These are some parameters that could be useful to have up top
varName = "sst"
varName = "vShear"
newFile = True
doCalcAnom = True
; basePath = "~/data/cfsr/monthly/" + varName
basePath = "~/data/ersst/v5/sst.mnmean"
; basePath = "~/data/ersst/v5/sst.mnmean"
; basePath = "~/data/oisst/oisst.month"
; inPath = basePath + ".total.nc"
inPath = basePath + ".nc"
climPath = basePath + ".clim.1981.2010.nc"
anomPath = basePath + ".anom.nc"
stdPath = basePath + ".std.nc"
; basePath = "~/data/ncep1/monthly/"
; inPath = basePath + varName + ".mon" + ".mean.nc"
; climPath = basePath + varName + ".mon" + ".clim.nc"
; anomPath = basePath + varName + ".mon" + ".anom.nc"
; stdPath = basePath + varName + ".mon" + ".std.nc"
; inPath = basePath + ".nc"
; climPath = basePath + ".clim.1981.2010.nc"
; anomPath = basePath + ".anom.nc"
; stdPath = basePath + ".std.nc"
basePath = "~/data/ncep1/monthly/"
inPath = basePath + varName + ".mon" + ".mean.nc"
climPath = basePath + varName + ".mon" + ".clim.nc"
anomPath = basePath + varName + ".mon" + ".anom.nc"
stdPath = basePath + varName + ".mon" + ".std.nc"
climStart = 1981001
climEnd = 2010366
......
......@@ -43,14 +43,14 @@
<li><a class="trigger" href="/internal/">&nbsp;</a>
</li>
<li><a class="trigger" href="http://www.ucar.edu">UCAR</a>
</li>
<li><a class="trigger" href="http://www.ncar.ucar.edu">NCAR</a>
</li>
<li><a class="trigger" href="http://www.cisl.ucar.edu">CISL</a>
</li>
<li><a class="trigger" href="http://www.vets.ucar.edu">VETS</a>
</li>
</ul>
</div><!-- end nav_org -->
......@@ -62,9 +62,10 @@
<li><a class="trigger" href="/Download/">Download</a>
</li>
<li><a class="trigger" href="/citation.shtml">Citing NCL</a>
</li>
<li><a class="trigger" href="/contributors.shtml">Contributors</a>
<li><a class="trigger" href="/citation.shtml">Citing NCL</a>
</li>
</ul>
......@@ -90,7 +91,7 @@
<li><a href="/Download/" class="subitem">Download</a></li>
<li><a href="/current_release.shtml" class="subitem">What's New</a></li>
<li><a href="/Document/" class="subitem">Documentation</a></li>
<li><a href="/citation.shtml" class="subitem">How to cite NCL</a></li>
<li><a href="/citation.shtml" class="subitem">Citing NCL</a></li>
</ul>
</li>
......@@ -167,6 +168,7 @@
<li><a href="/Document/Graphics/hlures.shtml" class="subitem">.hluresfile</a></li>
<li><a href="/Document/Graphics/color_table_gallery.shtml" class="subitem">Color Tables</a></li>
<li><a href="/Document/Graphics/font_tables.shtml" class="subitem">Font Tables</a></li>
<li><a href="/Document/Language/error_messages.shtml" class="subitem">Error Messages</a></li>
<li><a href="/Document/Graphics/Images/dashpatterns.png" class="subitem">Dash Pattern Table</a></li>
<li><a href="/Document/Graphics/Images/fillpatterns.png" class="subitem">Fill Pattern Table</a></li>
<li><a href="/Document/Graphics/Images/markers.png" class="subitem">Marker Table</a></li>
......@@ -197,12 +199,15 @@
<ul>
<li><a href="/Support/email_lists.shtml" class="subitem">Email Lists</a></li>
<li><a href="/Applications/editor.shtml" class="subitem">Editor enhancements</a></li>
<li><a href="/Document/Language/error_messages.shtml" class="subitem">Error messages</a></li>
<li><a href="/Document/Manuals/" class="subitem">Manuals</a></li>
<li><a href="https://www2.cisl.ucar.edu/resources/computational-systems/geyser-and-caldera/visualization/using-ncl-the-cheyenne-environment">NCL on Cheyenne</a>
<li><a href="/Training/" class="subitem">Training</a></li>
<li><a href="/Training/Webinars/" class="subitem">Webinars</a></li>
<li><a href="/Training/Workshops/" class="subitem">Workshops</a></li>
<li><a href="/Document/" class="subitem">Documentation</a></li>
<li><a href="/FAQ/" class="subitem">FAQ</a></li>
<li><a href="/known_bugs.shtml" class="subitem">Known Bugs</a></li>
<li><a href="/ftp_files.shtml" class="subitem">Uploading files via ftp</a></li>
<li><a href="/report_bug.shtml" class="subitem">Report Bugs</a></li>
</ul>
</li>
......@@ -210,11 +215,11 @@
<li>
<a href="/External/" class='trigger'>External</a>
<ul>
<li><a href="https://www2.cisl.ucar.edu/resources/computational-systems/geyser-and-caldera/visualization/using-ncl-the-cheyenne-environment">NCL on Cheyenne</a>
<li><a href="http://climatedataguide.ucar.edu/" class="subitem">Climate Data Guide</a></li>
<li><a href="https://code.zmaw.de/projects/cdo/" class="subitem">Climate Data Operators</a></li>
<li><a href="http://www.earthsystemmodeling.org/" class="subitem">Earth System Modeling Framework</a></li>
<li><a href="http://nco.sourceforge.net/" class="subitem">NetCDF Operators</a></li>
<li><a href="http://trac.mcs.anl.gov/projects/parvis/wiki" class="subitem">ParVis</a></li>
<li><a href="http://www.pyngl.ucar.edu/" class="subitem">PyNGL</a></li>
<li><a href="http://www.pyngl.ucar.edu/Nio.shtml" class="subitem">PyNIO</a></li>
</ul>
......@@ -240,28 +245,22 @@
<div id="subheader"><!-- begin subheader -->
<map name="ncl-home">
<area shape="rect" coords="0,0,65,40" href="/index.shtml">
<area shape="rect" coords="580,0,640,40" href="http://www.ncar.ucar.edu">
<area shape="rect" coords="540,0,615,40" href="http://www.ncar.ucar.edu">
<area shape="rect" coords="625,0,665,40" href="http://www.nsf.gov">
</map>
<div id="nclheader">
<img src="/Images/ncl-b4.jpg" alt="NCL Website header" usemap="#ncl-home">
<img src="/Images/NCL_NCAR_NSF_banner.png" height=40 "NCL Website header" usemap="#ncl-home">
</div>
<div id="googlesearch">
<form name="google" action="http://www.ucar.edu/search/googleresults.jsp" id="cse-search-box">
<div id="googlesearch">
<input type="hidden" name="cx" value="008424664622949020059:afj38jxaljc" />
<input type="hidden" name="cof" value="FORID:9" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="12" />
<input type=hidden name=hq value="site:www.ncl.ucar.edu">
<a href="http://www2.ucar.edu/advanced-search">advanced</a>
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
<p class="datetime"> </p>
<form style="float:right" id="cse-search-box" action="http://google.com/cse">
<input type="hidden" name="cx" value="016712339613867830978:igijo92w2zo" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="31" maxlength="255" id="searchbox" /><label for="searchbox">Search</label>
<input type="hidden" name="hq" value="site:www.ncl.ucar.edu">
</form>
</div><!-- end googlesearch -->
</div><!-- end subheader -->
......@@ -363,8 +362,8 @@ appear exactly as they are listed here.
<!-- begin footer -->
<div id="footer">
<p>&#169;2013 <a href="http://www.ucar.edu">UCAR</a> | <a href="http://www.ucar.edu/legal/privacy_policy.shtml">Privacy Policy</a> | <a href="http://www.ucar.edu/legal/terms_of_use.shtml">Terms of Use</a>
| <a href="mailto:ncladmin@ucar.edu">Contact the Webmaster</a> | <a href="http://www.nsf.gov">Sponsored by NSF</a></p>
<a href="mailto:ncladmin@ucar.edu">Contact the Webmaster</a>
<!-- end footer -->
......
......@@ -153,7 +153,7 @@ begin
;;;;This part still needs work!!
dq = str_get_dq()
line_search = "^<a href=" + dq + names(icat,2)
line_search = "<a href=" + dq + names(icat,2)
ii = str_match_ind(lines,line_search)
new_lines = lines(ii)
......
......@@ -13,7 +13,8 @@ begin
; These are some parameters that could be useful to have up top
headerFile = "ncl_header.vim"
footerFile = "ncl_footer.vim"
outFile = "ncl3.vim"
outFile = "ncl.vim"
dicFile = "ncl.dic"
boilerPlate = \
(/ str_get_dq() + " Vim syntax File", \
......@@ -51,4 +52,13 @@ begin
output = out4
asciiwrite( outFile, output )
dic0 = array_append_record( boilerPlate, procs_and_funcs, 0 )
dic1 = array_append_record( dic0, resources, 0 )
dic2 = array_append_record( dic1, keywords, 0 )
dictionary = dic2
asciiwrite( "tmp.dic", dictionary )
system( "fold -s -w80 tmp.dic > " + dicFile )
system( "rm tmp.dic" )
end
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment