Skip to content

Correct comments describing generic_tracer args#44

Merged
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:generic_tracer_comments
Dec 24, 2021
Merged

Correct comments describing generic_tracer args#44
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:generic_tracer_comments

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Corrected uninformative comments describing the some of the arguments to the
stub routines in config_src/external/GFDL_ocean_BGC/generic_tracer.F90. The
updated comments are consistent with how they are used in calls to these
routines and with the underlying actual generic_tracer code if they are actually
documented there. The previous comments had been added to existing undocumented
code to satisfy the MOM6 requirement that there be a doxygen comment describing
every argument to every routine, in the hopes that someone with familiarity with
the generic tracer could work amend them to something more appropriate.
However, "Unknown" is neither an accurate nor an informative description, and
current MOM6 standards would demand that we reject any new code contributions
with such poor interface documentation. All answers are bitwise identical, and
only comments have changed.

  Corrected uninformative comments describing the some of the arguments to the
stub routines in config_src/external/GFDL_ocean_BGC/generic_tracer.F90.  The
updated comments are consistent with how they are used in calls to these
routines and with the underlying actual generic_tracer code if they are actually
documented there.  The previous comments had been added to existing undocumented
code to satisfy the MOM6 requirement that there be a doxygen comment describing
every argument to every routine, in the hopes that someone with familiarity with
the generic tracer could work amend them to something more appropriate.
However, "Unknown" is neither an accurate nor an informative description, and
current MOM6 standards would demand that we reject any new code contributions
with such poor interface documentation.  All answers are bitwise identical, and
only comments have changed.
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 16, 2021

Codecov Report

Merging #44 (030618b) into dev/gfdl (f865b24) will not change coverage.
The diff coverage is n/a.

❗ Current head 030618b differs from pull request most recent head 2f9c17c. Consider uploading reports for the commit 2f9c17c to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##           dev/gfdl      #44   +/-   ##
=========================================
  Coverage     28.96%   28.96%           
=========================================
  Files           242      242           
  Lines         71324    71324           
=========================================
  Hits          20660    20660           
  Misses        50664    50664           
Impacted Files Coverage Δ
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f865b24...2f9c17c. Read the comment docs.

@marshallward
Copy link
Copy Markdown
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/14421 ✔️

@marshallward marshallward merged commit b628748 into NOAA-GFDL:dev/gfdl Dec 24, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the generic_tracer_comments branch January 3, 2022 13:34
@Hallberg-NOAA Hallberg-NOAA added the documentation Improvements or additions to documentation label Feb 1, 2022
uwagura pushed a commit to uwagura/MOM6 that referenced this pull request Nov 4, 2025
* Vertvisc: First part of loop

Moving gradually

* add nvtx ranges and module warpper

* port loop to openmp for now -> will move to do concurrent. Focused on porting to GPU now

* more gpu

* port the vertical velocity to GPUs

* port the following vertical velocity loops to GPUs

* more loops using omp target teams, validated

* fix compute sanitizer death

* meridional velcoity component ported

* finish porting vertvisc

* offload another loop

* revert the last thing

* add collapse(2) to the expensive loops

* fix

* fix validation

* updates to porting: find coupling coef

* almost done, just missingt he killer loop

* lable the block of death

* duct taped version of all funcs ported to GPUs

* back to format and delete block constructs

* remove the maps ins remnant yay!

* remove need for local vertvisc_u/v variables

* death loop of death has been ported

* vertvisc coef does not have explicit mappings anymore

* the maps are gone!

* limit vel using single data transfer

* do concurrent

* some memory cleanup and code cleanup - profiling time

* update and lots of nvtx markers for opt

* limit vel betterments and notes for optimization

* make limit vel good

* h_ml transfer

* Vertfrict: Move CS allocations to init

Allocations of the vert frictions and visc control structures were moved
from the dycore subroutine loops to the model initialization.

Redundant grid (G) transfers were removed (although they were not
triggering any transfers).

Most (but not all) visc arrays have also been moved into the
initialization.  Kv_shear and Ray_[uv] need to be added.

Trailing whitespace also (inadvertently) got removed, hopefully not a
distraction.

* coupling coeff fixes

This appears to improve the CPU/GPU repro of the latest merge of dev/gpu
into dev_gpu_vertvisc.

* Resolves some of the u/v/h/dz field states between the barotropic and
  vertvisc functions.  (Development of each assumed that the other was
  not complete).

* This seems to fix some issues with a_[uv], Kv_tot, and dz inside of
  find_coupling_coef and vertvisc coef

  * chksum transfers were added to ensure consistent

* The diff has moved to frhat[uv] in btcalc.  The fields are all zero on
  GPU, so they are probably not transferred.

Work in progress...

* Remove redundant BT_cont transfer

The BT_cont fields are now on GPU, so they don't need to be transferred
before the btcalc call.

Checksum transfers for h_ml were also added.  Still assuming that it's
computed on the CPU.

* delete nvtcx

* test to see if guarding and reintroducing the check helps

* an ugly fix for a simple problem: just want to be sure before I dive

* spaces

* Vertvisc: formatting/style cleanup

This patch reduces the formatting changes to this branch and brings it
closer to both dev/gfdl and the MOM6 style guide.

One minor non-cosmetic change is the reversion of ADp%dv_dt_str(i,J,1)
calculation into one of the main Thomas loop.  This returns it to a
separate loop.

* Vert friction: Explicit CS alloc in dycore init

This patch removes the NVIDIA compiler preprocessing and explicitly
compiles the `CS` in the dynamic core initilization.

`vertvisc_init` is no longer responsible for allocation.  The allocation
test has also been removed.  We just have to trust each other now (or
segfault when it refs an unallocated field).

The previous error in the CI was the absense of `CS` allocation in the
other timestep methods (unsplit, unsplit RK, split RK2b).

* Vert friction: Data transfer reduction

Several modifications to the data transfer statements

* Some redundant transfers were removed

* Input/output transfers were moved up to the dycore loop

* Vert friction: Cosmetic cleanup

Remove some redundant comments, and an unused array loop.

* Vert friction: nk_in_ml bugfix

---------

Co-authored-by: Marshall Ward <marshall.ward@noaa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants