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

Library of netcdf functions in wrf_io.F90

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
I wish to modify WRF history files in such a way as to be able to use the modified files as IC files (i.e., wrfinput_d01/wrfinput_d02 etc.) for subsequent WRF runs. I have Fortran 90 code that does this, and it uses netcdf 4.6.1 for it. The problem is that some operation within my code causes the input WRF history file format to change from netcdf3 to netcdf4, and the particular version of WRF (this part is unalterable, so please do not suggest I use a different version of WRF) I have cannot use netcdf4 formatted wrfinput files.

A colleague pointed out to me that there are functions in external/io_netcdf/wrf_io.F90 that can modify WRF files without changing the netcdf file format. I have examined the source code but am not familiar with the functions within.

Can someone provide a brief instruction on which operations need to be performed using this library of functions to open, inquire, and write to an existing WRF history files, please?