[ncl-talk] Hourly mean csv file
Dennis Shea
shea at ucar.edu
Wed Aug 8 12:32:08 MDT 2018
Also, there are a large number of examples of reading text (ascii files)
https://www.ncl.ucar.edu/Applications/read_ascii.shtml
On Wed, Aug 8, 2018 at 12:11 PM, Toni Klemm <toni-klemm at tamu.edu> wrote:
> Sorry, there was a typo in my code, in the ListSetType command. Here it is
> again:
>
>
> do year = [from],[to] ; years always have four digits
>
> do month = 1,12
>
> if (month .lt. 10) then
> month_zero = "0" + month ; turns "1"..."9" into "01"..."09" to
> match filename structure
> end if
>
> if(month .gt. 9) then
> month_zero = month ; leave “10”..."12" unchanged
> end if
>
> do day = 1,31
>
> if (day .lt. 10) then
> day_zero = "0" + day ; turns "1"..."9" into "01"..."09" to match
> filename structure
> end if
>
> if(hour .gt. 9) then
> day_zero = day ; leave "10…"31" unchanged
> end if
>
> do hour = 0,23
>
> if (hour .lt. 10) then
> hour_zero = "0" + hour ; turns "1"..."9" into "01"..."09" to
> match filename structure
> end if
>
> if(hour .gt. 9) then
> hour_zero = hour ; leave "10…"23" unchanged
> end if
>
>
> AOD_files = systemfunc("ls ~/your/file/directory/" + year + "/" +
> month_zero + "/" + day_zero + "/" + hour_zero + “_AOD.csv")
> AOD_f = addfiles(AOD_files,"r")
> ListSetType(AOD_f,"cat”)
>
>
> ...
> proceed with your analysis, e.g., dim_avg_n
> ...
>
>
> end do
> end do
> end do
> end do
>
>
>
>
> *Toni Klemm, Ph.D.*Postdoctoral Research Associate
> Department of Ecosystem Science and Management
> College of Agriculture and Life Sciences
> Texas A&M University, College Station, TX
> Contributor at the Early Career Climate Forum <http://www.eccforum.org>
> www.toni-klemm.de | @toniklemm <http://twitter.com/toniklemm>
>
>
>
>
>
>
>
> On Aug 8, 2018, at 12:41 PM, Mauro Morichetti <s1073755 at pm.univpm.it>
> wrote:
>
> Hi all,
>
> based on the object, I am comparing a different wrfout with some AEREONET
> AOD data.
>
> The AOD data are in csv format:
>
> yyyy mm dd hh1 AOD
> yyyy mm dd hh1 AOD
> yyyy mm dd hh1 AOD
> …..
> yyyy mm dd hh2 AOD
> yyyy mm dd hh2 AOD
> yyyy mm dd hh2 AOD
> ….
>
>
> The values per hour have not the same interval (one hour can have 3 values
> and the other one can have 5 values etc.).
>
> I should need the hourly mean in order to compare with the wrfoutput, but
> I can not figure out how to solve the problem, any suggestions?
>
> Thanks,
>
> Mauro
> ---------
>
> Eng. Mauro Morichetti
> Department of Industrial Engineering and Mathematical Science
> Marche Polytechnic University, Ancona, Italy
> m.morichetti at pm.univpm.it
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180808/5c9653e4/attachment.html>
More information about the ncl-talk
mailing list