<div dir="ltr">Dear NCL users,<div><br></div><div>I have one question regarding date-time setting from filename. This question is not actually related to NCL, sorry in advance. </div><div><br></div><div>I have 4 .nc files named given below. The time is not created in these files during conversion from hdf to netcdf in NCL. </div><div><br></div><div>MAIACTAOT<span id="gmail-23759874-3de0-4a24-8fc9-29e17b019e1e" class="gmail-GINGER_SOFTWARE_mark"><span id="gmail-2000bdff-3e28-4b08-a0bf-6a5ea336146b" class="gmail-GINGER_SOFTWARE_mark">.</span></span>h00v02<span id="gmail-a1c40699-8045-4ec3-8e55-614b11abdb11" class="gmail-GINGER_SOFTWARE_mark"><span id="gmail-21b8daba-4167-4660-a081-835a82ae5b52" class="gmail-GINGER_SOFTWARE_mark">.</span></span><b><font color="#ff0000">2000</font><font color="#0000ff">364</font></b><font color="#ff9900"><b>07</b></font><font color="#ff00ff"><b>15</b></font><span id="gmail-2f881425-f243-461d-a171-87191b7b587d" class="gmail-GINGER_SOFTWARE_mark"><span id="gmail-af85fe22-3b96-454f-b0cd-52511e993f0a" class="gmail-GINGER_SOFTWARE_mark">.</span></span><span id="gmail-4f87f9d2-e77c-42e2-bccd-57c6dd6d9db7" class="gmail-GINGER_SOFTWARE_mark"><span id="gmail-b27454c4-07e9-4c3b-bdf9-0531d7fcf5f1" class="gmail-GINGER_SOFTWARE_mark">nc</span></span> --> 2000=year, 364=day, 07=<span id="ea54bc3b-8439-4292-9191-3cb4e1cf40bd" class="gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">hr</span>, 15=min</div><div>MAIACTAOT<span id="gmail-2b304bdf-be55-4b15-88c8-b0008dad0b61" class="gmail-GINGER_SOFTWARE_mark">.</span>h00v02<span id="gmail-6fd015d6-7a65-4805-8066-51d7af216a50" class="gmail-GINGER_SOFTWARE_mark">.</span>20003650620<span id="gmail-f601ec24-53b3-49af-a5d3-0a138870f1da" class="gmail-GINGER_SOFTWARE_mark">.</span><span id="gmail-87e7425c-c19c-4c61-82a5-95e846dd3c37" class="gmail-GINGER_SOFTWARE_mark">nc</span></div><div>MAIACTAOT<span id="gmail-b92a538d-7299-405d-bac4-0a7fc45d05a5" class="gmail-GINGER_SOFTWARE_mark">.</span>h00v02<span id="gmail-4dff627f-4626-43a8-af83-c33c4f3faaad" class="gmail-GINGER_SOFTWARE_mark">.</span>20003660525<span id="ebaf5c6a-0044-431b-9b63-8b956ad28281" class="gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">.</span><span id="gmail-198de4c4-1602-4ee7-912d-8e99df844322" class="gmail-GINGER_SOFTWARE_mark">nc</span></div><div>MAIACTAOT<span id="eebfd4e9-3d1b-4dad-b622-d42e4023ba2b" class="gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">.</span>h00v02<span id="gmail-89e54927-85e7-4f50-b41e-e6e8a2721720" class="gmail-GINGER_SOFTWARE_mark">.</span>20003660700<span id="gmail-bf149424-4fed-42e9-95c7-2b86ea2f25a8" class="gmail-GINGER_SOFTWARE_mark">.</span><span id="gmail-b5b49bd3-bb19-4047-a7b8-506ba6dfe933" class="gmail-GINGER_SOFTWARE_mark">nc</span></div><div><br></div><div>So, I did try to create the date-time with shell scripting (given below)</div><div><span id="gmail-6b9fa99c-ad9b-4d81-ae5f-aeb7af97f512" class="gmail-GINGER_SOFTWARE_mark">but</span> it is creating wrong date as the files are of December month, but it is generating January month date also. I don't know why. </div><div><br></div><div><b>2000-01-01 05:25:00<br></b></div><div><b>2000-01-01 07:00:00</b><br></div><div>2000-12-30 07:15:00<br></div><div>2000-12-31 06:20:00<br></div><div><br></div><div><br></div><div><span id="gmail-c5a9da70-337a-49e7-9b8a-0b2ff5de0f1b" class="gmail-GINGER_SOFTWARE_mark">the</span> shell script, which I am using</div><div><br></div><div><div>#######################################</div><div><br></div><div>for n in MAIACTAOT.h00v02.20*.nc;do</div><div> ls $n > text</div><div>export xx=`cut -c18-28 text`</div><div>export YYYY=`cut -c18-21 text`</div><div>export JJJ=`cut -c22-24 text`</div><div>export HH=`cut -c25-26 text`</div><div>export MM=`cut -c27-28 text`</div><div>mm=`date -d "$JJJ days $YYYY-01-01" +"%m"`</div><div>dd=`date -d "$JJJ days $YYYY-01-01" +"%d"`</div><div>mydate=${YYYY}-${mm}-${dd},${HH}:${MM}:00</div><div>echo $mydate</div><div><br></div><div>echo "cdo settaxis,$mydate $n re$n"</div><div>cdo settaxis,$mydate $n re$n</div><div><br></div><div>done</div><div><br></div><div>cdo mergetime reMAI*.nc <a href="http://final.nc">final.nc</a></div><div>exit</div><div>#################################</div></div><div><br></div><div><br></div><div>Any suggestion regarding this issue would be very helpful.</div><div><br></div><div>Thank You</div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
</div></div>