[ncl-talk] read namelist file in NCL

Rick Brownrigg brownrig at ucar.edu
Wed Sep 20 09:45:34 MDT 2017


Hi,

I am unaware of an NCL function that directly reads the namelist.  However,
you might look at this example:

http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_show_wps_som_namelist.htm

It uses system calls to "grep" through a namelist file to pull out fields
that are of interest.

Hope that helps...
Rick

On Wed, Sep 20, 2017 at 8:54 AM, Zhifeng Yang <yangzf01 at gmail.com> wrote:

> Hi
>
> Is there any methods to read a namelist file directly? Similar to FORTRAN.
> Here is an example of namelist file from WRF
>
> &time_control
>  run_days                            = 5,
>  run_hours                           = 0,
>  run_minutes                         = 0,
>  run_seconds                         = 0,
>  start_year                          = 2015, 2001, 2001,
>  start_month                         = 06,   06,   06,
>  start_day                           = 19,   11,   11,
>  start_hour                          = 00,   12,   12,
>  start_minute                        = 00,   00,   00,
>  start_second                        = 00,   00,   00,
>  end_year                            = 2015, 2001, 2001,
>  end_month                           = 06,   06,   06,
>  end_day                             = 24,   12,   12,
>  end_hour                            = 00,   12,   12,
>  end_minute                          = 00,   00,   00,
>  end_second                          = 00,   00,   00,
>  interval_seconds                    = 600
>  input_from_file                     = .true.,.true.,.true.,
>  history_interval                    = 10,   60,   60,
>  frames_per_outfile                  = 1,    1,    1,
>  restart                             = .false.,
>  restart_interval                    = 5000,
>  io_form_history                     = 2
>  io_form_restart                     = 2
>  io_form_input                       = 2
>  io_form_boundary                    = 2
>  auxinput1_inname                    = "../../../WPS/wpsout_cus_4km/
> met_em.d<domain>.<date>"
>  history_outname                     = "wrfout/wrfout_d<domain>_<date>"
>  debug_level                         = 0
>
> I want to read this file with variable names and values from NCL. Thank you
>
> Best,
> Zhifeng
>
>
> _______________________________________________
> 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/20170920/b08233d2/attachment.html>


More information about the ncl-talk mailing list