metno / emep-ctm

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

Remove FORECAST mode #51

Closed avaldebe closed 5 years ago

avaldebe commented 5 years ago

Back in the day before config_emep.nml, the FORECAST mode was introduce to set all the different options required for a forecast all in one go.

All those options are now available on on config_emep.nml, so we can cleanup:

Note, this issue is also on the development repo (metno/emep-mscw#127)

gitpeterwind commented 5 years ago

Hi  Álvaro, Very good. One request; maybe you have done it already, otherwise please can you change this in Nest_mod.f90: in readxn , there is something like

  if(MODE_READ=='FORECAST')then
    filename_read_3D=date2string(template_read_3D,ndate,&
                                 mode='YMDH',debug=mydebug)
    filename_read_BC=date2file  (template_read_BC,ndate,BC_DAYS,"days",&
                                 mode='YMDH',debug=mydebug)
    inquire(file=filename_read_3D,exist=fexist_3D)
    inquire(file=filename_read_BC,exist=fexist_BC)
  else
    filename_read_3D=date2string(template_read_3D,ndate,&
                                 mode='YMDH',debug=mydebug)
    filename_read_BC=date2string(template_read_BC,date_nextfile,&
                                 mode='YMDH',debug=mydebug)
    fexist_3D=.true.  ! assume 3D file exists                                                                                      
    fexist_BC=.true.  ! assume BC file exists                                                                                      
  end if

Can you remove the "else" case, i.e. that in all cases the inquire is called? That part can then look like:

    filename_read_3D=date2string(template_read_3D,ndate,&
                                 mode='YMDH',debug=mydebug)
    filename_read_BC=date2file  (template_read_BC,ndate,BC_DAYS,"days",&
                                 mode='YMDH',debug=mydebug)
    inquire(file=filename_read_3D,exist=fexist_3D)
    inquire(file=filename_read_BC,exist=fexist_BC)

(no "if" anymore)

avaldebe commented 5 years ago

@gitpeterwind will look into your request when I reach that part of the code

avaldebe commented 5 years ago

@gitpeterwind do you mean to make the MODE_READ=='FORECAST' clause the only behavior?

gitpeterwind commented 5 years ago

yes!

avaldebe commented 5 years ago

done!

avaldebe commented 5 years ago

@heikoklein You might be interested, as the FORECAST mode was used in old versions if eEMEP. In fact, the output progress files started as a requirement from eEMEP's first implementation.

mifads commented 5 years ago

Looks good, except:

please revert the fullrun change. This file should be output whatever the length of the run. Thanks.
gitpeterwind commented 5 years ago

please revert the fullrun change. This file should be output whatever the length of the run. Thanks.

Yes, it was problematic that those files were missing when testing. I won't mind keeping monthly and daily too.

mifads commented 5 years ago

Actually, such a large change in outputs should have been discussed first. Then we could have said no directly ;-)

avaldebe commented 5 years ago

@mifads point taken.

Earlier this year @gitpeterwind asked to remove the FORECAST mode. I mentioned in person the skip month/fullrun feature, but did not elaborate... This is needed for the current forecast/analysis runs. There will be 21.535 of them this year, and creating only relevant files helps with troubleshooting. I will add a USES%SKIP_INCOMPLETE_OUTPUT flag to handle this behavior.

avaldebe commented 5 years ago

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