WRF restart error caused by "too long" directory specified by "rst_inname"

qinjian

New member
Issue: WRF restart would fail if the restart files are specified by the namelist variable "rst_inname" that contains a directory with a length greater than 17. The following error message can be thrown out by the model

Cause: In WRF/share/mediation_wrfmain.F
"​
CHARACTER (LEN=256) :: inpname , rstname, timestr​
WRITE(message,*)'RESTART run: opening ',TRIM(rstname),' for reading'​
"​
Analysis:
len('RESTART run: opening ') = 21​
len(' for reading') = 12​
80 - 21 - 12 = 47, which is the maximum length of rstname​
len(wrfrst_d0x_YYYY-MM-DD_HH:MM:SS) = 30​
So, there are just 17 characters left for the directory of the restart files.​
Solution: 1) Changing the length of the variable "message" and recompile the model.
2) Move WRF restart files to a directory no longer than 17.​
Note: If the model restart files are in the same directory as wrf.exe/namelist.input, the above issue should not show up. Hopefully this issue will be solved in the next released version of WRF.


file
 
Last edited:
Thank you for the kind message and detailed description of the issue. We will address this issue in the future release.
 
Back
Top