WRF restart run produces multiple outputs

Topics specifically related to the wrf.exe program
Post Reply
jvithana
Posts: 11
Joined: Mon Feb 04, 2019 7:34 pm

WRF restart run produces multiple outputs

Post by jvithana » Tue Mar 03, 2020 8:14 pm

hi,

Is there a quick way to merge two or more wrfout files in to single file? The runs I had written a file for each restart run and it seems the netcdf file size limit was not exceeded on those files. Not sure why it is doing that, or is there an option in namelist to write a single output regardless of number of restarts?

my data is in

/glade/scratch/jvithana/test7-2km/WRFV4_ivan/test/em_real

Thanks

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: WRF restart run produces multiple outputs

Post by kwerner » Mon Mar 09, 2020 8:53 pm

Hi,
To concatenate netcdf files, see this presentation (specifically, the section regarding NCO tools):
https://www2.mmm.ucar.edu/wrf/users/tut ... til_pp.pdf

I'm not exactly sure what you mean by this:
The runs I had written a file for each restart run and it seems the netcdf file size limit was not exceeded on those files. Not sure why it is doing that, or is there an option in namelist to write a single output regardless of number of restarts?
If the NCO tools doesn't help, please explain the situation more clearly. Thanks!
NCAR/MMM

jvithana
Posts: 11
Joined: Mon Feb 04, 2019 7:34 pm

Re: WRF restart run produces multiple outputs

Post by jvithana » Fri Mar 13, 2020 6:15 pm

Hi,

I need to write output in to a single netcdf file. But for some reason each restart run writes a separate netcdf file. for example,

wrfout_d04_1999-10-14_12:00:00
wrfout_d04_1999-10-14_21:00:00
wrfout_d04_1999-10-15_07:00:00
wrfout_d04_1999-10-15_18:00:00
wrfout_d04_1999-10-16_03:00:00

these are the output files written according to each restart run. I like to write them all in to a single file.
the data are in
/glade/scratch/jvithana/test7-2km/WRFV4_ivan/test/em_real


Thanks for help!!

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: WRF restart run produces multiple outputs

Post by kwerner » Wed Mar 18, 2020 10:10 pm

Hi,
There are no wrfout* files for a 1999 date in that directory, and the namelist.input file doesn't reflect that either. Can you point me to the namelist that you are using for your restart run, and the wrfout* files? Thanks.
NCAR/MMM

jvithana
Posts: 11
Joined: Mon Feb 04, 2019 7:34 pm

Re: WRF restart run produces multiple outputs

Post by jvithana » Tue Mar 24, 2020 7:27 pm

hi,

Here it is

/glade/scratch/jvithana/test7-2km/WRFV4_irine/test/em_real

Thanks

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: WRF restart run produces multiple outputs

Post by kwerner » Mon Mar 30, 2020 10:25 pm

I think the problem is that you still have several wrfout* files in your directory that are from older runs. If you use the command "ls -ls" you can see the dates and times for the wrfout* file write-outs. This is what I see:

Code: Select all

165200 -rw-r--r-- 1 jvithana ncar  169158349 Feb 20 22:54 wrfout_d01_1999-10-14_00:00:00
 127216 -rw-r--r-- 1 jvithana ncar  130268036 Feb 21 19:26 wrfout_d01_1999-10-14_12:00:00
 142704 -rw-r--r-- 1 jvithana ncar  146116857 Feb 22 20:05 wrfout_d01_1999-10-14_21:00:00
 159392 -rw-r--r-- 1 jvithana ncar  163213952 Feb 23 09:33 wrfout_d01_1999-10-15_07:00:00
 131520 -rw-r--r-- 1 jvithana ncar  134675962 Feb 24 19:26 wrfout_d01_1999-10-15_18:00:00
  88640 -rw-r--r-- 1 jvithana ncar   90760481 Mar  1 06:30 wrfout_d01_1999-10-16_03:00:00
  59728 -rw-r--r-- 1 jvithana ncar   61147624 Mar  2 15:48 wrfout_d01_1999-10-16_09:00:00
 790464 -rw-r--r-- 1 jvithana ncar  809423382 Feb 20 22:57 wrfout_d02_1999-10-14_00:00:00
 613328 -rw-r--r-- 1 jvithana ncar  628041183 Feb 21 19:28 wrfout_d02_1999-10-14_12:00:00
 687856 -rw-r--r-- 1 jvithana ncar  704350665 Feb 22 20:08 wrfout_d02_1999-10-14_21:00:00
 769536 -rw-r--r-- 1 jvithana ncar  787991703 Feb 23 09:35 wrfout_d02_1999-10-15_07:00:00
 634992 -rw-r--r-- 1 jvithana ncar  650221261 Feb 24 19:29 wrfout_d02_1999-10-15_18:00:00
 428640 -rw-r--r-- 1 jvithana ncar  438916412 Mar  1 06:33 wrfout_d02_1999-10-16_03:00:00
 288176 -rw-r--r-- 1 jvithana ncar  295088744 Mar  2 15:48 wrfout_d02_1999-10-16_09:00:00
