forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+(*)Fix rotation of coupler_type variables
This commit adds the necessary information about the turns of the model grid relative to the (unrotated) coupler_type data fields that are inside of the forcing type and surface_state type and are used with passive tracers, so that certain tracer packages can now be used with rotated grids. The previous version had problems where the model would not run when ROTATE_INTEX = True and the CFCs (and probably other passive tracers) were being used, as noted at NOAA-GFDL/issues/621. These problems have now been fixed. There are new calls to coupler_type_spawn() in allocate_forcing_by_ref() and allocate_surface_state() that manage the creation of the coupler_2d_bt_types for unrotated types based on information from their rotated counterparts. There is a new optional turns arguments to allocate_forcing_by_ref() and new optional sfc_state_in and turns arguments to allocate_surface_state(), and these are now being used in at least 6 places where unrotated temporary surface_state or forcing types are being set up. There are also new optional turns argument to extract_coupler_type_data() and set_coupler_type_data() that are used to deal with the fact that the internal data arrays in the coupler_bc_types are never rotated, unlike the other MOM6 arrays, because they have to be passed directly into the generic tracer code. These new turns arguments are used in 14 calls from various tracer packages, including in 6 calls from the OCMIP2_CFC code. There are 4 new calls to deallocate_surface_state() or deallocate_forcing_type() that were added to avoid (presumably minor) memory leaks when grid rotation is enabled. These new calls are in initialize_ice_shelf_fluxes(), shelf_calc_flux() and in the surface flux diagnostics section of step_MOM(). All answers are bitwise identical in any cases that worked previously, but some cases with grid rotation that previously were failing with cryptic error messages are now running successfully. There are new optional arguments to several publicly visible routines
- Loading branch information
1 parent
6272bbc
commit 356f195
Showing
14 changed files
with
190 additions
and
72 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.