1 / 19

File Handling with CMPS

File Handling with CMPS. Sylvia Murphy National Center for Atmospheric Research. http://www.cgd.ucar.edu/csm/support/FH/CMPS. Getting Started. Utilities located on dataproc only. Put /contrib in your PATH Execute script in local directory or include full path. Concatenated File.

nevan
Download Presentation

File Handling with CMPS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. File Handling with CMPS Sylvia Murphy National Center for Atmospheric Research http://www.cgd.ucar.edu/csm/support/FH/CMPS

  2. Getting Started • Utilities located on dataproc only. • Put /contrib in your PATH • Execute script in local directory or include full path

  3. Concatenated File ESVC • Extract variables from a GROUP of netCDF files • Will process ALL *.nc files in the directory. • Each file must have anUNLIMITED record dimension. • Output file is esvc.nc U V U V U V usage: esvc.scp v1,v2,…,vN

  4. 20 m Single Level Extraction • Extract a single layer from variables in a netCDF file. • Output file is topbot.nc • Required modifiers: • name of the dimension to be indexed • array index to be extracted • variables to extract 20 m usage:topbot.scp dim inx v1,v2,…,vN filename

  5. Extract 2D Variables • extract ALL 2D variables in a netCDF file. • output file is filename_2d.nc usage: e2d.scp file.nc

  6. Subregion Extraction • Extract a subregion from variables in a netCDF file. • Several required modifiers: • latmin and latmax • lonmin and lonmax • “-o” option indicates an oceanic file usage: subext.scp latmin latmax lonmin lonmax [-o] [-v v1,v2,…,vN] file

  7. Weighted Horizontal Average • Calculates weighted horizontal average • Can average over an oceanic basin or subregion • Output file is filename_have.nc Uses Gaussian weights (gw) Uses ocean area calculation usage: have.scp [-m int] [-sr latmin,latmax,lonmin,lonmax] [-v v1,v2,…,vN] file

  8. Weighted Volume Average • Weighted volume average of variables in a netCDF file. • Can average over oceanic basin or over a subregion • Output file is filename_volave.nc Uses gw and delta pressure (dp) Uses ocean volume calculation usage: volave.scp [-m int] [-sr latmin,latmax,lonmin,lonmax] [-v v1,v2,…,vN] file

  9. Zonal Average • Calculates zonal average of variables in a netCDF file. • Output file is filename_zonal.nc • Can average over an oceanic basin usage: zave.scp [-m int] [-v v1,v2,…,vN] file

  10. Difference/Anomalies • Calculate difference between variables in two netCDF files • Time dimension removed automatically from mean files • “-m” option indicates an anomaly calculation • Output file is cmps_anom.nc if one file is a mean file,otherwise it is cmps_diff.nc. usage: diff.scp [-m int] [-v v1,v2,…,vN] file1 file2

  11. Root Mean Squared Error • Calculate weighted RMSE variables in netCDF files. • Output is rmse.nc • Can be calculated over an ocean basin or subregion • “-l” option calculates a volume RMSE for 3D variables. usage: rmse.scp [-m int] [-sr latmin,latmax,lonmin,lonmax] [-v v1,v2,…,vN] file

  12. Multiplication • Multiply variables in the variable list by the set of constants and output results to a netCDF file • At least one variable and corresponding factor must be provided. • Can calculate over an oceanic basin usage: mult.scp -v v1,v2,v3 -f f1,f2,f3 [-m int] filename

  13. Addition • Adds variables in list and outputs results to netCDF file. • Name of resultant calculation is required • Can calculate over ocean basin. • If LSM file, then all ocean points are excluded regardless of basin index listed. usage: add.scp -v v1,v2,…,vN -n name [-m int] filename

  14. 20 C Level Latitude Longitude Isolevel Extraction • Extracts iso surface of a given value from a netCDF file • Output file is iso_filename.nc • Variable and value to be extracted must be specified • Works with variables that either increase or decrease with depth usage: iso.scp T 20 ocean_1.nc

  15. CFC 20 C Level Level Latitude Longitude Latitude Longitude Isolevel Interpolation • Extracts iso surface of a given value from a netCDF file • Interpolates a second variable to that iso surface • Output file is iso_interp_filename.nc • Variable and value to be extracted plus variable to be interpolated must be specified usage: iso_interp.scp T CFC 20 ocean_1.nc

  16. Transect • Calculate the great circle path between two points, and interpolate model data to path. • -p produces a plot in addition to file • Output is filename_title.nc • Number of points (npts) to interpolate is required usage: trans.scp leftlat,leftlon,rightlat,rightlon npts, title [-p] [-v v1,v2,…,vN] filename

  17. Time Series Extraction • Extracts a time series from each point given. • Output file is filename_tsext.nc • -a option will output individual ascii files Time Time usage: tsext.scp latarray lonarray [-a] [-v v1,v2,…,vN] file

  18. Vertical Average • Weighted vertical average of variables in a NCOM netCDF file. • Can average over oceanic basin or over a subregion • Output file is filename_vertave.nc NCOM Ocean files only usage: vertave.scp [-m int] [-sr latmin,latmax,lonmin,lonmax] [-v v1,v2,…,vN] file

  19. Resources Downloadable users manual: http://www.cgd.ucar.edu/csm/support/Document/manual.shtml On-line version of this presentation: http://www.cgd.ucar.edu/csm/support/Document/shows.shtml On-line home page: http://www.cgd.ucar.edu/csm/support/FH/CMPS/

More Related