forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 17
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
update to GFDL 20210723 main branch #71
Merged
jiandewang
merged 303 commits into
NOAA-EMC:dev/emc
from
jiandewang:feature/update-to-GFDL-20210723
Jul 27, 2021
Merged
update to GFDL 20210723 main branch #71
jiandewang
merged 303 commits into
NOAA-EMC:dev/emc
from
jiandewang:feature/update-to-GFDL-20210723
Jul 27, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sync with NOAA-GFDL dev/gfdl branch
* 'dev/gfdl' of github.com:NOAA-GFDL/MOM6: Fix to out-of-bounds error Slight improvement in writeMessageAndDesc Corrected recent bug in writeMessageAndDesc Included H_subroundoff in a denominator +Added code to handle tab lengths in documentation Added explicit form of cpu_clock_id (*)Improve ePBL when EPBL_ORIGINAL_PE_CALC=False Alternate fix for divide-by-zero. Clean up some divide-by-zero issues in OBCs. Added a space to a description. Codecov: Set base as parent (target) branch Fixes an integer-kind mismatch in MOM_random, seed_from_time() (mom-ocean#1113)
Merge in dev/gfdl updates
Sync with MOM6 dev/gfdl
Sync with NOAA-GFDL dev/gfdl
sync with dev/gfdl
Sync with NOAA-GFDL dev/gfdl
Sync with NOAA-GFDL dev/gfdl
Sync with NOAA-GFDL
Sync with NOAA-GFDL dev/gfdl
…ons of the routines with the fms-io or fms2-io interfaces added module use statments for fms2_io and MOM_io helper routines to MOM_restart added use_fms2=.true. arguments to save_restart and restore_state calls added write_ic=.true. to the save_restart call in MOM.F90 added module MOM_axis with routines to define and register axes and their metadata added module MOM_read_data_fms2.F90 with wrappers for fms2_io read_data interfaces and required routines added module MOM_write_field_fms2.F90 with wrappers for fms2_io write_data interfaces updated module use statments in MOM_io and MOM_restart to reference routines in MOM_read_data_fms2, MOM_write_field_fms2, and MOM_axis made write_field and create_file interfaces in MOM_io added create_file routines to MOM_io that accept file names or file objects to create/overwrite netcdf files that will be written to via write_field calls fixed compile-time errors added new MOM_read_data routines to MOM_read_data interface in MOM_io added placeholder call for new write_field routines to MOM_io changed use_fms2 to a required first argument in save_restart_fms2 and restore_state_fms2 changed write_ic to a required argument in write_initial_conditions fixed the layer and interface checks in MOM_get_diagnostic_axis_data commented out manual checksum registration in save_restart_fms2 so that internal fms2-io checksum computation is used added checks for time units to restore_state and save_restart added logic to make the restart time 1 to save_restart_fms2 if there is an abnormally large value passed to the routine added interface routine file_exists_FMS2 that uses the fms2_io file_exists call added subroutine get_num_restart_files to MOM_restart that searches for known variants of the input file names and returns then number of restart files available for querying, and the optional list of filepaths added loop to search the files for all mandatory variables in the list of file paths returned to by cal to get_num_restart_files added calls to get the variable dimension names and pass them as arguments to register_restart_field in restore_state_fms2 removed exit from inner variable loop in restore_state_fms2 code cleanup moved missing_fields=0 outside of the CS loop in restore_state_fms2 moved missing_fields=0 outside of the CS loop in restore_state_fms2 converted save_restart and restore_state to interface that call versions of the routines with the fms-io or fms2-io interfaces added module use statments for fms2_io and MOM_io helper routines to MOM_restart added use_fms2=.true. arguments to save_restart and restore_state calls added write_ic=.true. to the save_restart call in MOM.F90 added module MOM_axis with routines to define and register axes and their metadata added module MOM_read_data_fms2.F90 with wrappers for fms2_io read_data interfaces and required routines added module MOM_write_field_fms2.F90 with wrappers for fms2_io write_data interfaces updated module use statments in MOM_io and MOM_restart to reference routines in MOM_read_data_fms2, MOM_write_field_fms2, and MOM_axis made write_field and create_file interfaces in MOM_io added create_file routines to MOM_io that accept file names or file objects to create/overwrite netcdf files that will be written to via write_field calls fixed compile-time errors added new MOM_read_data routines to MOM_read_data interface in MOM_io added placeholder call for new write_field routines to MOM_io changed use_fms2 to a required first argument in save_restart_fms2 and restore_state_fms2 changed write_ic to a required argument in write_initial_conditions fixed the layer and interface checks in MOM_get_diagnostic_axis_data commented out manual checksum registration in save_restart_fms2 so that internal fms2-io checksum computation is used added checks for time units to restore_state and save_restart added logic to make the restart time 1 to save_restart_fms2 if there is an abnormally large value passed to the routine added interface routine file_exists_FMS2 that uses the fms2_io file_exists call added subroutine get_num_restart_files to MOM_restart that searches for known variants of the input file names and returns then number of restart files available for querying, and the optional list of filepaths added loop to search the files for all mandatory variables in the list of file paths returned to by cal to get_num_restart_files added calls to get the variable dimension names and pass them as arguments to register_restart_field in restore_state_fms2 removed exit from inner variable loop in restore_state_fms2 code cleanup removed test workflow directory moved missing_fields=0 outside of the CS loop in restore_state_fms2 converted save_restart and restore_state to interface that call versions of the routines with the fms-io or fms2-io interfaces added module use statments for fms2_io and MOM_io helper routines to MOM_restart added use_fms2=.true. arguments to save_restart and restore_state calls added write_ic=.true. to the save_restart call in MOM.F90 added module MOM_axis with routines to define and register axes and their metadata added module MOM_read_data_fms2.F90 with wrappers for fms2_io read_data interfaces and required routines added module MOM_write_field_fms2.F90 with wrappers for fms2_io write_data interfaces updated module use statments in MOM_io and MOM_restart to reference routines in MOM_read_data_fms2, MOM_write_field_fms2, and MOM_axis made write_field and create_file interfaces in MOM_io added create_file routines to MOM_io that accept file names or file objects to create/overwrite netcdf files that will be written to via write_field calls fixed compile-time errors added new MOM_read_data routines to MOM_read_data interface in MOM_io added placeholder call for new write_field routines to MOM_io changed use_fms2 to a required first argument in save_restart_fms2 and restore_state_fms2 changed write_ic to a required argument in write_initial_conditions fixed the layer and interface checks in MOM_get_diagnostic_axis_data commented out manual checksum registration in save_restart_fms2 so that internal fms2-io checksum computation is used added checks for time units to restore_state and save_restart added logic to make the restart time 1 to save_restart_fms2 if there is an abnormally large value passed to the routine added interface routine file_exists_FMS2 that uses the fms2_io file_exists call added subroutine get_num_restart_files to MOM_restart that searches for known variants of the input file names and returns then number of restart files available for querying, and the optional list of filepaths added loop to search the files for all mandatory variables in the list of file paths returned to by cal to get_num_restart_files added calls to get the variable dimension names and pass them as arguments to register_restart_field in restore_state_fms2 removed exit from inner variable loop in restore_state_fms2 code cleanup removed test workflow directory removed white space updated FMS tag in .testing Makefile fixed argument comments to use doxygen style in MOM_write_field_fms2 code cleanup removed \TODO from MOM_restart fixed documentation for module variables in MOM_read_data_fms2 and MOM_write_field_fms2 removed doxygenized TODO statements removed new MOM_read_data routines from interface, and commented out calls in MOM_io fixed doxygen definitions more doxygen fixes changed save_restart and restore_state to wrapper routines with opitional use_fms2 and write_ic arguments added use_fms2=.true. and write_ic=.true. to save_restart and restore_state calls removed the error messages from append_substring tried reordering the write_ic and use_fms2 checks in save_restart to fix error with invalid memory reference in the MOM.F90 call to save_restart-write_initial_conditions
…ing the use_fms2 and write_ic flags if present to avoid invalid memory reference error added str_len argument to register_variable_attribute calls added support to for rotated fields to write_initial_conditions and save_restart_fms2 removed whitespace
removed use_fms2 optional arguments in save_restart, restore_state, and create_file made use_fms2 a MOM_restart module variable Update MOM_state_initialization.F90 Remove space. Update MOM_ice_shelf.F90 Add space. Update MOM_driver.F90 Add space Update mom_surface_forcing_mct.F90 remove whitespace Update ocean_model_MOM.F90 Add space Update mom_ocean_model_nuopc.F90 Add space Update MOM_surface_forcing.F90 Add space Changes needed work ESM4 to run with new io
Corrected three module use statements in infra/FMS1 to eliminate any dependencies of code in config_src/infra/FMS1 on code in src/framework. These use statements eventually point to the same place as before, but with less indirection. This change should facilitate later steps to compile everything in and under the config_src/infra directories as libraries. All answers are bitwise identical.
Duplicated all of the modules in infra/FMS1 into new copies in infra/FMS2, in preparation for merging in the FMS2 i/o changes to the new infra/FMS2 directory. All answers are bitwise identical, regardless of which config_src/infra directory is used.
Added code to explicitly set a (1x1) io_domain when no other io_layout is specified, complying with changing requirements for 2020 and later versions of FMS, and following the default behavior of previous versions. All answers are bitwise identical.
…om/wrongkindofdoctor/MOM6 into FMS2_io Merged in PR mom-ocean#1165, "Add fms2-io to MOM restart interfaces", but with modifications to move the new files to config_src/infra/FMS2, where they belong, and to avoid inappropriate changes to code in the src/framework directory. All existing tests are passing with config_src/infra/FMS1, but the new changes require that the version of FMS used with config_src/infra/FMS2 to at least 2020.03, and this disables all of our AM2-based coupled test cases (due to the deliberate decision from the GFDL Modeling Systems group to drop support for this older atmospheric model). Although the new code reproduces the previous answers in ocean_only and ice_ocean_SIS2 test cases with the intel and gnu compilers, with the pgi (19.10.0) compiler there are fatal errors in all ice_ocean_SIS2 cases and in ocean_only cases driven by data override. The last version of FMS where the pgi compiler works in all cases is 2019.01. The problem in some ocean_only cases appears to be related to the use of FMS2 i/o calls in the data_override routines. With the ice_ocean_SIS2 cases, the error message in with the pgi compiler is "mpp_broadcast_text: broadcasting from invalid PE.". (Note that with the newer versions of FMS (2020.03 and later), OM_1deg requires that the namelist file for data_override_nml has the added line {reproduce_null_char_bug = .true.} to reproduce the previous answers, but it is a fatal error to add this setting with FMS versions before 2020.03.)
Eliminated scale_data from MOM_read_data_fms2, as it was duplicative of rescale_comp_data from MOM_domain_infra.F90. Also eliminated the optional scale argument from the fms2 write_field routines, because this scaling is already handled in the framework/MOM_io.F90 routines, and because the way the scaling was implemented with a pointer to defeat the intent(in) of the data array to the write routines was a deviously terrible idea that would cause endless problems. Because the mpp_domain in the MOM_domain_types have been modified to always have an io_domain set, the test and calls setting an io_domain in all of the fms2 read_data and fms2 write_data routines. In addition, there is no longer a need for a routine to read specifically from the supergrid, so the fms2 MOM_read_data_2d_supergrid routine was eliminated. The code compiles with these changes, but none of this fms2 I/O code is exercised yet in MOM6, so of course all answers are bitwise identical.
Replaced the two optional arguments xPosition and yPosition to the two routines wrapped by the interface MOM_register_variable_axes in MOM_axis.F90 with a single optional argument, position. Also dramatically refactored the code in read_data_fms2.F90 to eliminate unused variants and adding more granular subroutines to dramatically reduce duplicative code, eliminating several (unexercised) bugs in the process; that file went from 1441 lines long to 924. The code compiles with these changes, but none of this fms2 I/O code is exercised yet in MOM6, so of course all answers are bitwise identical.
Cleaned up MOM_restart.F90 in the wake of the recent merge of FMS2 I/O related changes into MOM6. The changes include calling the recently added functions get_variable_byte_size and get_num_restart_files, and revising the names of several variables in open_restart_units and the order in which the count of files is incremented for greater clarity. There are also a number of duplicative comments that were removed while others were reformatted. All answers and output are bitwise identical.
Added the option to use FMS2 interfaces to read variables in the FMS2 version of MOM_io_infra.F90. For now, this is controlled by a hard-coded module variable, FMS2_reads, in MOM_io.F90. Also extensively revised MOM_read_fms2.F90 to add the new public subroutine prepare_to_read_var that is used from MOM_io_infra.F90, to systematically determine the directions that axes in files using the cartesian_axis attribute before resorting to using the axis names or units. All of the subroutines from MOM_read_fms2.F90 whose functionality has been merged into MOM_io_infra.F90 have now been removed. All answers are bitwise identical and reproduce the FMS1 test cases, but there is a new publicly visible routine.
Modified the routines that write out the checksums of various types related to the surface ocean state so that only the root PE writes the checksums. The modified routines are ocn_ice_bnd_type_chksum and ocean_public_type_chksum in config_src/infra/FMS_cap. The analogous routines with the nuopc_cap and mct_cap have not been modified; although doing so would be a very good idea, it should be done by someone who is actively testing them. In some large-PE tests cases this reduces the volume of output to stdout by over 90% without any loss of information. All solutions are bitwise identical, but there may be minor white-space reformatting of the output in some cases.
Use axistype for MOM_interp_infra directly from mpp_io_mod and add a copy of get_axis_data to both copies of infra/FMS[12]/MOM_interp_infra.F90, and then use these in framework/MOM_horizontal_regridding.F90, to permit the MOM6 I/O calls to use the FMS2 interfaces without simultaneously requiring changes to the horizontal interpolation code. All answers are bitwise identical, but there are changes to the interfaces offered by a public module.
Added a new optional logical argument to write_metadata_axis to indicate when an axis is staggered at the edges of the tracer grid, and changed calls to get_file_info to stop requesting the number of global attributes. Also eliminated some unused optional arguments to the FMS1 version of write_metadata field. All answers are bitwise identical, but there are minor changes to some I/O related interfaces.
Corrected the logic of a warning message in categorize_axis by adding parentheses. All answers are bitwise identical, and spurious warnings are no longer being issued.
Added a large number of calls to handle all of the writes via the FMS2 interfaces to infra/FMS2/MOM_io_infra.F90. There are newly defined private types in MOM_io_infra to wrap the axistype and fieldtype that had previously been offered from mpp_io_mod. All answers are bitwise identical and it has been verified that output files do not change and the restarts are still working.
update halo and allow sponge_uv to not be on grid
Modified optional arguments in 4 modules to reflect their actual usage. 1. Eliminated the optional argument full_prec to zonal_flux_adjust and meridional_flux_adjust, which were always called with the hard-coded value "true", and made the optional arguments monotonic and simple_2nd to PPM_reconstruction_[xy] mandatory. 2. Eliminated the optional argument eta_bt to calculate_diagnostic_fields, which was never present. 3. Made the two optional arguments to unit_scaling_init mandatory. 4. Eliminated the optional do_i argument to F_to_ent, which was never present in calls, and made the parameter just_read_params to entrain_diffusive_init mandatory. All answers are bitwise identical.
* Minor changes to topography initialized from files This is intended to extend the compatibility with negative topography. 1. A bug that occurs when clipping topography with a negative MINIMUM_DEPTH is fixed. 2. MASKING_DEPTH can now be negative. 3. A warning will be given if MASKING_DEPTH is set to be smaller than MINIMUM_DEPTH. * Adding an exception to avoid answer changes To keep answer unchnaged in the test cases (at land points), D is clipped at 0.5*min_depth when min_depth > 0. * Change the if-statement on whether MASK_DEPTH is default to a simple comparison * Change the if-statement on whether MASK_DEPTH is default * Change the if-statement comparison on MASK_DEPTH Reverted back to a simple comparison. A mistake in a previous commit in MOM_grid_initialize.F90 is corrected. Co-authored-by: Robert Hallberg <[email protected]>
- Reduce entries in .gitlab-ci.yml to mostly just one line by invoking scripts in MOM6-examples - This undoes early direction of moving detailed control into the pipeline yaml - todo: define a library build process from within each child repository
(+)Modified some optional arguments
Update gitlab pipeline to use scripts from MOM6-examples
Added a new routine, query_wave_properties, that can be call to get information about the wave properties from the waves control structure, and added a get_param call for SURFBAND_WAVENUMBERS to MOM_wave_interface_init when it is using the options that are typical with NUOPC coupler. These changes should allow the NUOPC coupler to compile and work again, while still keeping the same level of opacity in the wave_parameters_CS. All answers should be bitwise identical, although the order of some entries in the MOM_parameter_doc files may change when coupled with waves is WAVE_METHOD=SURFACE_BANDS and SURFBAND_SOURCE=COUPLER.
Moved the recently added call to read SURFBAND_WAVENUMBERS into an array when SURFBAND_SOURCE=COUPLER down by a line to follow the allocate call for that array. This change should avert a memory access problem that would otherwise arise when exercising this newly added code. All answers are bitwise identical in any case that ran with the previous version, and they should reproduce answers from before this PR as a whole, although obviously this code is not as well tested as would be ideal, based on the fact that this bug was in the last commit, which also passed testing.
Added the new routine query_ocean_state to mom_ocean_model_nuopc to allow for the wave properties to be obtained by the mom_cap without having to rely on the elements of an otherwise opaque type being public. I believe that all elements of the ocean_state_type could now be declared as private, and that the version of MOM6 with the NUOPC coupler should now work as intended.
…nment fix dim_names assignment in MOM_io:read_var_sizes
+Add query_wave_properties & fix NUOPC wave queries
…-0708 initialize CS%WaveNum_Cen before read in this parameter in MOM_wave_interface.F90
…ate-2021-07-08 Dev gfdl main candidate 2021 07 08
…20210723 merge GFDL 20210723 main branch (hash # b629e8d)
DeniseWorthen
approved these changes
Jul 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve; but need to resolve FMS2 failure under GNU.
will work with GFDL on FMS2 code issue in a separate PR |
11 tasks
jiandewang
pushed a commit
to jiandewang/MOM6
that referenced
this pull request
Apr 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GFDL updated its main branch on 20210723, need to make corresponding updating in EMC repository. See issue #70