Aquileo | Recent changes to support-requestshttps://sourceforge.net/p/nco/support-requests/Recent changes to support-requestsenFri, 19 Jul 2024 15:00:09 -0000Aquileo | #30 ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/?limit=25#6c29<div class="markdown_content"><p>Either the dim <strong>ens_member</strong> is already defined as 0 (UNLIMITED) in the input file or your shell script is setting it to 0.</p></div>henry ButowskyFri, 19 Jul 2024 15:00:09 -0000https://sourceforge.neta78e7a950f563dc70b46f55cc1869f0698adb1d2Aquileo | #30 ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/?limit=25#e694<div class="markdown_content"><p>Thanks Henry, <br/>
Now ens_member = UNLIMITED ; // (0 currently))<br/>
is there any way to define this dimension as fixes size?</p></div>Husain NajafiFri, 19 Jul 2024 13:47:25 -0000https://sourceforge.netdec5fb44ef5d8446263a0a6da50f85921999aa73Aquileo | #30 ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/?limit=25#443c<div class="markdown_content"><p>its a bit tricky because you are redefining the variable "pre" that is already in input. try something like.</p>
<div class="codehilite"><pre><span></span><code>defdim("ens",40 );
pre_new[$time,$latitude,$longitude,$ens]=pre;
</code></pre></div>
<p>...Henry</p></div>henry ButowskyFri, 19 Jul 2024 13:06:58 -0000https://sourceforge.net30cd5c7a761a5a010aaf7e95cc27dbc31d535a19Aquileo | #30 ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/?limit=25#3381<div class="markdown_content"><p>Dear Henry,</p>
<p>Thanks for the tip. I used the follwoing script</p>
<p>cat << EOF > test.nco<br/>
defdim("ens_member", $ens);<br/>
pre<span>[\$time, \$latitude, \$longitude, \$ens_member]</span> = pre;<br/>
EOF </p>
<p>($ens is expanded from bash as a variable as it changes from 00 to 20) .</p>
<p>With this, ncap2 passed without any error from the bash script. But then when I look into the output file, no displayable variables found. I also tried defdim("ens",40 ), but it also does did not work out.</p></div>Husain NajafiFri, 19 Jul 2024 12:47:37 -0000https://sourceforge.net07bc4b42a4460b7f197e1cb7a5b206491d8f2442Aquileo | #30 ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/?limit=25#f7fb<div class="markdown_content"><p>I suggest you get the command working in a script first then once its working move it to the command line. eg </p>
<p>test.nco </p>
<div class="codehilite"><pre><span></span><code>defdim("ens",40 );
pre[$time,$latitude,$longitude,$ens]=pre
</code></pre></div>
<p>then run the above script with the command</p>
<blockquote>
<p>ncap2 -S test.nco in.nc out.nc</p>
</blockquote>
<p>...Henry</p></div>henry ButowskyThu, 18 Jul 2024 15:33:31 -0000https://sourceforge.net3303b5f1d7f00aee879fc3bdccd9fde1351bd4d7Aquileo | ncap2 on shell gives errorhttps://sourceforge.net/p/nco/support-requests/30/<div class="markdown_content"><p>I want to use ncap 2 on a shell script and followed examples from other tickets. However, I am still getting an error. Could you please correct this script? <strong>ncap2 -s "defdim('ens_member',${ensemble});pre<span><span>[\$time, \$latitude,\$longitude, \$ens_member]</span></span> = pre;" "$in" "$out"</strong> Many thanks,</p></div>Husain NajafiThu, 18 Jul 2024 15:24:16 -0000https://sourceforge.netf4e06ffe34ee9e3c01755c014ff4d309e4eac1e2Aquileo | #28 How to add time variable in the NETCDF filehttps://sourceforge.net/p/nco/support-requests/28/?limit=25#511e<div class="markdown_content"><p>Please read the manual on <a class="" href="https://nco.sf.net/nco.html" rel="nofollow">ncap2</a>. You can use <code>ncap2</code> to define a <code>time</code> dimension of the right size (or rename, with <code>ncrename</code>, the existing dimension to <code>time</code>), then create a <code>time</code> variable with that dimension, a <code>units</code> attribute, then populate it with values in the appropriate units, and add a <code>calendar</code> attribute so that the final results looks something like:</p>
<div class="codehilite"><pre><span></span><code><span class="w"> </span><span class="n">double</span><span class="w"> </span><span class="kt">time</span><span class="p">(</span><span class="kt">time</span><span class="p">)</span><span class="w"> </span><span class="p">;</span>
<span class="w"> </span><span class="kt">time</span><span class="o">:</span><span class="n">units</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"days since 1850-01-01 00:00:00"</span><span class="w"> </span><span class="p">;</span>
<span class="w"> </span><span class="kt">time</span><span class="o">:</span><span class="n">long_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"time"</span><span class="w"> </span><span class="p">;</span>
<span class="w"> </span><span class="kt">time</span><span class="o">:</span><span class="n">calendar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"gregorian"</span><span class="w"> </span><span class="p">;</span>
</code></pre></div>
<p>It might be easier to just append (<code>with ncks -A -v time in.nc out.nc</code>) <code>time</code> from file that already has one. </p></div>Charlie ZenderFri, 07 Apr 2023 16:10:22 -0000https://sourceforge.net1fa4c8327a0eedb19f5d357a5cac721f4174a2d2Aquileo | How to create correct time dimension in the concatenated netcdf filehttps://sourceforge.net/p/nco/support-requests/29/<div class="markdown_content"><p>Dear NCO Support Team,</p>
<p>I have a netcdf file containing monthly data of several variables from Jan1850 to Dec2020. I want to concatenate this file twice and then want to correct the time dimension of this concatenated file to be continuous (i.e., the total time will be Jan1850 to Dec2191). Please note that the time dimension of this netcdf file is in Julian calendar and I want to keep this same Julian calendar. Please advise how can I get this time record in the new concatenated netcdf file?</p>
<p>Best regards,<br/>
Mubashar </p></div>MubasharThu, 06 Apr 2023 18:05:11 -0000https://sourceforge.netaca4523b7bee7a7c6b781adfcda024dbc66ec3ddAquileo | How to add time variable in the NETCDF filehttps://sourceforge.net/p/nco/support-requests/28/<div class="markdown_content"><p>Dear NCO support team,</p>
<p>I have a netcdf file containing monthly data for several variables over the period 1850-01-17 till 2051-12-17. The time variable/dimension has been removed somehow and doesn't exist anymore in this netcdf file. I want to add this monthly time dimension starting from 1850-01-17 till 2051-12-17. How can I add this time using NCO? Moreover, can I add this time in Julian calendar format?</p></div>MubasharThu, 06 Apr 2023 14:46:12 -0000https://sourceforge.net16e733c95105c3ce885a1d49b0cdcc7169971a82Aquileo | #27 how to calculate medianhttps://sourceforge.net/p/nco/support-requests/27/?limit=25#a48d<div class="markdown_content"><ul>
<li><strong>status</strong>: open --> closed</li>
<li><strong>Group</strong>: --> </li>
</ul></div>Charlie ZenderFri, 17 Jun 2022 20:29:32 -0000https://sourceforge.net1ea814510fbb9f2d5539aa203e0f34676257c068