[Thread Prev][Thread Next][Index]
Re: [ferret_users] backquote, precision, digits after decimal point
- To: Ryo Furue <furue@xxxxxxxxxx>
- Subject: Re: [ferret_users] backquote, precision, digits after decimal point
- From: Marco van Hulten <Marco.Hulten@xxxxxx>
- Date: Sun, 11 Mar 2018 11:45:43 +0100
- Arc-authentication-results: i=4; mx.google.com; dkim=pass header.i=@uib.no header.s=20160927 header.b=ZgsQTSr0; arc=pass (i=2 dkim=pass dkdomain=uib.no); spf=softfail (google.com: domain of transitioning marco.hulten@xxxxxx does not designate 52.222.5.176 as permitted sender) smtp.mailfrom=marco.hulten@xxxxxx
- Arc-authentication-results: i=3; mx.google.com; dkim=pass header.i=@uib.no header.s=20160927 header.b=ZgsQTSr0; arc=pass (i=2 dkim=pass dkdomain=uib.no); spf=softfail (google.com: domain of transitioning marco.hulten@xxxxxx does not designate 52.222.5.176 as permitted sender) smtp.mailfrom=marco.hulten@xxxxxx
- Arc-authentication-results: i=2; mx.google.com; dkim=pass header.i=@uib.no header.s=20160927 header.b=ZgsQTSr0; arc=pass (i=1 spf=pass spfdomain=uib.no dkim=pass dkdomain=uib.no); spf=softfail (google.com: domain of transitioning marco.hulten@xxxxxx does not designate 65.127.216.226 as permitted sender) smtp.mailfrom=Marco.Hulten@xxxxxx
- Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@uib.no header.s=20160927 header.b=ZgsQTSr0; spf=pass (google.com: domain of marco.hulten@xxxxxx designates 2001:700:200:30::141 as permitted sender) smtp.mailfrom=Marco.Hulten@xxxxxx
- Arc-message-signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-archive:list-help:list-post:list-id:mailing-list:precedence :content-transfer-encoding:mime-version:organization:references :in-reply-to:subject:cc:to:from:date:arc-authentication-results :arc-message-signature:arc-authentication-results :arc-message-signature:message-id:arc-authentication-results :arc-message-signature:dkim-signature:arc-authentication-results; bh=Egi+s6svhnLk54//qlGAo962TdQMh4uyWyqjVFDZriQ=; b=YqULPtLvsNPND8qKVHxp/bgwXsjZkxXiSYUX91rA4BAI2cio3cN5GCXsOGmzjJFRxo LwE7PH2d+s3AkFUf5eBZ+XLmC3fwNP2Tv0skZwy//yi+STRToijoxCORhvJNNKJVJ8er x9ntwMsi/cxgF7w/3Z6s53vOn0KPEDcphePNkRReEfXtFjlZcX25Jsj6NS0WS2lyxHz9 wEi1sNbBGmL5NkB9wyrY81E7TB84I+5OuGJQdTBOvLi9kzlLVAxETAMiBGKW9Wn5gdI1 ogk7ueUFaxW21II+eN64zjMCvix5nP73m3MdCp1LBXfqYN50k5S/UA2jDTP2h9LtOS6n ZgHw==
- Arc-message-signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results:arc-message-signature :arc-authentication-results:arc-message-signature:message-id :arc-authentication-results; bh=Egi+s6svhnLk54//qlGAo962TdQMh4uyWyqjVFDZriQ=; b=x9+upbezUd1BZ5fOJ2f7Sf3Of12g8gtvplDyvELAvK6wCnUankpkHXr2VPRest1cZi tcgDj1rjE9mR7PuePvRCth3bryG7tkelN9GztP4q9cXrQzf8v34F3V3CKyxSa6YtmQ36 /zv0CDo9A2roIthHZySDVPVmd52U+TwidQHLOPcK7f9zJ2kqewJG/djF49UEMk7ZfCw0 M5ApfpxRVNaOalCOBWiTKH6Nysi5APcCQVmmZX793B6yLhq8TRm1Z3Us6grJBDxMJxIa BNdXd27cE89bMf1B2I7v7//Cz65CeDlcezVHk9pUdg4JV+Y28Au9tyFB+ZG98AXoYn4z 29VA==
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results:arc-message-signature :arc-authentication-results; bh=Egi+s6svhnLk54//qlGAo962TdQMh4uyWyqjVFDZriQ=; b=PBEzOUP6niqpaYuGM06USJV7lsLZ76E+w+wWjZlFvQsqAAVTE5SfrGztVfTGEDjxoT E6ASPylzIiEvgePYDCK2zAyBf7H2V3Z6fT3IRRDlT4la2G0BuxM+8mo1V43euFYBQNyc b0uPucboegOLAPb11kl2xrKCTsVU5QbknrsdjWhPgw9NRZNM6bDlDc/Tigs+0JQBlR7u ZYRorOBfzPmEEePyafos+YH93OQ2i3yw85gmPf9XF84KjoD0LvOrRRW1y7jMwlDDWe/O eYPODiMaBSj3u9OX91xBWjOBBwkuB5URCEUXiQLmRShp41uEjcRphetKPVnyMqJW3C24 jPLQ==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=Egi+s6svhnLk54//qlGAo962TdQMh4uyWyqjVFDZriQ=; b=m4mjvBQlya/7Ry3Xx7HrxXOdAuB+6OJ6qMxTXdHD3h2/EfdgE7ENp3TtynUMTM2PPg 11TEYCGqZhElcdUZfyMCt55f0f53ZsVjDzlX2ZC+dcYdnetPpqA3WL0+elbxhbKT4N9r QbKxihup9Qd7y0C9DubbKOmwzkkIc5lIWO9MzEbxkQWULelc4U+Aaz4/vLCEWb3iZ/m3 Ajkx/jbuLnT3RLc/jkASRSbvu/qSQuyJRIWp8XzxAnnQfHkWW3dulW5yTFJVD/crSAVg 1Z9ZmK77RMeyibBLVrfaqgqmFza5vzhK4FVeNuagsSdZ1iRzlCqXfXcB9OCBbd/gfwZG 73Ng==
- Arc-seal: i=4; a=rsa-sha256; t=1520765155; cv=pass; d=google.com; s=arc-20160816; b=FHRuJ5Nij5OfkFnhEzgzkkqrNhOyZO6HY97OP/aKCQXOpuvh3dPT7MO2QyZaopx5h6 OzK0gyswygPCGToFY9wITP7q/C/jkQab4F7mUsTyHO7QBUautB+M1beTkXRHSiKVf/FJ at8Os70EUYyClw7+Ry8byCWS/LzJWoG7BA8ivxeXNfIoxQ/Ofxp8FM/jM6HKhZ7G0JX4 Zd7/wI2L9JCzlohJ+AMRjQ64iXZ52h10Jt8RUidJZw8eLa3QLATrz0imPUc+/eBZ71hQ Wc0w0vmQ/hAmKTJUujP3qOD1nlh5o7DRo7ql2Iy2WYJnqXDYiXXXs4g4rNpAf4J8v1kq nxjw==
- Arc-seal: i=3; a=rsa-sha256; t=1520765155; cv=pass; d=google.com; s=arc-20160816; b=XZjf+bqY609MYa9vSXbSiijgLq8+umzCM529xFQewncM1jtCrXahdtROYpTG4wTXSu o5S1GwFAeN9teClv8OdCZqRDXbOV31OY74MbtVtcPcbpHS7Zm2ShT6QTZZsZYQpMfbn6 A+qSPp3W2kF/PZCr0L9ff9tjh6Kcu7ctdom8nx/DXK/BVrmJNI/9EMViw8cY59x1IRQ+ JeegGd67goHyyaoZ94fR+scyqxlxzsrEfMCp+D6k1VrBrosKWfqfps8cAemdCpmbm6NN p0ylH26kFB8IRArKXQXZ3rX+0oTd+wNhw+IwrgLs5aNfHY+mrLeakFpr5y58zSXLw7yG nKow==
- Arc-seal: i=2; a=rsa-sha256; t=1520765151; cv=pass; d=google.com; s=arc-20160816; b=kYXE4eb9ujADqFovwbp+0iK50xwJmW4ws6c5mz+cGqvpKY+e5OYnA8fF5oq6vNVQB4 RT7DX0Mk5lSpz7ICXHjjobVtB9KGjPbOOvwxPsBMIaTI0P96mLuo7zdEC4oLUOzIRU2i xOd6w+LnK4mPd9oUOhLnVANQ3xJjXBbrj42/i52IrzA5QBmmISXBsdRVI8dnbquCNMG4 qToR3zs3+HglTPDMsz+C7DYR2Or+4Hi9Y0+1VdC8tX+ec0HL/7xlNurSzQQ8/7CYhFXS GJEuu/vcszZ2eoS7Yy8tzeuTWGIehABvAPCaJuVzoC642EmfhMcG/zLrXdtLB+HL9+nZ X5Vg==
- Arc-seal: i=1; a=rsa-sha256; t=1520765145; cv=none; d=google.com; s=arc-20160816; b=rxIx09bYf3s2P9kmNafl96CDiQGLoe1kkiyVTjZaiJzxFRRgyEg90MCrQhlyaf95ky OLou0YS65ZCL/k4cD7mhB+6J67TGwBbGHrP7CG5Sddjj26oJ8ziP9aI3Fcd4ZzfIIdPM vRv7P3zZsimPRMPdXD3Z/2fpjpPmvgs4U6hK2M0XerU3gQTHOrXvaWXHo0y9P6XoVnjU SmtDSzs3tT80tfEnFO59ZZosEW321gaHzIbePTHSxaWkrdd6bZHtTXb7AeiDKKRLzIM9 LIWQp3qx+nh/AlAkUljszVA86RHH6Wuu8Sgfb8zypp1OSUWe9IhrqCffGWu6DyxEtMaf bnhA==
- Cc: ferret users <ferret_users@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa-gov.20150623.gappssmtp.com; s=20150623; h=message-id:date:from:to:cc:subject:in-reply-to:references :organization:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive; bh=Egi+s6svhnLk54//qlGAo962TdQMh4uyWyqjVFDZriQ=; b=myIvJbz3NjVvyhyo6NdsXBi01juXeLg35ekT1A7VFHiBsA3hg8qajQPIh9pzPhkcGS 0ROnWY8LRetyeJTUYUv+dQ9PIer3lb98dSoLUyZ06t6CiN+fyIZPv9jVsjM6N1VSQ0Vb jNyW9diirEScZA9qUWBfTSkgN65HaHFNTg+alBea7/pykWVs6USIhrFVgzgnT0ukhCNi nMzsLrtUxkFdCYHSKic3DOdUMZ7ZKYh+M3S++UWVNK1YVbxLlr3bicGN01KavhjhkuIY SqcmD8vcsPBJJebxTQh/5AD8mmLtGWNf7ItXsOQg8z/yqfZZSWBBNub5eYE194XweBk7 q1kQ==
- In-reply-to: <CAEwQpaLJwnhL9RpEe42x1pRcCq2tpXB8ZN2J7FxY2zb-R1URmg@mail.gmail.com>
- List-archive: <https://groups.google.com/a/noaa.gov/group/ferret_users/>
- List-help: <https://support.google.com/a/noaa.gov/bin/topic.py?topic=25838>, <mailto:ferret_users+help@noaa.gov>
- List-id: <ferret_users.noaa.gov>
- List-post: <https://groups.google.com/a/noaa.gov/group/ferret_users/post>, <mailto:ferret_users@noaa.gov>
- Mailing-list: list ferret_users@xxxxxxxx; contact ferret_users+owners@xxxxxxxx
- Organization: University of Bergen
- References: <CAEwQpaLJwnhL9RpEe42x1pRcCq2tpXB8ZN2J7FxY2zb-R1URmg@mail.gmail.com>
- Sender: owner-ferret_users@xxxxxxxx
Je Sun, 11 Mar 2018 15:02:06 +0900 skribis Ryo:
> [...] I wonder how you get zeros AFTER the decimal point from the backquote
> expression? say "3.000"?
>
> yes? say `3,p=4` `3,p=-4`
>
> I expected something like "3.0000" from this example but I got just "3". w=
> or zw= didn't help. (By the way, what do you call the part of a fractional
> number after the decimal point in English? I mean the part "14" of "3.14",
> for example.)
That is the fractional part [0].
[0]: https://en.wikipedia.org/wiki/Radix_point
Thus, the number of decimal places is the same as the length of the
fractional part.
>
> The ferret manual says that this is by design:
> http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS
>
> Currently I got stuck. I need character strings like "26.0" for potential
> density labels in my plots and filenames but I don't know how to generate
> them. (Okay, I do know some workarounds, which includes using SPAWN to
> call the unix/linux command "printf" or calling Ferret from within a shell
> script, but . . . )
>
> As suggested in the above email thread, it would be nice if a comprehensive
> formatting is possible. For example,
>
> `3,p=(F5.2)` -> " 3.00"
>
> or perhaps
>
> let mylabel = printf("%5.2f", someexpression)
>
> Fortran or printf formatting would be nice.
I would also find that to be useful.
My attention got drawn to this post because of the issue of number of
decimal places in plots, which may be the same issue or related somehow.
Apparently this is not trivial to solve in Ferret [1, 2].
[1]: https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2017/msg00618.html
[2]: https://savannah.nongnu.org/bugs/?51855
—Marco
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement