[ncl-talk] problem with ncl_filedump *.nc ?
Dylan White
jdwhite5 at ncsu.edu
Wed Sep 19 06:12:29 MDT 2018
Rick,
Thanks for trying to get to the bottom of this. For a bit more info, I
installed from the pre-compiled binaries first and had the same problem,
and then tried out the conda install where the problem persisted. I also
had to install csh myself. Running those commands do indeed work, so I
made a workaround that you or others may find useful.
In a file called "ncl_filedump.ncl", I have written the line -
print(addfile(filePath,"r"))
Then, in a file called "ncl_filedump.csh", I have written the line - ncl
filePath=\"$1\" ncl_filedump.ncl
And in my "~/.bashrc" file, I have added the line - alias
ncl_filedump="csh /path/to/ncl_filedump.csh"
You'd have to replace "/path/to/ncl_filedump.csh" with where ever you've
placed the file, and this relies on "ncl_filedump.csh" and
"ncl_filedump.ncl" to be in the same directory. This uses C-shell to pass
the variable "filePath" to the NCL script, and to run it, after you've
sourced "~/.bashrc", you'd type "ncl_filedump /some/directory/file.nc", and
it will print out the file information. I'm sure this is missing some of
the functionality that the original ncl_filedump had, but it's good for now!
Thanks again for your help! Have a great day,
Dylan
On Wed, Sep 19, 2018 at 2:53 AM Sam McClatchie <smcclatchie at fishocean.info>
wrote:
> Hi Rick
>
> Thanks for looking into this. I do have the csh shell installed, but
> ncl_filedump gives the same error on my Ubuntu system:
>
> smcc at jaguar:/data/dynamic_data/scratch$ which csh
> /bin/csh
> smcc at jaguar:/data/dynamic_data/scratch$ /bin/csh
> % ncl_filedump sst.nc
> Segmentation fault
> % /bin/bash
> smcc at jaguar:/data/dynamic_data/scratch$
>
> I did not install NCL 6.5.0 with conda. I just used the pre-compiled
> binary, as described on this page:
> <http://www.ncl.ucar.edu/Download/install.shtml>
> <http://www.ncl.ucar.edu/Download/install.shtml>. I did not remove ncl
> 6.4.0 first, but the new install goes into its own directory.
>
> It's beginning to sound to me like there may be a minor difference between
> the conda install and the pre-compiled binary install on Ubuntu that
> somehow affects ncl_filedump.
>
> And yes, the basic functionality that you have requested me to test below
> works. For example the following code works fine.
> The graphic produced is here
> <https://my.pcloud.com/publink/show?code=XZvWI17Z2aF9F5VtdsXoRsHmt74BQQTkec4y>
> <https://my.pcloud.com/publink/show?code=XZvWI17Z2aF9F5VtdsXoRsHmt74BQQTkec4y>
>
> The data are here:
> <https://my.pcloud.com/publink/show?code=XZ8sI17ZM2y7639vxwFin6gmJR0ET0pwFKH7>
> <https://my.pcloud.com/publink/show?code=XZ8sI17ZM2y7639vxwFin6gmJR0ET0pwFKH7>
>
> And the code is here:
>
> ;=============================
> ; read in data
> in =
> addfile("/data/dynamic_data/datasets/currents_Copernicus_CMEMS_model_satellite/
> dataset-uv-rep-monthly_1536962814624.nc","r")
> time = in->time
> depth = in->depth
> lat = in->latitude
> lon = in->longitude
> uo = in->uo
> vo = in->vo
> ; print(vo)
>
> wks =
> gsn_open_wks("png","../figures/monthly_mean_total_surface_and_15m_velocities"
> )
>
> ; plot options
> res = True
> ; set coastline resolution
> res at mpDataBaseVersion = "MediumRes"
>
> res at gsnAddCyclic = False
> ; labelling/ label positions
> res at tiMainString = "Monthly mean surface (15m) velocities"
> res at gsnRightStringOrthogonalPosF = -1.2
> res at gsnRightStringParallelPosF = 1.1
>
> ; subset the region
> res at mpMinLatF = 25 ; range to zoom in on
> res at mpMaxLatF = 45.
> res at mpMinLonF = -130
> res at mpMaxLonF = -110.
> ; contours
> res at cnLevelSelectionMode = "ManualLevels"
> res at cnMinLevelValF = -0.5
> res at cnMaxLevelValF = 0.5
> res at cnLevelSpacingF = 0.05 ; contour spacing
>
> res at mpGridAndLimbOn = True ; turn on lat/lon lines
> res at mpPerimOn = False ; turn off box around plot
> res at mpGridLatSpacingF = 5. ; spacing for lat lines
> res at mpGridLonSpacingF = 5. ; spacing for lon lines
> res at mpFillOn = False
>
> res at cnFillOn = True ; color plot desired
> res at cnFillPalette = "cmocean_balance" ; set color map
> res at cnLineLabelsOn = False ; turn off contour lines
> res at txFontHeightF = 0.015
>
> ; res at vpXF = 0.1 ; make plot bigger
> ; res at vpYF = 0.9
> ; res at vpWidthF = 0.8
> ; res at vpHeightF = 0.8
>
> res at lbLabelFontHeightF = 0.015 ; label bar font height
>
> plot_currents = gsn_csm_contour_map(wks,uo(200,0,:,:),res)
> ; =================
>
> Best fishes
> Sam
>
> On 19/09/18 14:24, Rick Brownrigg wrote:
>
> Hi Sam and Dylan,
>
> I certainly appreciate both of you providing diagnostics in trying to
> troubleshoot this matter. It pains me to say that: i) you even have to
> experience this disruption, and ii) I can not replicate (and thus
> troubleshoot) the problem in any fashion :-(
>
> I could not glean any insight from the traces. A commonality seems to be
> Ubuntu, so I stood up a fresh Ubuntu 18.02 distro (on a virtual machine),
> and did a conda install of ncl into a fresh environment, and things work as
> expected. Of note - in the minimalist installation of Ubuntu 18.02, I did
> have to do an "apt-get" to install tcsh/csh -- do either of you recall this
> being an issue for you, and how did you acquire your "C-shell"?
>
> So, I don't get it -- ncl_filedump is nothing more than a C-shell script
> that sets up a bunch of stuff and then calls NCL to do little more than (if
> you were to do this from the command-line):
>
> $ ncl
> ncl 0> f = addfile("....your file...", "r")
> ncl 1> print(f)
>
> If either of you could//would, can you verify that at least this basic
> functionality works?
>
> I wish I had a better answer... :-/
>
> Rick
>
>
> On Mon, Sep 17, 2018 at 9:54 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Long story short -- Kevin and I have been talking about this issue with
>> ncl_filedump, and another one he pointed out involving ng4ex. The
>> commonalities are:
>> - emerged in 6.5.0
>> - both are c-shell drivers ultimately calling NCL
>> - all known incidents occur on Ubuntu systems
>>
>> I engaged one of the users to provide me shell-traces and system-traces,
>> but that was not revealing. He tells me that if he simply starts NCL and
>> opens one of the problematic files with addfile(), everything is OK.
>>
>> I can't replicate the problems anywhere on systems I have access to, and
>> am afraid we are going to have to stand up an Ubuntu syetem (VM) somewhere
>> to try and replicate the issue, :-/
>>
>>
>> ---------- Forwarded message ----------
>> From: Sam McClatchie <smcclatchie at fishocean.info>
>> Date: Mon, Sep 17, 2018 at 1:42 PM
>> Subject: Re: [ncl-talk] problem with ncl_filedump *.nc ?
>> To: Rick Brownrigg <brownrig at ucar.edu>
>>
>>
>> Hello Rick
>>
>> Thanks for looking into this. I am using Ubuntu 18.04. Here is the output
>> that you requested:
>>
>> smcc at jaguar:/data/dynamic_data/scratch$ ldd `which ncl`
>> linux-vdso.so.1 (0x00007ffe281a0000)
>> libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
>> (0x00007f2824005000)
>> libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
>> (0x00007f2823b8d000)
>> libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1
>> (0x00007f2823983000)
>> libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
>> (0x00007f282373e000)
>> libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0
>> (0x00007f282352e000)
>> libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6
>> (0x00007f28231f6000)
>> libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6
>> (0x00007f2822fe4000)
>> libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3
>> (0x00007f2822cb3000)
>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2822915000)
>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2822711000)
>> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>> (0x00007f2822383000)
>> libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1
>> (0x00007f2822153000)
>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
>> (0x00007f2821f3b000)
>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
>> (0x00007f2821d1c000)
>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f282192b000)
>> /lib64/ld-linux-x86-64.so.2 (0x00007f28278cb000)
>> libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
>> (0x00007f2821677000)
>> libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
>> (0x00007f2821445000)
>> libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1
>> (0x00007f282121d000)
>> libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0
>> (0x00007f2820fdd000)
>> libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16
>> (0x00007f2820dab000)
>> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2820b8e000)
>> libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
>> (0x00007f282098a000)
>> libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
>> (0x00007f2820784000)
>> libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f282056f000)
>> librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2820367000)
>>
>> smcc at jaguar:/data/dynamic_data/scratch$ uname -a
>> Linux jaguar 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC
>> 2018 x86_64 x86_64 x86_64 GNU/Linux
>>
>> smcc at jaguar:/data/dynamic_data/scratch$ gcc -v
>> Using built-in specs.
>> COLLECT_GCC=gcc
>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
>> OFFLOAD_TARGET_NAMES=nvptx-none
>> OFFLOAD_TARGET_DEFAULT=1
>> Target: x86_64-linux-gnu
>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu
>> 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
>> --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
>> --with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as
>> --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7
>> --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
>> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
>> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
>> --with-default-libstdcxx-abi=new --enable-gnu-unique-object
>> --disable-vtable-verify --enable-libmpx --enable-plugin
>> --enable-default-pie --with-system-zlib --with-target-system-zlib
>> --enable-objc-gc=auto --enable-multiarch --disable-werror
>> --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
>> --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none
>> --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>> Thread model: posix
>> gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
>> smcc at jaguar:/data/dynamic_data/scratch$
>>
>> Best fishes
>> Sam
>>
>> On 18/09/18 03:32, Rick Brownrigg wrote:
>>
>> This is odd -- I am able to dump all of these files, using my development
>> version (which is still very 6.5.0-ish) and a bonafide 6.5.0 as installed
>> via conda -- everything runs just fine.
>>
>> I wondering if I could get someone who is experiencing this issue to run:
>>
>> ldd `which ncl`
>> uname -a
>> gcc -v
>>
>> and send the output directly to me?
>>
>> Rick
>>
>>
>> --
>> Sam McClatchie (fisheries oceanographer)
>> & Elena Turin (accounting & auditing)
>> FishOcean Enterprises
>> 38 Upland Rd, Huia, Auckland 0604, New Zealand
>> <https://maps.google.com/?q=38+Upland+Rd,+Huia,+Auckland+0604,+New+Zealand&entry=gmail&source=g>
>> cell: 027 752 8495
>> Internet <http://www.fishocean.info>
>>
>>
>> "The time has come", the tui said,
>> "to talk of many things:
>> Of songs - and ferns - and flowering flax,
>> of Pukekos and dreams ..."
>>
>> (not Lewis Carroll)
>>
>>
>
> --
> Sam McClatchie (fisheries oceanographer)
> & Elena Turin (accounting & auditing)
> FishOcean Enterprises
> 38 Upland Rd, Huia, Auckland 0604, New Zealand
> cell: 027 752 8495
> Internet <http://www.fishocean.info>
>
>
> "The time has come", the tui said,
> "to talk of many things:
> Of songs - and ferns - and flowering flax,
> of Pukekos and dreams ..."
>
> (not Lewis Carroll)
>
--
*J. Dylan White*
Ph.D. Student, Atmospheric Sciences
N.C. State University
B.S. Physics & B.S. Mathematics
Cell: 703.232.8920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180919/a1557071/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SamMcClatchie2_small.jpg
Type: image/jpeg
Size: 45362 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180919/a1557071/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SamMcClatchie2_small.jpg
Type: image/jpeg
Size: 45362 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180919/a1557071/attachment-0001.jpg>
More information about the ncl-talk
mailing list