Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Output 5D array in WRF history files

gewitterblitz

New member
Hi,

I have been conducting some idealized WRF experiments and want to output a local variable from the microphysics subroutine to each history file.

However, I have encountered a roadblock as the existing variables in WRF output files appear to be limited to 4D. While I managed to output the desired variable at a fixed z or pressure level, I encountered difficulty in outputting the entire 5D array with its dimensions as (time, x, y, z, new_index).

I'm curious whether the WRF model prohibits the output of 5D arrays or if there might be a step I'm overlooking. Could someone please provide their insights on this matter? If 5D array output is feasible, I'd greatly appreciate any guidance or steps you could share.

Thank you!
 
Sorry that I don't know how to output 5D variables from WRF. I guess it will involve not only code changes, but also modification of Registry. Attached is a document that describes in detail how variables are defined in Registry and used later in model. Would you please take a look and hopefully you can find helpful information there.
 

Attachments

  • WRF-registry.pdf
    91.9 KB · Views: 2
Hi,

I have been conducting some idealized WRF experiments and want to output a local variable from the microphysics subroutine to each history file.

However, I have encountered a roadblock as the existing variables in WRF output files appear to be limited to 4D. While I managed to output the desired variable at a fixed z or pressure level, I encountered difficulty in outputting the entire 5D array with its dimensions as (time, x, y, z, new_index).

I'm curious whether the WRF model prohibits the output of 5D arrays or if there might be a step I'm overlooking. Could someone please provide their insights on this matter? If 5D array output is feasible, I'd greatly appreciate any guidance or steps you could share.

Thank you!
Hello gewitterblitz,

Just an idea, but what if you appended the variable in python? I've created quite a lot of different variables and appended them to a wrfout file pretty easily using python so I don't see why you couldn't do it that way. Unless you need it in the output immediately, I would check this out for a few minutes. I believe you can do it using the wrf-python library as well as the netCDF library. I've had some help from AI in developing some of these codes too.

Thanks,
JeremyB
 
Top