<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Mary,<br>
<br>
You're totally right, when I comment out the gsnBoxMargin resource, the
script works fine.<br>
In fact, I already use ImageMagick's convert with -trim option to
remove white space that I obtained even with the gsnBoxMargin resource,
so commenting it out doesn't bother me at all.<br>
<br>
Thank you very much for your help, I would never have suspected that
specific resource!<br>
Caroline<br>
<br>
Mary Haley a écrit :
<blockquote cite="mid:5F4CF129-79B3-445E-B13D-6AF5E7565A7D@ucar.edu"
type="cite">
<pre wrap="">Caroline,
The problem appears to be with setting gsnBoxMargin to 0.0.
This is causing an internal value of 1.0 to be calculated for vpWidthF and
0.0 for vpXF which NCL doesn't like for this particular case.
Is there a reason you need the plot to be as big as possible? Until we get a fix for this,
we might be able to provide you with a work-around if I know what you need to do with
the image.
For example, I've had good results with making an image larger and trimming all white space
by using ImageMagick's "convert" utility, along with "-trim" to remove white space, and
"-geometry" to increase the geometry.
--Mary
On Jun 7, 2010, at 9:35 AM, Mary Haley wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Caroline,
This sounds like a possible memory problem.
I would like to be able to run your script here .
Can you set:
res@gsnDebugWriteFileName = "serraud"
and rerun your script? This will create "serraud.nc", "serraud.ncl" and "serraud.res".
If you can then email me serraud.nc and serraud.ncl I can run it here. I don't need the *.res file.
If the data file is too big (> 10 Mb), let me know.
Thanks,
--Mary
On Jun 7, 2010, at 9:03 AM, Caroline Serraud wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello everyone,
I am facing some trouble to plot contour of 2m-temperature from GFS data downloaded from NCEP FTP site (for example, gfs.t18z.pgrb2f06)
NCL crashes when I run my script with default contour fill mode (area fill mode) but is ok with RasterFill mode.
But with a 0,5° resolution I would really appreciate area mode because raster mode is not that pretty (see example attached)
Did someone already experience plotting filled contour for 2m-temperature from GFS?
Caroline
--
Caroline Serraud - Ingénieur Etudes & Développements
------------------------------------------------------
METEO CONSULT / La Chaine Météo - Groupe Figaro
Département Informatique
Domaine de Marsinval F-78540 Vernouillet, FRANCE
Tél : 01 39 28 1990 - Fax : 01 39 71 85 31
e-mail : <a class="moz-txt-link-abbreviated" href="mailto:cs@meteoconsult.fr">cs@meteoconsult.fr</a>
------------------------------------------------------
Toute la météo sur le Web : <a class="moz-txt-link-freetext" href="http://www.meteoconsult.fr">http://www.meteoconsult.fr</a>
Toute la météo par téléphone : 3201
;*************************************************
; tempe_gfs.ncl
;************************************************
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"
;************************************************
begin
if (.not.isvar("v_file")) then
print("Le nom du fichier source n'est pas defini")
exit()
end if
;************************************************
; read in netCDF file
;************************************************
a = addfile(v_file,"r")
;************************************************
; read in zonal [u] and meridional [v] winds
;************************************************
t = a->TMP_P0_L103_GLL0(:,:)
t = t - 273.15
delete(t@units)
delete(t@long_name)
i_lat_min = v_lat_min + 0
i_lat_max = v_lat_max + 0
i_lon_min = v_lon_min + 0
i_lon_max = v_lon_max + 0
;************************************************
; create plot
;************************************************
wks_type = "ps"
wks =gsn_open_wks(wks_type,"tempe")
        gsn_define_colormap(wks,"BlWhRe") ; choose color map
res = True ; plot mods desired
        res@gsnMaximize = True
        res@gsnPaperOrientation = "landscape"
        res@gsnBoxMargin = 0.0
        res@gsnAddCyclic = False ; regional data
        res@lbLabelBarOn = False
        res@tmXBOn = False ; don't draw axis nor axis labels
        res@tmXTOn = False
        res@tmYLOn = False
        res@tmYROn = False
        res@cnLevelSelectionMode = "ManualLevels"
        res@cnMinLevelValF         = -15.
        res@cnMaxLevelValF         = 35.
        res@cnLevelSpacingF         = 1.
        res@cnFillOn = True ; turn on color for contours
        res@cnLinesOn = False ; turn off contour lines
        res@cnLineLabelsOn = False ; turn off contour line labels
        res@cnFillColors = ispan(2,102,2)
        res@cnInfoLabelOn = False
;        res@cnFillMode                = "RasterFill"
; zoom in on map
res@mpDataBaseVersion = "RANGS_GSHHS" ; high resolution coastline
res@mpDataResolution = "FinestResolution"
res@mpFillOn                 = False
res@mpOutlineOn         = False
res@mpPerimOn                = False
res@mpProjection         = "mercator"
res@mpLimitMode = "Corners"
res@mpLeftCornerLatF = i_lat_min
res@mpLeftCornerLonF = i_lon_min
res@mpRightCornerLatF = i_lat_max
res@mpRightCornerLonF = i_lon_max
plot=gsn_csm_contour_map(wks,t,res)
end
<1_tmp2m_2010060709.png>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Caroline Serraud - Ingénieur Etudes & Développements
------------------------------------------------------
METEO CONSULT / La Chaine Météo - Groupe Figaro
Département Informatique
Domaine de Marsinval F-78540 Vernouillet, FRANCE
Tél : 01 39 28 1990 - Fax : 01 39 71 85 31
e-mail : <a class="moz-txt-link-abbreviated" href="mailto:cs@meteoconsult.fr">cs@meteoconsult.fr</a>
------------------------------------------------------
Toute la météo sur le Web : <a class="moz-txt-link-freetext" href="http://www.meteoconsult.fr">http://www.meteoconsult.fr</a>
Toute la météo par téléphone : 3201 </pre>
</body>
</html>