Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

how to add variable in the physical buffer (pbuf)?

vamoruso

veronica
New Member
Hello,
I am trying to add a variable into the pbuf. I see the main function should be something like:
pbuf_add_field_{TYPE}(name, persistence, dtype, dimsizes, index, col_type)
my doubts are on these 2 arguments:
-persistence, it can be 'global' or 'physpkg' but I don't know the meaning
-index, seems like it is set to 0 or -1 for different variables and I don't know which one to use. I understand this is an initialization that will be changed after with the real index through pbuf_get_index

After that, i understand I should be calling two more functions (pbuf_get_field and pbuf_get_index), but:
-which is the role of the pbuf_get_field function, where to call it and which arguments it accepts. I see sometimes they use 'pbuf' as first argument sometimes it's 'pbuf2d'
-when to call the pbuf_get_index function

Overall, I am having trouble with adding a new variable in the physical buffer. If anyone can help with that, it'd great. Thank you!
 
Top