E3SM-Project / scream

Fork of E3SM used to develop exascale global atmosphere model written in C++
https://e3sm-project.github.io/scream/
Other
80 stars 56 forks source link

atmchange/atmquery use case for missing initial condition #2907

Open jgfouca opened 3 months ago

jgfouca commented 3 months ago

@AaronDonahue wanted to do an atmchange on initial_conditions::qi.

% ./atmchange initial_conditions::qi=0.0
ERROR: initial_conditions::qi did not match any items

The reason is initial_conditions::qi is not in namelist_scream.xml is because in namelist_defaults_scream.xml:

    <qi hgrid="ne256np4|ne1024np4">0.0</qi>

The grid check fails so qi is just omitted and then is not usable by atmchange. We maybe need a smarter system to handle this case (qi is in the xml but is flagged as skip?) or the ability to append child elements, probably the latter.

AaronDonahue commented 3 months ago

I would be in favor of being able to add child members. My understanding is that if a user adds an unused child parameter it will just be ignored in the actual run, so we may want to add a WARNING that this is a power user function where typos may lead to unexpected behavior.

bartgol commented 3 months ago

In my long todo list, I want to change how we specify constant IC for fields. Namely, I want to have

   constant_fields:
     - f1 = 0.0
     - f2 = 0.2
     - f3 = (0.1, 0.2) 

where the latter is a vector quantity. This would mean that the XML entry is simply

<constant_fields type="array(string)"/>

which we can then always append to.