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

new multiple ice sheet functionality #140

Merged
merged 14 commits into from
Dec 1, 2020
Merged

new multiple ice sheet functionality #140

merged 14 commits into from
Dec 1, 2020

Conversation

mvertens
Copy link
Collaborator

@mvertens mvertens commented Nov 30, 2020

Description of changes

Permit GLC (CISM, XGLC) to send multiple ice sheets on different meshes

Specific notes

This PR does the following:

  1. Adds new capability to CISM and CMEPS in order for CISM to send multiple ice sheet data on different meshes to the mediator.
  2. Simplifies the addmrg call in esmFldsExchange_cesm.F90, esmFldsExchange_nems.F90 and esmFldsExchange_hafs.F90 so that the integer index is not longer in the merge calls. This was needed due to the addition of new ice sheet functionality - but should have been this way from the beginning.
    As an example for nems:
old:  
call addmrg(fldListTo(compatm)%flds, trim(fldname), mrg_from1=compice, mrg_fld1=trim(fldname), mrg_type1='copy')
new: 
call addmrg(fldListTo(compatm)%flds, trim(fldname), mrg_from=compice, mrg_fld=trim(fldname), mrg_type='copy')

As an example for cesm:

old:
call addmrg(fldListTo(compatm)%flds , 'Sx_'//trim(suffix(n)), &
       mrg_from1=complnd, mrg_fld1='Sl_'//trim(suffix(n)), mrg_type1='merge', mrg_fracname1='lfrac', &
       mrg_from2=compice, mrg_fld2='Si_'//trim(suffix(n)), mrg_type2='merge', mrg_fracname2='ifrac', &
       mrg_from3=compmed, mrg_fld3='So_'//trim(suffix(n)), mrg_type3='merge', mrg_fracname3='ofrac')
new:
call addmrg(fldListTo(compatm)%flds , 'Sx_'//trim(suffix(n)), &
        mrg_from=complnd, mrg_fld='Sl_'//trim(suffix(n)), mrg_type='merge', mrg_fracname='lfrac')
call addmrg(fldListTo(compatm)%flds , 'Sx_'//trim(suffix(n)), &
        mrg_from=compice, mrg_fld='Si_'//trim(suffix(n)), mrg_type='merge', mrg_fracname='ifrac')
call addmrg(fldListTo(compatm)%flds , 'Sx_'//trim(suffix(n)), &
         mrg_from=compmed, mrg_fld='So_'//trim(suffix(n)), mrg_type='merge', mrg_fracname='ofrac')
  1. Based on feedback from @billsacks - new wrappers were added to getting pointer data for a field in an ESMF field bundle and ESMF field.
    The new wrapper has the following syntax:
old:
call ESMF_FieldBundleGet(is_local%wrap%FBImp(complnd,complnd) , fieldname='Sl_lfrin', field=lfield, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_FieldGet(lfield, farrayPtr=Sl_lfrin,  rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
new:
call fldbun_getdata1d(is_local%wrap%FBImp(complnd,complnd) , 'Sl_lfrin', Sl_lfrin, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
  1. This PR needed new branches to be created for cime and cism. These are contained in the nuopc_dev hash below - but separate PRs willneed to be done to bring these to master.

Contributors other than yourself, if any:

CMEPS Issues Fixed (include github issue #):
Resolves #131

Are changes expected to change answers?

  • bit for bit
  • different at roundoff level
  • more substantial

Any User Interface Changes (namelist or namelist defaults changes)?

  • Yes
  • No

Testing performed if application target is CESM:(either UFS-S2S or CESM testing is required):

  • (required) CIME_DRIVER=nuopc scripts_regression_tests.py
    • machines:
    • details (e.g. failed tests):
  • (required) CESM testlist_drv.xml
    • machines and compilers: cheyenne/intel
    • details (e.g. failed tests): compared to nuopc_dev hash db0d278 (cmeps baseline nov24newtests) and generated new baselines nov28. All tests were bfb except 1 roundoff level field in the X compset tests.
  • (optional) CESM prealpha test
    • machines and compilers
    • details (e.g. failed tests):

Testing performed if application target is UFS-S2S:

  • (required) UFS-S2S testing
    • description: verified that all RTs pass for ufs-model (fe5a943) substituting this branch for CMEPS.
    • details (e.g. failed tests):

Hashes used for testing:

  • CESM:
  • UFS-S2S, then umbrella repostiory to check out and associated hash:
    • repository to check out:
    • branch: fe5a943
    • hash:

@mvertens
Copy link
Collaborator Author

@DeniseWorthen @uturuncoglu - can you both please verify as part of the code review that the changes here will not effect nems or hafs. Thanks!

Copy link
Collaborator

@DeniseWorthen DeniseWorthen left a comment

Choose a reason for hiding this comment

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

I have verified that all RTs pass for ufs-model (fe5a943) substituting this branch for CMEPS.

mediator/esmFlds.F90 Show resolved Hide resolved
mediator/esmFldsExchange_cesm_mod.F90 Show resolved Hide resolved
mediator/esmFldsExchange_cesm_mod.F90 Show resolved Hide resolved
@uturuncoglu
Copy link
Collaborator

@mvertens i am testing with HAFs now. I'll let you know soon.

@mvertens
Copy link
Collaborator Author

@DeniseWorthen - thanks so much for verifying this so quickly!!!!

@mvertens
Copy link
Collaborator Author

@DeniseWorthen - what repository did you use for the s2s testing - so that I can fill this in the PR.

@mvertens
Copy link
Collaborator Author

@uturuncoglu - thanks for the quick response.

@uturuncoglu
Copy link
Collaborator

@jedwards4b i am getting following error when I try to build the HAFS model with data components

/work/noaa/nems/tufuk/apps/HAFS_docn/sorc/hafs_forecast.fd/CDEPS/streams/dshr_strdata_mod.F90(35): error #6580: Name in only-list does not exist or is not accessible.   [PIO_SHORT]
  use pio              , only : PIO_BCAST_ERROR, PIO_RETURN_ERROR, PIO_NOERR, PIO_INTERNAL_ERROR, PIO_SHORT
--------------------------------------------------------------------------------------------------^
/work/noaa/nems/tufuk/apps/HAFS_docn/sorc/hafs_forecast.fd/CDEPS/streams/dshr_strdata_mod.F90(1408): error #6404: This name does not have a type, and must have an explicit type.   [PIO_SHORT]
          else if(pio_iovartype == PIO_SHORT .and. .not. allocated(data_short2d)) then
-----------------------------------^
/work/noaa/nems/tufuk/apps/HAFS_docn/sorc/hafs_forecast.fd/CDEPS/streams/dshr_strdata_mod.F90(1438): error #6284: There is no matching specific function for this generic function reference.   [PIO_GET_ATT]
          rcode = pio_get_att(pioid, varid, "_FillValue", fillvalue_i2)

I check the commit history and internal PIO update (feature/hafs_cdeps) was already merged with master. At least, it shown like that

https://github.com/ESCOMP/CMEPS/tree/feature/hafs_cdeps

but there is no "merged" sign if you look at the list of branches. I am not sure why I am getting error related with PIO_SHORT. @jedwards4b Do you have any idea? Maybe it is not merged.

@uturuncoglu
Copy link
Collaborator

@jedwards4b it seems feature/hafs_cdeps is old and not used branch and we merged feature/hafs_cdeps_fixed with #121 to update PIO

@uturuncoglu
Copy link
Collaborator

@jedwards4b it seems that PIO shipped with master is not updated version.I think following PR revert all PIO changes back https://github.com/ESCOMP/CMEPS/pull/122/files

@DeniseWorthen
Copy link
Collaborator

@mvertens I tested in my ufs-weather fork @ develop; hash fe5a943 but with CMEPS replaced w/ your branch

@uturuncoglu
Copy link
Collaborator

@mvertens @DeniseWorthen @rsdunlapiv @jedwards4b @danrosen25 I think that managing internal PIO shipped with CMEPS is creating lots of confusion and it is hard to maintain. Maybe we could define it as external dependency in HAFS application also like S2S. By this way, we could get rid of entire CMEPS/nems/lib directory (but I think we still need to have CMEPS/nems/util, please confirm @DeniseWorthen). Let me know what do you think? If it is okay for you I could approve this PR and work on it.

@DeniseWorthen
Copy link
Collaborator

@uturuncoglu We will still need nems/util but I agree removing pio makes sense.

integer, public, parameter :: comprof = 6
integer, public, parameter :: compwav = 7
integer, public, parameter :: compglc1 = 8
integer, public, parameter :: ncomps = 8
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this correct? Why number of components is still 8?

@mvertens
Copy link
Collaborator Author

mvertens commented Nov 30, 2020 via email

billsacks added a commit to ESCOMP/CISM-wrapper that referenced this pull request Dec 1, 2020
Point to Mariana Vertenstein's branch for
ESCOMP/CMEPS#140
@billsacks
Copy link
Member

This PR resolves #131 . I have edited the top-level PR description to note this so that #131 will auto-close.

@mvertens mvertens merged commit 492569c into master Dec 1, 2020
@mvertens mvertens deleted the mvertens/icesheets branch December 8, 2020 16:34
DeniseWorthen added a commit to NOAA-EMC/CMEPS that referenced this pull request Jan 11, 2021
* adds multiple ice sheet functionality (ESCOMP#140)
* adds post phases for performance enhancement (ESCOMP#146)
* adds ocn->glc (land ice) coupling at multiple levels (ESCOMP#148)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple glc components - multiple ice sheets
5 participants