ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
302 stars 307 forks source link

Getting fire-emission to work with FATES #1045

Open ekluzek opened 4 years ago

ekluzek commented 4 years ago

Currently fire-emissions from CTSM into CAM can only work for CN or BGC modes and NOT with FATES. As a longer term goal we need FATES to be able to send fire-emissions from CTSM to the coupler and into CAM-Chem.

glemieux commented 2 years ago

Reviewing issues I believe this is related to https://github.com/NGEET/fates/issues/163

ekluzek commented 1 year ago

@adrifoster noticed that the namelist build doesn't ensure these two can't be turned on together, and as a result cases fail in a hard to understand way. So she is going to remedy this.

adrifoster commented 1 year ago

thanks @ekluzek this is the error I got for a test that erroneously had -fire_emis and use_fates

cat /scratch/cluster/afoster/tests_0126-104846iz/SMS_D_Mmpi-serial.CLM_USRDAT.I1PtClm51Fates.izumi_nag.clm-default--clm-NEON-FATES-NIWO.GC.0126-104846iz_nag/run/cesm.log.589551.izumi.cgd.ucar.edu.230126-115716
Runtime Error: /home/afoster/CTSM/src/biogeochem/FireEmisFactorsMod.F90, line 76: Subscript 1 of FACTORS (value 16) is out of range (1:14)
Program terminated by fatal error
adrifoster commented 1 year ago

So I added this check but now this fates test is failing on build because -fire_emis is used (from one of the default clm includes user mods).

One solution would be to grab what is needed from the mimics/clm includes chain and put in this testmod dir. Otherwise I'm not sure how to get around using the necessary mimics, clm, and fates options. @ekluzek can you advise?

Hoping to finish #1932 soon and don't want to keep adding too much to it that is outside the scope of FATES-NEON stuff.

ekluzek commented 1 year ago

I see a couple ways to handle this:

  1. Change the include order so that FATES is last and overrides the other settings (and explicitly set CLM_BLDNML_OPTS)
  2. Have a mimics base test-mod that doesn't include the default that can be used by both CTSM-BGC and FATES
  3. Duplicate the mimics test-mod for FATES

Since, right now all that the mimics test mode does is include: default and Cold-Start and sets one namelist variable. I think we should do "3". So the FATES test mod wouldn't reference the other one, but just set

soil_decomp_method = 'MIMICSWieder2015'

explicitly in it.

billsacks commented 1 year ago

Just FYI: I'm changing the failing test that @adrifoster mentioned in https://github.com/escomp/ctsm/issues/1045#issuecomment-1408747260 to be a _P72x2 test instead of _P144x2 to keep with the goal of having all of our aux_clm tests run on 4 nodes or fewer.

ekluzek commented 1 year ago

Note on this here: https://github.com/ESCOMP/CTSM/pull/1959/files#r1168038061. The interface to fire-emission should be neutral in terms of FATES vs. BGC.