3343072 -rw-r--r-- 1 jvithana ncar 3423295656 Feb 20 22:57 wrfout_d03_1999-10-14_00:00:00
2651824 -rw-r--r-- 1 jvithana ncar 2715454635 Feb 21 19:29 wrfout_d03_1999-10-14_12:00:00
2978848 -rw-r--r-- 1 jvithana ncar 3050331503 Feb 22 20:08 wrfout_d03_1999-10-14_21:00:00
3332032 -rw-r--r-- 1 jvithana ncar 3411998908 Feb 23 09:36 wrfout_d03_1999-10-15_07:00:00
2747984 -rw-r--r-- 1 jvithana ncar 2813933269 Feb 24 19:29 wrfout_d03_1999-10-15_18:00:00
1856000 -rw-r--r-- 1 jvithana ncar 1900536195 Mar  1 06:33 wrfout_d03_1999-10-16_03:00:00
1246096 -rw-r--r-- 1 jvithana ncar 1275991810 Mar  2 15:48 wrfout_d03_1999-10-16_09:00:00
2897280 -rw-r--r-- 1 jvithana ncar 2966801528 Feb 20 22:58 wrfout_d04_1999-10-14_00:00:00.nc
    128 -rw-r--r-- 1 jvithana ncar     115518 Mar 10 12:16 wrfout_d04_1999-10-14_00:00:00.tif
2341536 -rw-r--r-- 1 jvithana ncar 2397726667 Feb 21 19:29 wrfout_d04_1999-10-14_12:00:00.nc
2625248 -rw-r--r-- 1 jvithana ncar 2688249424 Feb 22 20:08 wrfout_d04_1999-10-14_21:00:00.nc
2920960 -rw-r--r-- 1 jvithana ncar 2991051950 Feb 23 09:36 wrfout_d04_1999-10-15_07:00:00.nc
2411648 -rw-r--r-- 1 jvithana ncar 2469512941 Feb 24 19:29 wrfout_d04_1999-10-15_18:00:00.nc
1630160 -rw-r--r-- 1 jvithana ncar 1669270701 Mar  1 06:33 wrfout_d04_1999-10-16_03:00:00.nc
1094512 -rw-r--r-- 1 jvithana ncar 1120777407 Mar  2 15:48 wrfout_d04_1999-10-16_09:00:00.nc
It looks like March 2nd is the most recent date on which you ran a simulation and you only have 4 wrfout* files for that date - all in a single file per domain.
NCAR/MMM

jvithana
Posts: 11
Joined: Mon Feb 04, 2019 7:34 pm

Re: WRF restart run produces multiple outputs

Post by jvithana » Thu Apr 23, 2020 9:17 pm

Hi,

Sorry for delay in asking. I think the single file you mentioned is not the corrct file. I checked the time steps using ncdump and here are the outputs.


2625248 -rw-r--r-- 1 jvithana ncar 2688249424 Feb 22 20:08 wrfout_d04_1999-10-14_21:00:00.nc
2920960 -rw-r--r-- 1 jvithana ncar 2991051950 Feb 23 09:36 wrfout_d04_1999-10-15_07:00:00.nc
2411648 -rw-r--r-- 1 jvithana ncar 2469512941 Feb 24 19:29 wrfout_d04_1999-10-15_18:00:00.nc
1630160 -rw-r--r-- 1 jvithana ncar 1669270701 Mar 1 06:33 wrfout_d04_1999-10-16_03:00:00.nc
1094512 -rw-r--r-- 1 jvithana ncar 1120777407 Mar 2 15:48 wrfout_d04_1999-10-16_09:00:00.nc

