metno / emep-ctm

Open Source EMEP/MSC-W model
GNU General Public License v3.0
30 stars 20 forks source link

need_topo=T, ! stop simulation if topo_nc not found #34

Closed mvieno closed 5 years ago

mvieno commented 6 years ago

When the option need_topo=T is set true and the topographt.nc file is not found the run does not stop, but a fort.70 output with an error message is created instead.

avaldebe commented 6 years ago

@mvieno

When first introduced need_topo did indeed stopped the model simulation. At a later point of development the stop was replaced by a warning.

@gitpeterwind

As far as I can tell, you committed the current form of the warning on 2cab8d42. Please address this issue.

gitpeterwind commented 6 years ago

Yes, in the latest version, need_topo=T means that the column emissions are set to zero if the topo is not found, but without stopping the run. need_topo = F will use a default value for surface heights (based on pressure). Why the warnings comes into a fort.70 file, I am not sure. Not sure what "PrintLog" actually does. I can put a normal write instead

gitpeterwind commented 6 years ago

There was a bug, that made need_topo=F not working. It was used before read from the config file. Can be repaired by moving the read higher up. Line 159 file ColumnSource_ml.f90 should be:

  NAMELIST /ColumnSource_config/NMAX_LOC,NMAX_EMS,flocdef,femsdef,need_topo
  rewind(IO_NML)
  read(IO_NML,NML=ColumnSource_config,iostat=ios)
  call CheckStop(all(ios/=read_ok),dtxt//"NML=ColumnSource_config")

  if(.not.foundtopo)then
    if(need_topo)then
       if(MasterProc)write(*,*)"WARNING: Not calculating Column emissions because no topo file found"
       NMAX_LOC = 0
       NMAX_EMS = 0
       found_source = .false.
       return
    else
       if(MasterProc)write(*,*)"WARNING: Column emissions calculated using approximate elevations"
    endif
  end if
avaldebe commented 6 years ago

PrintLog writes the same message to the standard output and to RunLog.out. The warning ending up in fort.70, might come from the fact that RunLog.out is not open on the processor that issues the warning. @mifads What do you think?

avaldebe commented 6 years ago

@gitpeterwind The way I see it, the problem that started this issue comes from the fact that the comment on the configuration file distributed on the release does not reflect what the need_topo option actually does. In addition to fixing the need_topo=F bug on your last comment, we have to:

gitpeterwind commented 6 years ago

The dev version has already been updated on Friday.

gitpeterwind commented 6 years ago

The issue is solved, but left open until the OpenSource version is updated (or is that not how we should do?)

avaldebe commented 6 years ago

OK, will label as solved and keep open until next release

avaldebe commented 5 years ago

Closing down solved issues after rv4_32 and rv4_33. Please reopen if necessary.