Add Ai2's ACE as an emulator component #7957
Conversation
| vbot(i, j) = net_outputs(1, 32, i, j) ! V_0 | ||
| tbot(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| ptem(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| shum(i, j) = 0.0_R8 ! TBD |
There was a problem hiding this comment.
datm calculates shum (bottom atm level spec humidity) here:
E3SM/components/data_comps/datm/src/datm_comp_mod.F90
Lines 1106 to 1134 in cae5c62
I figure we can probably use the specific_total_water_0 field to calculate shum, but I'm not certain about the details here...
There was a problem hiding this comment.
specific total water in ace is defined as qv+qc+qi+qr (basically all water), but I think specific humidity here is just qv (vapor). I think this is somewhat important, so we shouldn't use specific total water (except for prelim testing)
| ubot(i, j) = net_outputs(1, 24, i, j) ! U_0 | ||
| vbot(i, j) = net_outputs(1, 32, i, j) ! V_0 | ||
| tbot(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| ptem(i, j) = net_outputs(1, 8, i, j) ! T_0 |
There was a problem hiding this comment.
datm sets ptem equal to tbot, so we have followed suite here for now.
https://github.com/E3SM-Project/E3SM/blob/cae5c6237cfd379968960ebfef7802b19a2b59dd/components/data_comps/datm/src/datm_comp_mod.F90#L1034C36-L1034C41
There was a problem hiding this comment.
we can also calculate the potential temperature, e.g., https://en.wikipedia.org/wiki/Potential_temperature
| Where for the EAM specific compsets below the following is supported | ||
| TIME = Time period (e.g. 2000, HIST, RCP8...) | ||
| ATM = [EAM, EAMXX, SATM, SCREAM] | ||
| ATM = [EAM, EAMXX, DATM, EATM, SATM, SCREAM] |
There was a problem hiding this comment.
Emulated atmosphere, following the c onvention of data, stub, etc. atmospheres --- this pr isn't ready for review yet, we are working on addressing a few items internally first, but wanted to start iterating publicly #open-dev
There was a problem hiding this comment.
we are calling them "emulator_comps"
There was a problem hiding this comment.
sort of parallel to data_comps
There was a problem hiding this comment.
That's a good name for the directory holding them. It doesn't have to be 4 letters so how about "EMATM" to make it more obvious.
There was a problem hiding this comment.
I would vote to keep the following convention:
| comp | purpose |
|---|---|
cmp |
active, physics (flagship version) |
ecmp |
active, emulated (fast version) |
dcmp |
"data" or just reading files |
scmp |
"stub" or no-op |
xcmp |
"dead" (only in testing) |
but I don't care what what each specific one is called; note that eatm will (in the longer term) represent several of the emulated atmosphere models, not a specific one
There was a problem hiding this comment.
In other words, I think it is less than ideal to have "eam", "eamxx" and "scream" etc. as components (replacing atm). Those all should be just called atm as comps, and then once in the atm comp, one can decide if they want to do one eam, eamxx, scream, etc. --- it makes better sense to organize components that way imho
| @@ -0,0 +1,132 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
Thank you for not copying one of the perl versions of buildnml
There was a problem hiding this comment.
I assume you're joking, right? lol
see components/emulator_comps/eatm/bld/build-namelist, but ideally, we should get rid of this
| @@ -0,0 +1,589 @@ | |||
| #!/usr/bin/env perl | |||
There was a problem hiding this comment.
Is this a copy of the EAM build-namelist? Why didn't you just copy the datm one which is all python?
There was a problem hiding this comment.
I was just cutting-and-pasting to get something working. Our first task was to get something working for Luke's scidac as quickly as possible, with the intent of cleaning it up later
There was a problem hiding this comment.
The question still stands. Why not copy the datm one? You don't need the complexity of the EAM namelist.
There was a problem hiding this comment.
I'm happy to replace it once we get something working
There was a problem hiding this comment.
@andrewdnolan, this is excellent! Thanks for the PR and the dilligent work with @jonbob on putting it together. I responded to all your questions. In short, they are nuanced. We have two pathways:
- Take easiset shortcuts to demostrate things are working, without worrying about scientific validity, and only assess if ace starts crashing like crazy
- Preemptively start assembling utils in a shared location that can do these calculations in a documented way
I'd defer to you to decide; I would obviously prefer 2 longer term, but happy to wait for it.
If you decide we should go for 2, let's briefly discuss how we want to do this. A mild personal preference is that we write these utils in C++ (not F90). Again, that's a longer term issue for me: I want us to move to C++ as soon as we are able to do so, and I'd rather see close to 0% code in F90. We can write these small utils/things in Python too.
Another important todo item (that can also wait, so no pressure to get it done now) is to start writing docs about what we are doing alongside PRs, i.e., in components/emulator_comps/docs; I'm happy to put these docs together once we are closer to integrating (unless you'd rather take the lead on this).
Let's keep iterating until we feel more confident. I have a few commits I'd like to push in the near future.
| vbot(i, j) = net_outputs(1, 32, i, j) ! V_0 | ||
| tbot(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| ptem(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| shum(i, j) = 0.0_R8 ! TBD |
There was a problem hiding this comment.
specific total water in ace is defined as qv+qc+qi+qr (basically all water), but I think specific humidity here is just qv (vapor). I think this is somewhat important, so we shouldn't use specific total water (except for prelim testing)
| ubot(i, j) = net_outputs(1, 24, i, j) ! U_0 | ||
| vbot(i, j) = net_outputs(1, 32, i, j) ! V_0 | ||
| tbot(i, j) = net_outputs(1, 8, i, j) ! T_0 | ||
| ptem(i, j) = net_outputs(1, 8, i, j) ! T_0 |
There was a problem hiding this comment.
we can also calculate the potential temperature, e.g., https://en.wikipedia.org/wiki/Potential_temperature
|
An alternative design of this, almost entirely in C++ is in: #7964 |
Switch to layer 7 (c.f. 0) for the "bottom" layer index
And load the ACE restart file as R4 array
stores eatm output at t_i-1 and t_i+1 emulator evaluation states
Needed b/c ACE provides data at 6-hour intervals, but coupling interval can be much smaller than that (e.g. 30-minutes). Unles we linearly interpolate the ACE prediction over the coupling interval the ACE predicted changes are too large and cause stability issue for `ice` model. Plus this ensure that the `net_output` array is synchronized with the coupler clock.
Fixes issue where ACE output had large transience even when forcing data was constant
to link link
e4d9dcb to
32450e6
Compare
No longer need to read the ace restart file. Also dropped all ACE specific netcdf i/o in favor the reatrt read/write functionality.
normalization, denormalization, and correction steps
This PR adds support for emulator components, starting with an emulator atmosphere based on Ai2's ACE.