I Like all of these written in to a single file. I am not sure if I enable large file support when I start running these or when I configuring WRF. can it be the problem? I was assuming all those are enabled by default like other modules.

Time steps in output

"1999-10-14_21:00:00",
"1999-10-14_22:00:00",
"1999-10-14_23:00:00",
"1999-10-15_00:00:00",
"1999-10-15_01:00:00",
"1999-10-15_02:00:00",
"1999-10-15_03:00:00",
"1999-10-15_04:00:00",
"1999-10-15_05:00:00",
"1999-10-15_06:00:00"
"1999-10-15_07:00:00",
"1999-10-15_08:00:00",
"1999-10-15_09:00:00",
"1999-10-15_10:00:00",
"1999-10-15_11:00:00",
"1999-10-15_12:00:00",
"1999-10-15_13:00:00",
"1999-10-15_14:00:00",
"1999-10-15_15:00:00",
"1999-10-15_16:00:00",
"1999-10-15_17:00:00"
"1999-10-15_18:00:00",
"1999-10-15_19:00:00",
"1999-10-15_20:00:00",
"1999-10-15_21:00:00",
"1999-10-15_22:00:00",
"1999-10-15_23:00:00",
"1999-10-16_00:00:00",
"1999-10-16_01:00:00",
"1999-10-16_02:00:00"
"1999-10-16_03:00:00",
"1999-10-16_04:00:00",
"1999-10-16_05:00:00",
"1999-10-16_06:00:00",
"1999-10-16_07:00:00",
"1999-10-16_08:00:00"
"1999-10-16_09:00:00",
"1999-10-16_10:00:00",
"1999-10-16_11:00:00",
"1999-10-16_12:00:00"

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: WRF restart run produces multiple outputs

Post by kwerner » Thu Apr 23, 2020 10:24 pm

Hi,
So are you saying that you'd like each consecutive restart run to write the new output into the existing file from the previous run?
For example, if you ran an initial run for 24 hours into a single file: wrfout_d01_2020-04-20_00:00:00
then you ran a restart from that time for the next 24 hours (until 2020-04-21_00:00:00),
you would want the new 24 hours of output to be added to the original wrfout_d01_2020-04-20_00:00:00 file, so that the file now has 48 hours of output?
If that's the case, then that's not something that the model is capable of. You would have to write some sort of script to get this to work for you.
NCAR/MMM

kaelel18
Posts: 57
Joined: Wed Apr 17, 2019 2:40 pm

Re: WRF restart run produces multiple outputs

Post by kaelel18 » Sat Dec 19, 2020 2:38 pm

hi, I'd like to do a follow up for this question. My restart run produces multiple outputs in minutes for a single hour. Same as the on posted by the thread starter. How do I resolve this? Thanks

Ming Chen
Posts: 1455
Joined: Mon Apr 23, 2018 9:42 pm

Re: WRF restart run produces multiple outputs

Post by Ming Chen » Tue Dec 22, 2020 8:19 pm

Do you mean that you want wrfout files to be saved in a single file instead of multiple single-time wrfout? If this is the case, you can simply set

frames_per_outfile = 1000, 1000, 1000

This is an example to instruct the model to write 1000 output files to a single wrfout file. You may change the number 1000 to any value you prefer.
WRF Help Desk

kaelel18
Posts: 57
Joined: Wed Apr 17, 2019 2:40 pm

Re: WRF restart run produces multiple outputs

Post by kaelel18 » Tue May 11, 2021 2:28 pm

Apologies for the late response.

I set the frames_per_outfile = 1000, 1000, 1

Supposedly, wrfoutput produces an hourly file, but it produces multiple files for a certain hour. For example,

wrfout_d03_2018-01-01_00:00:00
wrfout_d03_2018-01-01_00:00:07
wrfout_d03_2018-01-01_00:00:15
wrfout_d03_2018-01-02_01:00:02
wrfout_d03_2018-01-02_01:00:10

this usually happens if I use the restart option.

Ming Chen
Posts: 1455
Joined: Mon Apr 23, 2018 9:42 pm

Re: WRF restart run produces multiple outputs

Post by Ming Chen » Tue May 11, 2021 6:16 pm

Please tell me which version of WRF you are running. If it is an older version (older before V4.0), can you try with the new version like WRFv4.2?
Please also send me your namelist.input to take a look. Thanks.
WRF Help Desk

Post Reply

Return to “wrf.exe”