fds icon indicating copy to clipboard operation
fds copied to clipboard

BACK namelist

Open drjfloyd opened this issue 1 year ago • 8 comments

For the BACK namelist. I think this is a great idea, but should we make such that if BACK is used it completely replaces any prior MASS_FRACTION inputs? As it is now if you had multiple species with MASS_FRACTION_0 and also set a BACK with a different set of species, you would combine the two into a normalized list.

We would just need to add a couple of lines after the ERR check:

READ(LU_INPUT,NML=BACK,END=29,ERR=30,IOSTAT=IOS) 30 IF (IOS>0) THEN WRITE(MESSAGE,'(A)') 'ERROR(101): Problem with BACK input' CALL SHUTDOWN(MESSAGE) ; RETURN ENDIF

*** add these *** SPECIES_MIXTURE%ZZ0 = 0._EB SPECIES%YY0 = 0._EB *** add these ***

Also looking at the source I see we don't go back ad adjust YY0 for single spec index if species were normalized Though we don't seem to use that anywhere else now so maybe we can just delete.

drjfloyd avatar Jan 06 '25 20:01 drjfloyd

I will take a look.

cxp484 avatar Jan 06 '25 21:01 cxp484

I am not recalling this discussion. Can you please provide me with context. What does BACK namelist do?

rmcdermo avatar Jan 06 '25 21:01 rmcdermo

A while back there was a conversation either Teams or email about making it easier to specify initial mass fractions when using detailed mechanisms. That it would be good to have some way other than the initial SPEC read to specify mass fractions. That way you could generate the file being CATFed once and then change individual scenario file. We discussed having multiple sets of SPEC inputs that would override prior ones but that seemed like it could cause unintended issues. So instead there was the idea of having BACK where you could list the initial mass fractions. This is just a list of species and their iniital mass fractions. I was suggesting that if BACK is used that we zero out any prior ZZ0 definition and then process BACK.

drjfloyd avatar Jan 06 '25 21:01 drjfloyd

What is the origin of the word "BACK", other than it has 4 letters?

mcgratta avatar Jan 06 '25 22:01 mcgratta

Ah right... "BACK" for overwriting BACKGROUND species from the CATF chem input library. Now I remember.

rmcdermo avatar Jan 06 '25 22:01 rmcdermo

Out of curiosity, is this method intended to provide different advantages than using &CSVF SPECFILE='CHID_spec_t1_m1.csv' /?

Er9y714 avatar Jan 06 '25 22:01 Er9y714

@Er9y714 SPECFILE sets species grid cell by grid cell. The BACK is intended to simplify aspects of the workflow for running cases with detailed chemistry mechanisms and provides an alternative way of specifying the global MASS_FRACTION_0.

drjfloyd avatar Jan 06 '25 23:01 drjfloyd

Looking at this some more maybe ok to leave as is but if BACK is READ write a WARNING message if other MASS_FRACTION_0 have benn set. We are setting condensible mass fractions before we check for BACK. On BACK dealing with condensables would mean more complications for that input. In general few users will ever use this and in most cases I think it would be without also trying to set MASS_FRACTION_0 on SPEC. I will add a WARNING and remove YY0 which is no longer being used anywhere

drjfloyd avatar Jan 07 '25 15:01 drjfloyd

Looks like BACK is implemented. Can we close this?

rmcdermo avatar Aug 12 '25 20:08 rmcdermo

I think we can.

drjfloyd avatar Aug 12 '25 21:08 drjfloyd