Skip to content
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 some CICE variable names to clarify grid #729

Merged
merged 4 commits into from
Jul 15, 2022

Conversation

apcraig
Copy link
Contributor

@apcraig apcraig commented Jun 28, 2022

PR checklist

  • Short (1 sentence) summary of your PR:
    Update some CICE variable names to clarify grid
  • Developer(s):
    apcraig
  • Suggest PR reviewers from list in the column to the right.
  • Please copy the PR test results link or provide a summary of testing completed below.
    All tests bit-for-bit, full test suites run on cheyenne, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#3079979f165ab96f73fb1b8e51d77bd027bce39e
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes
    • No
  • Does this PR add any new test cases?
    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)
    • Yes
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please provide any additional information or relevant details below:

Partly addresses several items in #660

-Rename several variables to make compatible with C-grid names,

  • strairxU, strairyU, strtltxU, strtltyU, strintxU, strintyU,
  • taubxU, taubyU, strocnxU, strocnyU, fmU, TbU,
  • waterxU, wateryU, forcexU, forceyU, aiU
  • Move iceumask, icenmask, iceemask from ice_flux to ice_grid
  • Make dyn_prep2, stepu, stepuv_CD, stepv_C, implicit_solver, and anderson_solver argument names a little more generic/specific
  • Inline boxslotcyl velocity calculation

apcraig added 2 commits June 26, 2022 05:21
  strairxU, strairyU, strtltxU, strtltyU, strintxU, strintyU,
  taubxU, taubyU, strocnxU, strocnyU, fmU, TbU,
  waterxU, wateryU, forcexU, forceyU, aiU
Move iceumask, icenmask, iceemask from ice_flux to ice_grid
Make dyn_prep2, stepu, stepuv_CD, stepv_C, implicit_solver, and
  anderson_soler argument names a little more generic/specific
Inline boxslotcyl velocity calculation
@DeniseWorthen
Copy link
Contributor

I wonder whether the mask names should be iceUmask etc?

@apcraig
Copy link
Contributor Author

apcraig commented Jun 28, 2022

iceUmask is a very reasonable suggestion. I decided to just leave it as is for now, but if others prefer iceUmask, iceTmask, iceEmask, iceNmask, I'm happy to make that change throughout.

Copy link
Contributor

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine to me, with a couple of suggestions.


integer (kind=int_kind), intent(in) :: &
nx_block, ny_block, & ! block dimensions
ilo,ihi,jlo,jhi ! beginning and end of physical domain

integer (kind=int_kind), intent(out) :: &
icellt , & ! no. of cells where icetmask = 1
icellu ! no. of cells where iceumask = 1
icellx ! no. of cells where icexmask = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably have simply left the x's out of all these generic variables to avoid confusion with variables that use x as a direction, although this approach is nicely parallel with the t values. Note these x's are not capitalized, while others elsewhere are.

@@ -173,8 +173,7 @@ module ice_grid
use_bathymetry, & ! flag for reading in bathymetry_file
pgl_global_ext ! flag for init primary grid lengths (global ext.)

logical (kind=log_kind), &
dimension (:,:,:), allocatable, public :: &
logical (kind=log_kind), dimension (:,:,:), allocatable, public :: &
tmask , & ! land/boundary mask, thickness (T-cell)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you're changing grid variable names, you might as well make them all consistent.

icenmask, & ! ice extent mask (N-cell)
iceemask ! ice extent mask (E-cell)

real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this column misaligned?

@apcraig
Copy link
Contributor Author

apcraig commented Jul 13, 2022

I updated the indentation and modified several more variables names in ice_dyn_shared to better indicate the grid by capitalizing the grid "letter". I also kept the "x", but generally made it "X". I am a little reluctant to change some of the primary model variable names (i.e. tmask to maskT or Tmask) without a bit more discussion/thought. I think this is ready for another review.

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terrific, thank you. Since Fortran doesn't recognize capitalization this shouldn't make any difference to the code, but it makes a huge improvement in readability for humans.

@apcraig apcraig merged commit d088bfb into CICE-Consortium:main Jul 15, 2022
dabail10 pushed a commit to ESCOMP/CICE that referenced this pull request Oct 4, 2022
* Rename several variables to make compatible with C-grid names,
  strairxU, strairyU, strtltxU, strtltyU, strintxU, strintyU,
  taubxU, taubyU, strocnxU, strocnyU, fmU, TbU,
  waterxU, wateryU, forcexU, forceyU, aiU
Move iceumask, icenmask, iceemask from ice_flux to ice_grid
Make dyn_prep2, stepu, stepuv_CD, stepv_C, implicit_solver, and
  anderson_soler argument names a little more generic/specific
Inline boxslotcyl velocity calculation

* remove boxslotcyl_data_vel

* update documentation

* Additional updates to change to upper case for some variable names
Fix indentations as noted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants