Closed mvertens closed 4 months ago
@mvertens @matsbn
From what I see in the code changes, I understand the CESM stream relaxation method replaces the relaxation method provided by mod_ben02
. I don't know if this capability has been used recenlty, I have not looked into this myself. If this PR is merged, are there parts of mod_ben02
that becomes redundant?
@TomasTorsvik - this capability is used in many places in CESM to obtain forcing (CAM, CTSM, POP) and of course all of the CDEPS data components. The way I implemented this was to only activate this in CESM - and let ben02 still have backwards compatibility. The key issue is that I wanted to make sure that you could still do stand-alone testing without needing to compile in CDEPS (which then requires PIO2 and ESMF). The new capability from CDEPS enables you to interpolate with different types of interpolation algorithms in the horizontal - but also provides the ability to do horizontal interpolation on a set of vertical levels and then do vertical interpolation if the levels are different from the model. This functionality is used by POP for 3d relaxation. The key issue is that from the point of view of BLOM - the interfaces to do this are very simple and can be leveraged anywhere in the code base if that is desired.
@mvertens - thanks for the explanation, generally speaking the suggested changes look reasonable to me. I just wanted to point out that the code change removes calls to some functions provided by mod_ben02
(initai
, rdcsic
, rdctsf
and fnlzai
) that are not called anywhere else in the code, so it would seem these routines become redundant.
@TomasTorsvik - sorry for not being clear. Yes - those changes were only needed for cesm - so they were removed. My goal was to still keep the namelist variables srxday and trxday the same for both stand-alone and cesm - but when using cesm those variables would trigger the new stream functionality.
The following are images showing both the spatial interpolation as well as time interpolation functionality of the new streams capability: The figure is just the So_s sent to the mediator by blom. These two figure look identical between what is generated by BLOM master and this PR.
The next figure is the difference at 4 days. Except for a handful of points the differences are on the order of 1.e-4 or less.
Great with stream capability for BLOM relaxation fields in NorESM! If I'm not mistaken, it seems the stream capability requires NUOPC and that the old relaxation procedure is unavailable with MCT. OMIP type experiments, that require SSS relaxation, with MCT is still used a lot for testing, so it would be good to find a way to still support those use cases.
@matsbn - thanks for pointing this out. The stream capability is actually available with the data functionality in mct. Its just that its must less flexible. I will add this in. However, as we move to 2.5 - mct will no longer exist so at some point we need to decide when blom master will no longer support it.
Just to add - testing the mct stream capability will need to be done in the noresm2.3 code base and not the noresm2.5 code base.
@matsbn @TomasTorsvik - after some more prototyping I've concluding that your original suggestion today of using the original interpolation for mct was actually easier. The problem is that additional domain files need to be specified for mct - and that makes things a lot more complicated. I've introduce a new namelist use_stream_relaxation that is set to .true. for nuopc and .false. for mct by default - and the code triggers off of this namelist and is therefore backwards compatible with mct but allows new stream usage for nuopc. I've pushed that back to this PR - and verified that using this branch in noresm2_3_develop for SMS_D_Ld1.T62_tn14.NOINYOC.betzy_intel works.
This introduces new CDEPS stream capability for use of BLOM in CESM to permit new relaxation to salinity and temperature. The capability is still triggered by trxday and srxday - but the new time and spatial interpolation are done in the new files:
drivers/nuopc/ocn_stream_sss.F90 and drivers/nuopc/ocn_stream_sst.F90
This capability permits spatial interpolation of forcing data as well as the ability to use multi-year time samples (for example daily data for a number of years). The data is not all read in at once - but only two time periods are read in at a time to do the time interpolation. The advantage of this new capability is that only one relaxation file can be specified and can be used for multiple resolutions.
The code uses the CDEPS inline stream capability in $SRCROOT/components/cdeps/streams.
New namelist groups stream_sss and stream_sst are introduced that turn this new capability on:
Still to do: