ESCOMP / POP2-CESM

Parallel Ocean Program (POP2) in CESM
http://www.cesm.ucar.edu/models/cesm2/ocean/
4 stars 24 forks source link

Update to newer MARBL tag #52

Closed mnlevy1981 closed 2 years ago

mnlevy1981 commented 3 years ago

Description of changes:

The MARBL update changes how the MARBL_settings_class python class works, which requires changes in MARBL_scripts/MARBL_wrappers/MARBL_settings.py

See https://github.com/marbl-ecosys/MARBL/pull/346 for more details on the MARBL changes.

Testing:

Test case/suite: I ran aux_pop_MARBL on cheyenne (using both intel and gnu). Test status: bit for bit

User interface (namelist or namelist defaults) changes? None

mnlevy1981 commented 3 years ago

I've got one more MARBL update coming in, and I think it makes sense to add it to this branch rather than merge this branch and then immediately make a new branch (we'll be pulling some terms out of the KMT level of the interior tendency and returning them as a flux at the bottom of the column instead).

mnlevy1981 commented 2 years ago

This update has round-off level changes in compsets that use MARBL. These changes are due to order-of-operation changes in the other_remin term introduced in two places in https://github.com/marbl-ecosys/MARBL/pull/386. I've verified that

3130,3133c3130,3133
<            other_remin(1:k) = min(bot_flux_to_tend(1:k) * &
<                                   min(0.1_r8 + flux_alt, 0.5_r8) * (POC%to_floor - POC%sed_loss(k)), &
<                                       bot_flux_to_tend(1:k) * (POC%to_floor - POC%sed_loss(k)) - &
<                                       (sed_denitrif(1:k)*denitrif_C_N))
---
>            other_remin(1:k) = bot_flux_to_tend(1:k) * &
>                               min(min(0.1_r8 + flux_alt, 0.5_r8) * (POC%to_floor - POC%sed_loss(k)), &
>                                       (POC%to_floor - POC%sed_loss(k) - &
>                                       (sed_denitrif(1:k)*dz_loc*denitrif_C_N)))
3140,3141c3140,3141
<               other_remin(1:k) = bot_flux_to_tend(1:k) * (POC%to_floor - POC%sed_loss(k)) - &
<                                  sed_denitrif(1:k)*denitrif_C_N
---
>               other_remin(1:k) = bot_flux_to_tend(1:k) * (POC%to_floor - POC%sed_loss(k) - &
>                                  (sed_denitrif(1:k)*dz_loc*denitrif_C_N))

gets us back to bit-for-bit, but this isn't a permanent solution because we don't want dz_loc in the equation (for POP, bot_flux_to_tend(:) is either 0 or 1/dz_loc but that's not necessarily the case for MOM)

mnlevy1981 commented 2 years ago

@klindsay28 I think we've reviewed the changes in marbl_settings.py, but change in ecosys_driver.F90 is new. When you get a chance, can you let me know what you think? We need to set bot_flux_tend(:) in POP, and I think the way I do it makes sense.