<div dir="ltr"><div>[1] Run the code I sent you. Use your file.<br></div><div><br>[2] As noted by Guido, the commands are to be issued from the unix/linux command line. <b>NOT from within NCL.</b> <br><br>%> ncl -V<br>%> uname -a<br>%> gcc --version<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 23, 2018 at 4:39 AM, <span dir="ltr"><<a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orleans.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the correction<br>
<br>
Now I get<br>
<br>
abossola@olivia:~$ gcc --version<br>
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0<br>
Copyright (C) 2017 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br>
<br>
abossola@olivia:~$ uname -a<span class=""><br>
Linux olivia 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux<br>
<br></span>
I tryed the script that Denis send me and is the same I have the contour lines but not the color (see the attached graphic)<div><div class="h5"><br>
Le 23/08/2018 12:09, Guido Cioni a écrit :<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Be careful!<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
abossola@olivia:~/Adriana/CESM<wbr>/MAM7/MAM7_tes4$ gcc--version<br>
gcc--version: command not found<br>
</blockquote>
<br>
It should be gcc --version (NOTE THE SPACE!!) and not gcc--version<br>
<br>
You do the same error afterwards<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ncl 1> ncl-V<br>
</blockquote>
<br>
instead than ncl -V, although also this command should be executed<br>
oustide of NCL (only in the bash). The commands uname -a and gcc<br>
--version as well need to be executed outside of NCL.<br>
<br>
I'd suggest you to have a general introduction on Linux and NCL before<br>
attempting to fix your plot.<br>
<br>
However, did you try the script that Dennis sent?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 23. Aug 2018, at 11:12, <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a> wrote:<br>
<br>
Hi<br>
<br>
I try the commands and this is what I obtain:<br>
<br>
abossola@olivia:~/Adriana/CESM<wbr>/MAM7/MAM7_tes4$ ncl -V<br>
6.4.0<br>
abossola@olivia:~/Adriana/CESM<wbr>/MAM7/MAM7_tes4$ uname -a<br>
Linux olivia 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07<br>
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux<br>
abossola@olivia:~/Adriana/CESM<wbr>/MAM7/MAM7_tes4$ gcc--version<br>
gcc--version: command not found<br>
<br>
Other wise if I type this command in the ncl shell, then says:<br>
<br>
ncl 1> ncl-V<br>
fatal:syntax error: line 1 before or near -<br>
ncl-<br>
<br>
ncl 3> uname -a<br>
fatal:syntax error: line 3 before or near -<br>
uname -<br>
------^<br>
<br>
fatal:error in statement<br>
ncl 4> gcc--version<br>
fatal:syntax error: line 4 before or near -<br>
gcc-<br>
----^<br>
<br>
fatal:error in statement<br>
<br>
I know that it is very strange because in my old computer everything<br>
working, it could be due to the version of Linux?<br>
<br>
This is my version now:<br>
NAME="Ubuntu"<br>
VERSION="18.04.1 LTS (Bionic Beaver)"<br>
ID=ubuntu<br>
ID_LIKE=debian<br>
PRETTY_NAME="Ubuntu 18.04.1 LTS"<br>
VERSION_ID="18.04"<br>
HOME_URL="<a href="https://www.ubuntu.com/" rel="noreferrer" target="_blank">https://www.ubuntu.c<wbr>om/</a>"<br>
SUPPORT_URL="<a href="https://help.ubuntu.com/" rel="noreferrer" target="_blank">https://help.ubun<wbr>tu.com/</a>"<br>
BUG_REPORT_URL="<a href="https://bugs.launchpad.net/ubuntu/" rel="noreferrer" target="_blank">https://bugs.l<wbr>aunchpad.net/ubuntu/</a>"<br>
<br>
</blockquote>
PRIVACY_POLICY_URL="<a href="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" rel="noreferrer" target="_blank">https://ww<wbr>w.ubuntu.com/legal/terms-and-<wbr>policies/privacy-policy</a>"<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
VERSION_CODENAME=bionic<br>
UBUNTU_CODENAME=bionic<br>
<br>
I really appreciate any help!<br>
<br>
Le 22/08/2018 17:58, Dennis Shea a écrit :<br>
Sorry. I accidentally hit "Send".<br>
Attached is the 2nd plot.<br>
On Wed, Aug 22, 2018 at 9:56 AM, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br>
Not sure why you are not getting color.<br>
If the following does not create color then please send the output<br>
from<br>
%> ncl -V<br>
%> uname -a<br>
%> gcc--version<br>
=========<br>
;---read in zonal winds<br>
;a = addfile("<a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">MAM_GEOS_1anee.cam.h0<wbr>.2000-12-07-00000.nc</a> [1]","r")<br>
;u = a->U(0,35,:,:)<br>
a = addfile("<a href="http://uwnd.2008.nc" rel="noreferrer" target="_blank">uwnd.2008.nc</a> [2]","r")<br>
u = a->uwnd(0,10,:,:)<br>
printVarSummary (u)<br>
;print(u)<br>
wks = gsn_open_wks("png","adriana") ; send graphics to PNG file<br>
res = True<br>
res@gsnMaximize = True ; maximize in frame<br>
res@cnLinesOn = True<br>
res@cnFillOn = True<br>
res@cnFillPalette = "BlueYellowRed" ; change the color palette<br>
res@tiMainString = "Default"<br>
plot = gsn_csm_contour_map(wks,u,res)<br>
res@mpFillDrawOrder = "PostDraw" ; Make sure land fill is drawn<br>
; on top of filled contours<br>
res@tiMainString = "add gray land fill after contouring"<br>
plot = gsn_csm_contour_map(wks,u,res)<br>
On Wed, Aug 22, 2018 at 2:22 AM,<br>
<<a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlea<wbr>ns.fr</a>> wrote:<br>
Hi thank you very much for the answer<br>
I corrected U and print the variable for see if this have values<br>
now is U(0,34,:,:)<br>
Variable: u<br>
Type: float<br>
Total Size: 55296 bytes<br>
13824 values<br>
Number of Dimensions: 2<br>
Dimensions and sizes: [lat | 96] x [lon | 144]<br>
Coordinates:<br>
lat: [ -90.. 90]<br>
lon: [ 0..357.5]<br>
Number Of Attributes: 6<br>
lev : 581.2501460313797<br>
time : 327<br>
mdims : 1<br>
units : m/s<br>
long_name : Zonal wind<br>
cell_methods : time: mean<br>
And also have values, I checked it with print(u)<br>
But still the graphic is empty (white, no contour fill)<br></div></div>
On the other hand I can not access to <a href="http://ftp.cgd.ucar.edu" rel="noreferrer" target="_blank">ftp.cgd.ucar.edu</a> [1] [3] for<div><div class="h5"><br>
attach my file. Say:<br>
ERROR<br>
The requested URL could not be retrieved<br>
Any other idea how can I pass the file<br>
<a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">MAM_GEOS_1anee.cam.h0.2000-12-<wbr>07-00000.nc</a> [1]<br>
Thank you very much<br>
Le 21/08/2018 20:36, Dennis Shea a écrit :<br>
[0]<br>
If you are just learning NCL, I suggest you look at the USER MANUAL<br>
at:<br>
<a href="HTTP://WWW.NCL.UCAR.EDU/DOCUMENT/MANUALS/" rel="noreferrer" target="_blank">HTTP://WWW.NCL.UCAR.EDU/DOCUME<wbr>NT/MANUALS/</a> [4] [6]<br>
[1]<br>
As noted by Toni,<br>
u = U(0,,:,:)<br>
is not correct. In fact, it should have generated a FATAL subscript<br>
syntax error.<br>
Note: although "fatal", NCL will continue. In fact, it will still<br>
try<br>
to create the plot. Since it did not have valid data, NCL generated<br>
a<br>
background and a default color lable bar. That is what you attached.<br>
[2]<br>
Your following resource setting needs some clarification:<br>
res@tiMainString = "NCL version 6.1.x will give you gray land"<br>
For historical reasons, NCL's default graphic mode is<br>
black-and-white<br>
(B/W). This is true of *all* NCL versions. Not just 6.1.x.<br>
When, 'gsn_csm_contour_map' is used, the default background is<br>
continental outlines with light gray used to fill land areas. See:<br>
<a href="HTTP://WWW.NCL.UCAR.EDU/APPLICATIONS/CYLINEQ.SHTML" rel="noreferrer" target="_blank">HTTP://WWW.NCL.UCAR.EDU/APPLIC<wbr>ATIONS/CYLINEQ.SHTML</a> [5] [7]<br>
Examples 1 and 2<br>
Color is turned on via:<br>
res@cnFillOn = True ; make color graphic<br>
When color is activated, (a) the background map including the light<br>
gray land fil is generated; then, (b) the color contour are drawn<br>
over<br>
that background. The light gray land fill is overwritten (no big<br>
deal). The following resource setting tells the<br>
'gsn_csm_contour_map'<br>
do the colr contours and then force the gray land fill last. [There<br>
are some reasons for doing that.]<br>
res@mpFillDrawOrder = "PostDraw" ; Make sure land fill is drawn<br>
; on top of filled contours<br>
[3]<br>
If you want you can ftp a sample file to:<br></div></div>
ftp <a href="http://ftp.cgd.ucar.edu" rel="noreferrer" target="_blank">ftp.cgd.ucar.edu</a> [1] [3] [8]<span class=""><br>
anonymous<br>
your_email<br>
cd incoming<br>
put <a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">MAM_GEOS_1anee.cam.h0.2000-12-<wbr>07-00000.nc</a> [1] [9]<br>
quit<br>
On Tue, Aug 21, 2018 at 9:45 AM, Toni Klemm <<a href="mailto:toni-klemm@tamu.edu" target="_blank">toni-klemm@tamu.edu</a>><br>
wrote:<br>
Hi Adriana,<br>
I noticed there are two commas in the command to extract the sind<br>
vectors: u = a->U(0,,:,:) Could that be the problem?<br>
Could you attach the netCDF file from the example that you’re<br>
using? (<a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">MAM_GEOS_1anee.cam.h0.2000-12<wbr>-07-00000.nc</a> [1] [1])<br>
Toni<br>
Toni Klemm, Ph.D.<br>
Postdoctoral Research Associate<br>
Department of Ecosystem Science and Management<br>
College of Agriculture and Life Sciences<br>
Texas A&M University, College Station, TX<br>
Contributor to the Early Career Climate Forum [3]<br>
</span><a href="http://www.toni-klemm.de" rel="noreferrer" target="_blank">www.toni-klemm.de</a> [2] [6] [4] | @toniklemm [5]<div><div class="h5"><br>
On Aug 21, 2018, at 10:01 AM, <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a><br>
wrote:<br>
Hi all<br>
I have a problem with ncl when I try to plot a contour graphic. I<br>
thought it was a mistake I was making, but then when I try with a<br>
example very simple still appears blank. And ncl does not tell me<br>
any error.<br>
Here is the script (have my file but is exactly the same that<br>
newcolor_1.ncl)<br>
;*****************************<wbr>*******************<br>
; zonal_2.ncl<br>
;<br>
; Concepts illustrated:<br>
; - Drawing a zonal means plot<br>
; - Using dim_avg_Wrap to calculate a zonal average<br>
;*****************************<wbr>*******************<br>
;load "/usr/lib/ncarg/nclscripts/csm<wbr>/gsn_code.ncl"<br>
;load "/usr/lib/ncarg/nclscripts/csm<wbr>/gsn_csm.ncl"<br>
;load "/usr/lib/ncarg/nclscripts/csm<wbr>/contributed.ncl"<br>
;*****************************<wbr>*******************<br>
begin<br>
;*****************************<wbr>*******************<br>
; variable and file handling<br>
;*****************************<wbr>*******************<br>
;---read in zonal winds<br>
a = addfile("<a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">MAM_GEOS_1anee.cam.h0<wbr>.2000-12-07-00000.nc</a> [1]<br>
[1]","r")<br>
u = a->U(0,,:,:) ; July zonal<br>
winds<br>
wks = gsn_open_wks("png","newcolor")<wbr> ; send graphics to PNG<br>
file<br>
res = True<br>
res@gsnMaximize = True ; maximize in frame<br>
res@cnLinesOn = False<br>
res@cnFillOn = True<br>
res@cnFillPalette = "BlueYellowRed" ; change the color<br>
palette<br>
res@mpFillDrawOrder = "PostDraw" ; Make sure land fill is drawn<br>
; on top of filled contours<br>
res@tiMainString = "NCL version 6.1.x will give you gray land"<br>
plot = gsn_csm_contour_map(wks,u,res)<br>
end<br>
I obtained a map without color fill, I was looking in some<br>
previous talk but nothing works. Can Anyone help me on this?<br>
thanks<br>
I attached the maps<br>
Thank you<br>
--<br>
Adriana Bossolasco<br>
LPC2E UMR 7328 (CNRS, Université d'Orléans)<br>
3A avenue de la Recherche Scientifique<br>
45071 Orléans Cedex 2 - FRANCE<br>
Tel +33 (0)2 38 25 52 85<br>
e-mail:<br>
<br>
</div></div></blockquote><div><div class="h5">
<a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a><newcolor.png>____________<wbr>______________________________<wbr>_____<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a> [7] [2]<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a> [7] [2]<br>
</blockquote>
Links:<br>
------<br></div></div>
[1] <a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">http://MAM_GEOS_1anee.cam.h0.2<wbr>000-12-07-00000.nc</a> [3] [1]<div><div class="h5"><br>
[2] <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a> [7]<br>
[3] <a href="http://www.eccforum.org" rel="noreferrer" target="_blank">http://www.eccforum.org</a><br>
[4] <a href="http://www.toni-klemm.de" rel="noreferrer" target="_blank">http://www.toni-klemm.de</a><br>
[5] <a href="http://twitter.com/toniklemm" rel="noreferrer" target="_blank">http://twitter.com/toniklemm</a><br>
[6] <a href="http://www.ncl.ucar.edu/Document/Manuals/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Manuals/</a> [8]<br>
[7] <a href="http://www.ncl.ucar.edu/Applications/cylineq.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/cylineq.shtml</a> [9]<br>
[8] <a href="http://ftp.cgd.ucar.edu" rel="noreferrer" target="_blank">http://ftp.cgd.ucar.edu</a><br>
[9] <a href="http://12-07-00000.nc" rel="noreferrer" target="_blank">http://12-07-00000.nc</a><br>
--<br>
Adriana Bossolasco<br>
LPC2E UMR 7328 (CNRS, Université d'Orléans)<br>
3A avenue de la Recherche Scientifique<br>
45071 Orléans Cedex 2 - FRANCE<br>
Tel +33 (0)2 38 25 52 85<br>
e-mail: <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a><br>
Links:<br>
------<br>
[1] <a href="http://MAM_GEOS_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">http://MAM_GEOS_1anee.cam.h0.2<wbr>000-12-07-00000.nc</a><br>
[2] <a href="http://uwnd.2008.nc" rel="noreferrer" target="_blank">http://uwnd.2008.nc</a><br>
[3] <a href="http://ftp.cgd.ucar.edu" rel="noreferrer" target="_blank">http://ftp.cgd.ucar.edu</a><br>
[4] <a href="HTTP://WWW.NCL.UCAR.EDU/DOCUMENT/MANUALS/" rel="noreferrer" target="_blank">HTTP://WWW.NCL.UCAR.EDU/DOCUME<wbr>NT/MANUALS/</a><br>
[5] <a href="HTTP://WWW.NCL.UCAR.EDU/APPLICATIONS/CYLINEQ.SHTML" rel="noreferrer" target="_blank">HTTP://WWW.NCL.UCAR.EDU/APPLIC<wbr>ATIONS/CYLINEQ.SHTML</a><br>
[6] <a href="http://www.toni-klemm.de" rel="noreferrer" target="_blank">http://www.toni-klemm.de</a><br>
[7] <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
[8] <a href="http://www.ncl.ucar.edu/Document/Manuals/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Manuals/</a><br>
[9] <a href="http://www.ncl.ucar.edu/Applications/cylineq.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/cylineq.shtml</a><br>
<br>
--<br>
Adriana Bossolasco<br>
LPC2E UMR 7328 (CNRS, Université d'Orléans)<br>
3A avenue de la Recherche Scientifique<br>
45071 Orléans Cedex 2 - FRANCE<br>
Tel +33 (0)2 38 25 52 85<br>
e-mail: <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a><br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
Guido Cioni<br>
<a href="http://guidocioni.altervista.org" rel="noreferrer" target="_blank">http://guidocioni.altervista.o<wbr>rg</a><br>
<br>
<br></div></div>
Links:<br>
------<br>
[1] <a href="http://ftp.cgd.ucar.edu" rel="noreferrer" target="_blank">http://ftp.cgd.ucar.edu</a><br>
[2] <a href="http://www.toni-klemm.de" rel="noreferrer" target="_blank">http://www.toni-klemm.de</a><br>
[3] <a href="http://mam_geos_1anee.cam.h0.2000-12-07-00000.nc" rel="noreferrer" target="_blank">http://mam_geos_1anee.cam.h0.2<wbr>000-12-07-00000.nc</a><br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Adriana Bossolasco<br>
LPC2E UMR 7328 (CNRS, Université d'Orléans)<br>
3A avenue de la Recherche Scientifique<br>
45071 Orléans Cedex 2 - FRANCE<br>
Tel +33 (0)2 38 25 52 85<br>
e-mail: <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orlean<wbr>s.fr</a></div></div></blockquote></div><br></div>