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

Fix Field Utils #2530

Closed
tclune opened this issue Jan 16, 2024 · 3 comments
Closed

Fix Field Utils #2530

tclune opened this issue Jan 16, 2024 · 3 comments
Assignees
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. ❗ High Priority This is a high priority PR 🛠️ Refactor This is code refactoring ❄️ Stale This issue has been marked stale

Comments

@tclune
Copy link
Collaborator

tclune commented Jan 16, 2024

  1. field_utils_setup.F90 contains the inappropriate block of code down below. It appears to be related to testing and thus should be in the test directory.
  2. The tests require 4 pe's but there is nothing in the tests to indicate this. Yes, the CMake file takes care of that, but the tests should also explicitly request the right number of pes. @test(npes=4) instead of just @test.
  integer :: i                                                                            |
   type(ESMF_Index_Flag), parameter :: INDEX_FLAG_DEFAULT = ESMF_INDEX_DELOCAL             |      allocate(y4array, source=R4_ARRAY_DEFAULT)
   integer, parameter :: REG_DECOMP_DEFAULT(*) = [2, 2]                                    |      allocate(y8array, source=R8_ARRAY_DEFAULT)
   integer, parameter :: MAX_INDEX_DEFAULT(*) = [4, 4]                                     |      y4array = y4array + ADD_R4
   integer, parameter :: MIN_INDEX_DEFAULT(*) = [1, 1]                                     |      y8array = y8array + ADD_R8
   integer, parameter :: DIMR4_DEFAULT(*) = [4, 4]                                         |      XR4 = mk_field(R4_ARRAY_DEFAULT, regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEF\
   integer, parameter :: DIMR8_DEFAULT(*) = [4, 4]                                         |AULT, maxIndex=MAX_INDEX_DEFAULT, &
   integer, parameter :: SIZE_R4 = 16                                                      |         indexflag=INDEX_FLAG_DEFAULT, name = 'XR4', _RC)
   integer, parameter :: SIZE_R8 = 16                                                      |      YR4 = mk_field(y4array, regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEFAULT, max\
   real, parameter :: undef = 42.0                                                         |Index=MAX_INDEX_DEFAULT, &
                                                                                           |         indexflag=INDEX_FLAG_DEFAULT, name = 'YR4', _RC)
   real(kind=ESMF_KIND_R4), parameter :: R4_ARRAY_DEFAULT(*,*) = reshape([(i, i = 1, SIZE_\|      XR8 = mk_field(R8_ARRAY_DEFAULT, regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEF\
R4)], DIMR4_DEFAULT)                                                                       |AULT, maxIndex=MAX_INDEX_DEFAULT, &
   real(kind=ESMF_KIND_R8), parameter :: R8_ARRAY_DEFAULT(*,*) = reshape([(i, i = 1, SIZE_\|         indexflag=INDEX_FLAG_DEFAULT, name = 'XR8', _RC)
R8)], DIMR8_DEFAULT)                                                                       |      YR8 = mk_field(y8array, regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEFAULT, max\
                                                                                           |Index=MAX_INDEX_DEFAULT, &
   type(ESMF_Field) :: XR4                                                                 |         indexflag=INDEX_FLAG_DEFAULT, name = 'YR8', _RC)
   type(ESMF_Field) :: XR8                                                                 |      XR4_3D = mk_field_r4_ungrid(regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEFAULT,\
   type(ESMF_Field) :: YR4                                                                 | maxIndex=MAX_INDEX_DEFAULT, &
   type(ESMF_Field) :: YR8                                                                 |         indexflag=INDEX_FLAG_DEFAULT, name = 'XR4_3D', ungriddedLBound=[1],ungriddedUBound\
   type(ESMF_Field) :: XR4_3D                                                              |=[3],_RC)
   type(ESMF_Field) :: XR8_3D                                                              |      YR4_3D = mk_field_r4_ungrid(regDecomp=REG_DECOMP_DEFAULT, minIndex=MIN_INDEX_DEFAULT,\
   type(ESMF_Field) :: YR4_3D                                                              | maxIndex=MAX_INDEX_DEFAULT, &
   type(ESMF_Field) :: YR8_3D                                                              |         indexflag=INDEX_FLAG_DEFAULT, name = 'YR4_3D',ungriddedLBound=[1],ungriddedUBound=\
@tclune tclune added 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🛠️ Refactor This is code refactoring ❗ High Priority This is a high priority PR labels Jan 16, 2024
@darianboggs
Copy link
Contributor

Currently, field_utils_setup.F90 is in field_utils/tests. So I will work on the pe issue.

Copy link

stale bot commented Mar 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue.

@stale stale bot added the ❄️ Stale This issue has been marked stale label Mar 19, 2024
@mathomp4
Copy link
Member

I think this was closed by #2538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. ❗ High Priority This is a high priority PR 🛠️ Refactor This is code refactoring ❄️ Stale This issue has been marked stale
Projects
None yet
Development

No branches or pull requests

3 participants