Opened 9 years ago

Last modified 7 years ago

#114 accepted Defect

FLEXPART-WRF of v3.2 cannot read in more than 96 met files?

Reported by: sulinust Owned by: anphi
Priority: major Milestone:
Component: FP other Version: FLEXPART 9.0.2
Keywords: Cc:


The latest version of FLEXPART-WRF seems to work smoothly if I run it less than 96 hours, however, when I try to run it more than 96 hours (one met file for each hour), the model crashes with the following error message:

error doing nf_close in flxwrf_nf_open_for_reading:


Is it a bug or there is something wrong in my setting?

FYI, My flexpart.input is attached.

Attachments (1)

flexwrf.input (5.9 KB) - added by sulinust 9 years ago.

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by sulinust

comment:1 follow-up: Changed 9 years ago by jbrioude

  • Owner changed from somebody to jbrioude
  • Status changed from new to assigned

in read_ncwrfout.f90, line 55, can you change

integer, parameter :: cache_size = 100


integer, parameter :: cache_size = 1000

then do a make -f clean
and recompile?

Let me know if it works, and if you see a difference in terms of speed.


comment:2 in reply to: ↑ 1 Changed 9 years ago by sulinust

Replying to jbrioude:

Thanks for your reply, now it works fine, now I got another question, when I run backward simulation for stratospheric ozone tracing, the output unit is s, what does this mean? And What should I do if I want the output unit to be ppt or ppb? Should I turn to forward simulation?

Thanks a lot.

comment:3 Changed 9 years ago by jbrioude

  • Resolution set to fixed
  • Status changed from assigned to closed

This question is a general question and should be asked in a different ticket. It will then be easier for others that have a similar question to get the answer.

comment:4 Changed 7 years ago by anphi

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 7 years ago by anphi

  • Owner changed from jbrioude to anphi
  • Status changed from reopened to accepted

comment:6 Changed 7 years ago by anphi


the problem arises due to a bug everytime the number of files reaches the cache_size number.

The problem can be solved easily by changing a single line in read_ncwrfout.f90.

Goto line 144 and change

if (cache_idx_head - cache_idx_tail .ge. cache_size-1) then


if (cache_idx_head - cache_idx_tail .gt. cache_size-1) then

then recompile FLEXPART-WRF and everything works just fine.

TODO: put this solution as bugfix into next release! Then close ticket again.


Note: See TracTickets for help on using tickets.
hosted by ZAMG