metno / emep-ctm

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

DailyEmisOut = T #105

Open ln-x opened 2 years ago

ln-x commented 2 years ago

Hi, I would like to output hourly and daily biogenic emissions. In https://emep-ctm.readthedocs.io/en/latest/Output.html it is described that to output emissions the option DailyEmisOut = T need to be set. I assume in the config_emep.nml as in the Config_module.f90 I cannot find this option. When I add this option to config_emep.nml I receive this error pointing exactly to the newly included option:

forrtl: severe (19): invalid reference to variable in NAMELIST input, unit 28, file /binfl/lv71449/htrimmel3/EMEP/work/2018-10-14/config_emep.nml, line 72, position 16.

Is it possible to output other biogenic emissions but "Emis_mgm2_BioNatC5H8" and "Emis_mgm2_BioNatTERP"?

Thank you for any help, Heidi

avaldebe commented 2 years ago

In https://emep-ctm.readthedocs.io/en/latest/Output.html it is described that to output emissions the option DailyEmisOut = T need to be set.

The documentation refers to a new feature on the next release (hopefully before the end of March 2022).

HourlyEmisOut = T, which is available on the current open source version of the model, will enable hourly emission output. If you also want daily emission output, and can not wait for the next release, you need to modify Derived_mod.f90 line 695 as follows:

  do  ind = 1, size(EMIS_FILE)
    dname = "Emis_mgm2_" // trim(EMIS_FILE(ind))
    if(HourlyEmisOut)then
       call AddNewDeriv( dname, "TotEmis", "-", "-", "mg/m2", &
-           ind , -99, T,  1.0e6,  F,  'YMH' )
+           ind , -99, T,  1.0e6,  F,  'YMDH' )
    else
       call AddNewDeriv( dname, "TotEmis", "-", "-", "mg/m2", &
            ind , -99, T,  1.0e6,  F,  'YM' )
    endif
  end do ! ind

Is it possible to output other biogenic emissions but "Emis_mgm2_BioNatC5H8" and "Emis_mgm2_BioNatTERP"?

As far as I can tell all EMIS_BioNat are written out. If you want daily and hourly EMIS_BioNat output you need to modify Derived_mod.f90 line 683 as follows:

  do  ind = 1, NEMIS_BioNat
    if(EMIS_BioNat(ind)(1:5)=="ASH_L")cycle   ! skip ASH_LxxByy for AshInversion
    dname = "Emis_mgm2_BioNat" // trim(EMIS_BioNat(ind) )
    if(MasterProc) write(*,'(a,i4,a)') dtxt//'NatEmis ', ind, trim(dname)
    call AddNewDeriv( dname, "NatEmis", "-", "-", "mg/m2", &
-                ind , -99, T ,    1.0e6,     F, 'YM' )
+                ind , -99, T ,    1.0e6,     F, 'YMDH' )
  end do
ln-x commented 2 years ago

Hi, thank you for your reply. I tried setting "HourlyEmisOut = T", but no hourly emissions were output in the " *hourInst.nc file ".

avaldebe commented 2 years ago

Hi, thank you for your reply. I tried setting "HourlyEmisOut = T", but no hourly emissions were output in the " *hourInst.nc file ".

Did you also made the changes I wrote on my previous message?

ln-x commented 2 years ago

Hi, sorry - I understood your message that way, that I can use "HourlyEmisOut = T" already in the current version without adapting the source code and recompiling. I thought the recompiliation is only needed for Daily output. So I tried without adapting the source code and recompiling.