-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting to DEPHY format #518
Comments
Here is the broad-stroke documentation for using it: The script is in ccpp-scm/scm/etc/scripts/dephy_converter.py. It only takes one argument: -n name_of_case (where name_of_case corresponds to an existing case data file found in the ccpp-scm/scm/data/processed_case_data directory without the .nc extension). The script reads in the old file in ccpp-scm/scm/data/processed_case_data together with the associated case configuration namelist in ccpp-scm/scm/etc/case_config and outputs a new DEPHY-formatted case file in ccpp-scm/scm/data/processed_case_data named "name_of_case_SCM_driver.nc". It also modifies that case configuration namelist for the case. Before trying to use the script, I would create a backup of the case data file and case configuration namelist. Then, you can check that the conversion worked by running the original case and the DEPHY version and comparing the output. It may not be bit-for-bit, but the output should look VERY similar if plotted. |
Thanks @grantfirl! |
Thank you @dustinswales and @grantfirl! So far in the CCPP SCM v7.0.0, I've converted the required forcings from the conventional format to DEPHY format without any issues, and I've run all seven 33-hour periods of the ATOMIC test case using the SCM forcings in both the conventional and DEPHY formats and using three physics suites (GFS_v16, GFS_v17_p8, and RRFS_v1beta). For all the periods and physics suites tested, the outputs of advective tendencies - i.e. “T_force_tend”, “qv_force_tend”, “u_force_tend”, and “v_force_tend” - are identical between the runs driven by the conventional- and DEPHY-format forcings. The boundary forcings are identical between the forcing files (under data/processed_case_input/) in the conventional and DEPHY formats as well. In general, the runs driven by different forcing formats are similar, regardless of choices of tested period and physics suite. However, one or two specific combinations of period and physics suite show noticeable differences, particularly in cloud fraction and/or surface fluxes, between the runs driven by different forcing formats. Would this relatively significant sensitivity (of certain variables, under certain run cases) to forcing format be a concern, or is it actually not so uncommon? |
@ihursmas |
@dustinswales The corresponding files can be found here:
The runs are The same period conducted using GFS_v17_p8 or RRFS_v1beta shows much smaller discrepancies between the runs driven by different formats of forcings, but I think those differences are still relatively noticeable compared to their counterparts for other periods. Let me know if you don't have assess to all these files listed above (I will then try to deliver them here). Thank you! |
@ihursmas Sorry, I was out yesterday. I'm taking a look at this now. |
@ihursmas @grantfirl
So the forcing is nearly identical between DEPHY and non-DEPHY runs, there are some bitwise differences, but nothing that stands out to me as egregious . But the state in the SCM evolves quite differently? |
@dustinswales |
@dustinswales Thanks! I quickly checked the sensitivity to column_area (I set it to 1.69E8, and I think the default is 2E9): the T and qv differences are smaller yet the qc (which would lead to cloud fraction) difference is larger. I'm also wondering if the momentum nudging (by setting mom_forcing_type = 3 and relax_time = 3600.0) in the conventional format were genuinely reflected in the DEPHY format, as I saw relatively large difference in u_force_tend and v_force_tend (compared to T_force_tend and qv_force_tend which are several orders smaller than their magnitudes of individual run) between the DEPHY and non-DEPHY runs. |
@ihursmas I've compared the configs for both and I don't see any discrepancies there. I am going to look for anything that might cause diffs in the code, specifically the u_/v_force_tend. |
Hi @hertneky and @dustinswales, do we have any updates? Thanks! |
Hi @ihursmas I have not found anything that is specifically causing those differences we see. I replicated your runs and looked at various variables, many of which seemed to have rounding/precision errors that grow with time. In the scm_input.F90, I did notice precision diffs between orig/dephy for initializing some of the variables (double vs single precision). I decided to build/run with 32-bit to see if the diffs reduced, but came across an issue with running the atomic case in 32-bit for the dephy format. Noting that a supplied case in dephy format, 'twpice', did not have the issue, so it may be unique to the atomic dephy case. Again, this is just for single precision as everything ran fine otherwise. @scrasmussen will help look at the single precision issue. |
@hertneky @dustinswales @ihursmas @grantfirl Hi! I'm just checking if anyone has any updates on this work? It seems that it is not related to precision, but something else in the tendency files? |
@ihursmas @dustinswales @grantfirl First, did you run the dephy_converter without any modifications? I may need to test mods and want to assure I am using the same starting point as you. There was an issue with how column area was applied for the DEPHY format. Fixing this issue had no affect on your latest results, since you had column_area set the same in both nmls.
There have been issues opened wrt w_ls/omega not being present in the DEPHY forcing.
|
@hertneky Thank you for getting back to this. |
Hi all, I did several other tests and still haven’t been able to figure out what cause the issue. Interestingly, I tried the TWPICE case as a test and found discrepancies of similar magnitudes, which makes me think this may be an intrinsic issue of transformation of forcing file format. Some details are provided below.
|
Thanks I-Kuan for following up on this, the difference is quite large and doesn't seem to be just truncation... Is there some vertical interpolation involved in the conversion? |
@lisa-bengtsson No, the SCM handles the temporal and vertical interpolations of forcings after reading in the forcings. |
@hertneky @dustinswales @ihursmas @lisa-bengtsson As far as I can tell, the differences that we're seeing with this particular ATOMIC case time period using the SCM_GFS_v16 suite are due to differences in surface fluxes from NSST. Since marine boundary layer clouds are acutely sensitive to surface fluxes, if the surface fluxes differ by a small amount, this difference can easily be amplified by the cloud response. If one simulation develops clouds and one does not ,the impact on the column for all state variables can be huge. Here are the surface fluxes comparisons using the SCM_GFS_v16 suite: If I run both DEPHY and non-DEPHY formatted cases with the "no_nsst" version of the SCM_GFS_v16 suite (uses sfc_ocean instead and the SST is actually held to the forced value), then there are relatively negligible differences between the cases. Here are the surface fluxes from the SCM_GFS_v16_no_nsst suite: For oceanic field campaign cases, I think that we should be using either suites with the sfc_ocean scheme rather than NSST unless we have the additional required input like depth of the thermocline, etc. OR use prescribed surface fluxes. I'm not at all confident in how the NSST scheme works. It appears that if we give it an initial SST, it produces reasonable surface fluxes, but it also produces its own SST that diverges slightly from the prescribed value. It is only using the prescribed SST for the first time step. It must be using some kind of default values for the mixed layer above the thermocline, but I'm not sure if that's really what we want? |
I definitely need to look at what is happening in the non-DEPHY format case. If it is reading and assigning omega, this does get passed to physics and used by some schemes, even if it doesn't get applied in the forcing. This is likely not desired and would lead to differences between non-DEPHY and DEPHY cases if the DEPHY cases are completely ignoring any omega values if it is not used in the forcing. If this is the case, the DEPHY cases are doing it right and the non-DEPHY cases are doing it wrong, IMO. |
I do think that some of what we're seeing is related to growth of high significant digit differences akin to single- vs double-precision changes. If the changes always start out small and grow in time this is consistent with this possibility. One way to test this would be to make two DEPHY cases that differ in some (or all) variables by some tiny amount and seeing if the evolution of differences is similar to what one observes between non-DEPHY and DEPHY versions of the same case. |
This does seem to be the case for non-DEPHY cases. The statein%vvl variable that has the standard name of lagrangian_tendency_of_air_pressure is associated by pointer to the scm_state%omega variable that is given the time and space-interpolated values in scm_forcing.F90 regardless of what the thermo_forcing_type control was set to. Schemes can use this variable even if it is not used for forcing. While this is certainly wrong, I wonder if it is a big deal because we're moving on from the non-DEPHY files anyway? It does appear to be controlled correctly for the DEPHY cases (vertical velocities are initialized and kept at zero if the forc_wap and forc_w global attributes are both false), although it also might not be the desired behavior to pass in forcing omega/w to physics in addition to using it in forcing. |
@grantfirl Thank you for digging this further and figuring out one dominant cause! Yes this is a very good point - we did find the simulated SST drifted away from the observed values when using the default sets of suite and namelist files for either SCM_GFS_v16 and SCM_GFS_v17_p8. So we used the prescribed SST for demonstrating the ATOMIC case in our manuscript, although the way I did was to modify the NSST scheme rather than using the "no_nsst" set of suite and namelist files directly. I guess the reason I did not mention the role of prescribed SST is that I wanted the ATOMIC case to be tested to a broader extent rather than having to be run with certain constraints (e.g. prescribing the boundary conditions such as SST). I thought if the SCM would drift away, either driven with the non-DEPHY or the DEPHY format forcings it shall drift away similarly. But apparently I was wrong, based on what you showed here. So maybe we should add a README file or something similar that suggests the users what is the most "scientifically supported" configuration of using the ATOMIC case? And would this need to be applied to other cases, such as TWPICE which also shows non-negligible differences between the runs driven by non-DEPHY and DEPHY format forcings? But then the flexibility of testing prescribed vs. simulated fields at the atm-ocn interface would lose, so I don't know what would be the best solution. |
@grantfirl Yes I agree that I should have But for the issue we're trying to address here, I don't think the presence of |
As part of the CCPP v7.0.0 release, all SCM cases included in the repository are in the DEPHY format. Provided with the codebase are script(s) to convert cases in the "old" SCM format to the DEPHY format.
However, this script is not documented, so it's not clear how to use it.
@grantfirl @ligiabernardet
The text was updated successfully, but these errors were encountered: