<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I am unaware of an NCL function that directly reads the namelist.  However, you might look at this example:<br><br><a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_show_wps_som_namelist.htm">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_show_wps_som_namelist.htm</a><br><br></div>It uses system calls to "grep" through a namelist file to pull out fields that are of interest. <br><br></div>Hope that helps...<br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 20, 2017 at 8:54 AM, Zhifeng Yang <span dir="ltr"><<a href="mailto:yangzf01@gmail.com" target="_blank">yangzf01@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi<br><br></div>Is there any methods to read a namelist file directly? Similar to FORTRAN. Here is an example of namelist file from WRF<br><br>&time_control<br> run_days                     <wbr>       = 5,<br> run_hours                    <wbr>       = 0,<br> run_minutes                  <wbr>       = 0,<br> run_seconds                  <wbr>       = 0,<br> start_year                   <wbr>       = 2015, 2001, 2001,<br> start_month                  <wbr>       = 06,   06,   06,<br> start_day                    <wbr>       = 19,   11,   11,<br> start_hour                   <wbr>       = 00,   12,   12,<br> start_minute                 <wbr>       = 00,   00,   00,<br> start_second                 <wbr>       = 00,   00,   00,<br> end_year                     <wbr>       = 2015, 2001, 2001,<br> end_month                    <wbr>       = 06,   06,   06,<br> end_day                      <wbr>       = 24,   12,   12,<br> end_hour                     <wbr>       = 00,   12,   12,<br> end_minute                   <wbr>       = 00,   00,   00,<br> end_second                   <wbr>       = 00,   00,   00,<br> interval_seconds             <wbr>       = 600<br> input_from_file              <wbr>       = .true.,.true.,.true.,<br> history_interval             <wbr>       = 10,   60,   60,<br> frames_per_outfile           <wbr>       = 1,    1,    1,<br> restart                      <wbr>       = .false.,<br> restart_interval             <wbr>       = 5000,<br> io_form_history              <wbr>       = 2<br> io_form_restart              <wbr>       = 2<br> io_form_input                <wbr>       = 2<br> io_form_boundary             <wbr>       = 2<br> auxinput1_inname             <wbr>       = "../../../WPS/wpsout_cus_4km/<wbr>met_em.d<domain>.<date>"<br> history_outname              <wbr>       = "wrfout/wrfout_d<domain>_<<wbr>date>"<br> debug_level                  <wbr>       = 0<br><br></div>I want to read this file with variable names and values from NCL. Thank you<br><br></div>Best,<br></div>Zhifeng<br><br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>