[ncl-talk] Need a clarification for "getMidMonDay" function in NCL

Md. Jalal Uddin dmjalal90 at gmail.com
Wed Jun 8 17:59:13 MDT 2022


Thank you so much, sir. I am using NCL 6.6.2 on Windows 10. I could not
load the “crop.ncl” file. Could I have this file?

I am sorry for the inconvenience caused.

১১:২৩ PM এ বুধ, ৮ জুন, ২০২২ এ Dennis Shea <shea at ucar.edu> লিখেছেন:

> Oops. My bad!  I did not document the function.
> getMidMonDay is a utility function contained within the 'crop' library
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl"
> ====
> The code is 'simple'
>
> undef("getMidMonDay")
> function getMidMonDay(time:numeric)
> ;
> ; utility function
> ; The input 'time' (seconds/hours/days since ...") has the middle of the
> month
> ; This returns the (*approximate*) 'middle day' of the current month as an
> integer
> ; "Approximate" because day 15 is used for all months ...
> ;      rather than 14 (Feb), 14.5 (Leap year Feb) or 15.5 (31 day months).
> ; This is more than adequate.
>
> local date, yyyy, mm, dd, jday
> begin
>     date = cd_calendar(time, 0)
>     yyyy = toint(date(:,0))
>     mm   = toint(date(:,1))
>
>     dd   = conform(mm, 15, -1)    ; approx mid month
>
>     jday = day_of_year(yyyy, mm, dd)
>
>     copy_VarCoords(time, jday)
>     jday at long_name = "mid-month day of current year"
>     return(jday)
> end
>
> On Wed, Jun 8, 2022 at 3:43 AM Md. Jalal Uddin via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi all,
>>
>> The fao56_1.ncl (
>> https://www.ncl.ucar.edu/Applications/Scripts/fao56_1.ncl) script
>> used "getMidMonDay" function to get the middle day of the month, but it
>> seems that this function is not exist.
>>
>> How to get the middle day of the month to compute evapotranspiration? Is
>> it similar to the "day_of_year" function (
>> https://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml)?
>>
>> Regards,
>> Jalal
>> --
>> *Md. Jalal Uddin*
>> Founder and Director of Research Society
>> PhD candidate - Atmospheric Physics and Atmospheric Environment (NUIST)
>> M.Sc. in Applied Meteorology (NUIST)
>> B.Sc. in Disaster Management (PSTU)
>> Email: founder-and-director at researchsociety20.org,
>> 20205103002 at nuist.edu.cn <dmjalal90 at nuist.edu.cn>
>> Website: *https://researchsociety20.org/founder-and-director/
>> <https://researchsociety20.org/founder-and-director/>*
>> ResearchGate profile: https://www.researchgate.net/profile/Md_Uddin125
>> YouTube channel:https://www.youtube.com/jalalsdream
>> Cell: +8613260859092, +8801792052662
>>
> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> --
*Md. Jalal Uddin*
Founder and Director of Research Society
PhD candidate - Atmospheric Physics and Atmospheric Environment (NUIST)
M.Sc. in Applied Meteorology (NUIST)
B.Sc. in Disaster Management (PSTU)
Email: founder-and-director at researchsociety20.org, 20205103002 at nuist.edu.cn
<dmjalal90 at nuist.edu.cn>
Website: *https://researchsociety20.org/founder-and-director/
<https://researchsociety20.org/founder-and-director/>*
ResearchGate profile: https://www.researchgate.net/profile/Md_Uddin125
YouTube channel:https://www.youtube.com/jalalsdream
Cell: +8613260859092, +8801792052662
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220609/85e4c03a/attachment.htm>


More information about the ncl-talk mailing list