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

How to make wrf output a specified variable less than 1s time interval?

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.

Zhou Xingyang

New member
hello,
Currently,I want to use high time resolution WRF3.2.1 simulation result to calculate gust factor . To save space, I use "auxhist7_outname" variable to specified output U10 and V10. Because output time step needs to be 0.2 s or less, I have encountered some difficulties in writing simulation output which is integrated in 0.12s timestep. I would like to ask is there any way to make the model output data below 1s time step or output data every time model integrate? If need to modify the source file, could you give me some suggestions?
Please forgive me for my poor English.
Thank you sincerely!

Zhou Xingyang
Atmospheric Sciences
Nanjing University of Information Science & Technology, Nanjing, 210044,P. R. China.
 
Hi Zhou,
I actually do not even see the auxhist options anywhere in the V3.2.1 code. Is that the version you meant to say you are using?
In later versions, the highest-resolution interval parameter I find is auxhist7_interval_s. However, it is listed as an integer, so it doesn't look like there is currently an option to use less than 1 second. It may be as simple as just altering the code where it is listed as an integer, to set it as a real. In V4.0, these are those locations:
Code:
Registry/io_boilerplate_temporary.inc:rconfig integer auxhist7_interval_s namelist,time_control max_domains 0
frame/module_configure.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
frame/module_dm.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
frame/module_domain_type.f90:integer                                  :: auxhist7_interval_s
frame/module_io_quilt.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
inc/namelist_defines.inc:integer , DIMENSION(max_domains) :: auxhist7_interval_s
inc/namelist_defines2.inc:integer :: auxhist7_interval_s
inc/state_struct.inc:integer                                  :: auxhist7_interval_s

You can try the above, and if that doesn't work, there may be other code that needs some modification. I would recommend just searching all of the code for the "auxhist7_interval_s" parameter and see where you think mods may need to be made.
 
kwerner said:
Hi Zhou,
I actually do not even see the auxhist options anywhere in the V3.2.1 code. Is that the version you meant to say you are using?
In later versions, the highest-resolution interval parameter I find is auxhist7_interval_s. However, it is listed as an integer, so it doesn't look like there is currently an option to use less than 1 second. It may be as simple as just altering the code where it is listed as an integer, to set it as a real. In V4.0, these are those locations:
Code:
Registry/io_boilerplate_temporary.inc:rconfig integer auxhist7_interval_s namelist,time_control max_domains 0
frame/module_configure.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
frame/module_dm.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
frame/module_domain_type.f90:integer                                  :: auxhist7_interval_s
frame/module_io_quilt.f90:integer , DIMENSION(max_domains) :: auxhist7_interval_s
inc/namelist_defines.inc:integer , DIMENSION(max_domains) :: auxhist7_interval_s
inc/namelist_defines2.inc:integer :: auxhist7_interval_s
inc/state_struct.inc:integer                                  :: auxhist7_interval_s

You can try the above, and if that doesn't work, there may be other code that needs some modification. I would recommend just searching all of the code for the "auxhist7_interval_s" parameter and see where you think mods may need to be made.

Thank you very much for your suggestion. According to your suggestion, I modified the source code and recompiled it.The modified source code is as follows.
Code:
./inc/namelist_defines.inc:real    , DIMENSION(max_domains) :: auxhist7_interval_s
./inc/nl_config.inc:  real  , INTENT(OUT) :: auxhist7_interval_s
./inc/nl_config.inc:  real , INTENT(IN) :: auxhist7_interval_s
./inc/namelist_defines2.inc:real :: auxhist7_interval_s
./inc/state_struct.inc:real                                  :: auxhist7_interval_s
./Registry/io_boilerplate_temporary.inc:rconfig real  auxhist7_interval_s namelist,time_control max_domains 0
./frame/module_domain_type.f90:real    :: auxhist7_interval_s
./frame/module_configure.f90:real    , DIMENSION(max_domains) :: auxhist7_interval_s
./frame/module_configure.f90:real    :: auxhist7_interval_s
./frame/module_configure.f90:real    , DIMENSION(max_domains) :: auxhist7_interval_s
./frame/module_configure.f90:real , DIMENSION(max_domains) :: auxhist7_interval_s
namelist is shown below
Code:
 iofields_filename            = "myoutfields.txt", "myoutfields.txt", "myoutfields.txt", "myoutfields.txt", "myoutfields.txt", "myoutfields.txt",
 auxhist7_outname = "wrfuvw_d<domain>_<date>",
 auxhist7_interval_s = 3600, 3600, 3600, 3600, 3600, 0.12,
 frames_per_auxhist7 = 1, 1, 1, 1, 1, 1,
 io_form_auxhist7 = 2
However, when I use a time step output below 1s, the model still cannot output the result.Maybe the other parts of the source code need to be modified. I have carefully read codes related to it and tried a few times but still does not work. Is it possible that an error occurred while creating the file? Could you give me some suggestions for the file io interface.
 
1. Which version of the model are you using?
2. When you recompiled, did you first issue a 'clean -a' and then reconfigure, then recompile?
3. Can you attach all of your modified files, along with your namelist.input file?
Thanks!
 
kwerner said:
1. Which version of the model are you using?
2. When you recompiled, did you first issue a 'clean -a' and then reconfigure, then recompile?
3. Can you attach all of your modified files, along with your namelist.input file?
Thanks!

Thank you for your patience.
1. I used WRF3.2.1 version.
2. When recompiled ,first I executed 'clean -a' then reconfigured and recompiled. But found that 'clean -a' will delete the modified *f90 files then regenerate new *.f90.
Therefore, I recompiled the files without 'clean -a' and found that the modified *.f90 file was not compiled either.I even tried deleted the *.o files which is compiled by modified files and recompile, as a result, the modified *.f90 files will be covered by original *.F generated files, modified files are deleted. So I think that Only modify the *.F file is valid.
I searched all codes with 'auxhist7' after executed 'clean -a' and find it only in file Registry/io_boilerplate_temporary.inc. At the beginning of the document, it is noted that
WARNING This file is generated automatically by use_registry using the data base in the file named Registry. Do not edit. Your changes to this file will be lost.
. According to my understanding, it was generated by tools/gen_streams.c when compile WRF(attached).
3. modified files and namelist are attached below in rar package.

I am very confused now. Your suggestion is very valuable to me.
 

Attachments

  • gen_streams.c
    29.4 KB · Views: 50
  • io_boilerplate_temporary.txt
    77.2 KB · Views: 49
  • modified_files.rar
    132.8 KB · Views: 54
  • myoutfields.txt
    19 bytes · Views: 58
  • namelist.input
    8.3 KB · Views: 62
Hi,
You are absolutely right, and I completely overlooked the fact that those files were the .f90 files, and not the .F files. The .f90 files are generated by the compilation, and therefore making modifications to those (and the other compile-generated files) is pointless, as they will simply be overwritten by the next compilation. I apologize for the oversight.

I have talked to our primary software engineer about this problem and at this time, we aren't quite sure how to manipulate the code to allow for this, unfortunately. I will keep trying to play around with it a bit, but I'm not sure it will get figured out anytime soon. In the meantime, if you are able to find a solution to this and would be willing to share it, we would be grateful to have the modifications so that we could share them with any future WRF users who may have a similar need.
 
Top