[ncl-talk] Question about data in enviroment

Dennis Shea shea at ucar.edu
Wed Jan 3 10:46:19 MST 2018


As Rick mentioned, the file *must* be read in a 'driver script', then some
form of loop to invoke 'options' that access the file's data.

FYI:

Rick created (6.5.0):
   http://www.ncl.ucar.edu/Applications/
   Under *Miscellaneous,* click "Task Parallelism"
       http://www.ncl.ucar.edu/Applications/task_parallelism.shtml

   Click the NCL scripts:
       task_parallelism_driver_1.ncl
       task_parallelism_driver_2.ncl

======
Also, 6.5.0 but attached so it can be used with pre-6.5.0:

http://www.ncl.ucar.edu/Document/Functions/Contributed/keyword_values.shtml
See Examples
=======================
load "./keyword_values.ncl"

- Read NAMELIST file names (asciiread)

- Read the NetCDF file into memory

- LOOP "namelist file(s) until done"

=========================
Happy New Year



On Wed, Jan 3, 2018 at 10:12 AM, Rick Brownrigg via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi,
>
> Its not possible to preserve the data in memory between successive runs of
> NCL, in the way you are trying to do it.  You would need to move the
> eventing and system-level stuff that causes your bash script to run
> periodically into NCL. Without knowing what you are trying to do, its hard
> to make a specific recommendation, but it might look something like:
>
> - Read the NetCDF file into memory
>
> - loop "until done"
>   check for condition/event, and if its time, run the main part of the NCL
> script to create a new NetCDF file
>   otherwise, wait/sleep for some time to elapse and then loop
>
> Useful NCL functions for this purpose are system(), systemfunc(), and
> sleep(), and possibly getenv().
>
> Make sense?
> Rick
>
> On Wed, Jan 3, 2018 at 7:47 AM, Damjan Jelic via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Dear support,
>>
>> suppose i have one big 2dfield (time/values) and i have ncl program to
>> extract particular time intervals delivered with bash script.
>> Every time the bash script sets new time interval ncl script is run again
>> and the problem is it takes some time to load this big 2dfield.
>> How can i convince ncl script to leave this big data in ram/environment
>> so it dos not need to load every time?
>> big 2d field is in .nc format and ncl script just sorts data and saves
>> new .nc subset.
>>
>> maybe its a silly question but i never needed that and im not able to
>> goggle out the issue.
>>
>> Thank aloft.
>> Damjan
>>
>> _______________________________________________
>> 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/20180103/f58f0649/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keyword_values.ncl
Type: application/octet-stream
Size: 3269 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180103/f58f0649/attachment.obj>


More information about the ncl-talk mailing list