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

Add nuopc cap #44

Merged
merged 63 commits into from
Nov 30, 2020
Merged

Add nuopc cap #44

merged 63 commits into from
Nov 30, 2020

Conversation

billsacks
Copy link
Member

Opening this on behalf of @mvertens . I'll review it and then bring it to master.

@whlipscomb
Copy link
Contributor

@jedwards4b - If we resolved the issue of CISM components writing to stdout, would that make it unnecessary to change the default setting? I do, in fact, often use this setting. I just submitted a paper, which means I now have some time to work on deferred CISM maintenance, in coordination with @billsacks.

Mariana isn't sure why she removed these conditionals.
This module was duplicated between mct and nuopc.
This points to a commit that fixes the run sequence for I compsets.
@whlipscomb
Copy link
Contributor

@billsacks - I wanted to follow up on the question I asked last week:

If we resolved the issue of CISM components writing to stdout, would that make it unnecessary to change the default setting?

I'm happy to update the write statements in Glissade. I'd just like to be clear on the required changes, and was wondering if I should fold these CISM changes into my work on multiple instances.

@billsacks
Copy link
Member Author

@whlipscomb I'm not entirely sure what @jedwards4b wanted, but based on ESCOMP/CISM#32, I'm thinking:

(1) As @jedwards4b said, print * should be replaced with write(stdout, *). I think that, in a CESM run, this leads to messages appearing in different files depending on whether they are written by the master task or a different task.

(2) If you notice any writes that are done on all tasks but really just need to be done on master – or not at all – then changing the code appropriately.

If these changes are extensive, then it could be better to put them in a different PR, though if you prefer to put them in the same PR that's okay, but I'd suggest at least doing them in separate commits to aid reviewability of the PR.

@jedwards4b
Copy link
Contributor

Thank you for addressing this issue. Note that item (2) of Bill's message can be accomplished by simply changing the default log level. We should really try to avoid output from all processors whenever possible.

@whlipscomb
Copy link
Contributor

Thanks, @billsacks and @jedwards4b, I can work on this in the next couple of weeks. Besides fixing print statements, I'll try to avoid writing output from more than one processor.

This will be less prone to subtle errors in case of typos. See
ESCOMP/CTSM#1083 for detailed thoughts.
@@ -189,7 +190,7 @@ subroutine glc_initialize(EClock)
paramfile = 'unknown_paramfile'

if (my_task == master_task) then
open (nml_in, file=nml_filename, status='old',iostat=nml_error)
open (newunit=nml_in, file=nml_filename, status='old',iostat=nml_error)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a Fortran 2008 feature, but @mvertens feels it is well supported by the major compilers at this point, and it has been exercised heavily in cmeps testing.

Mariana Vertenstein and others added 2 commits November 24, 2020 13:05
I am removing this todo:

   TODO (mvertens, 2018-11-28): Determine if land is present as a sanity check - do we need this?

If I remember correctly, I only added that sanity check because E3SM
introduced the ability for GLC to be run with SLND with MCT (CPL7), and
I wanted to make sure CISM wasn't accidentally used in that
configuration.
Copy link
Member Author

@billsacks billsacks left a comment

Choose a reason for hiding this comment

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

@mvertens please see a couple of questions below about whether we should be doing some consistency checks

Comment on lines 509 to 511
! write(6,102) abs(mesh_lons(n) - lons_vec(n))
!102 format('ERROR: CISM lon diff = ',f20.10,' is too large')
!call shr_sys_abort()
Copy link
Member Author

@billsacks billsacks Nov 24, 2020

Choose a reason for hiding this comment

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

  • @mvertens - is there a reason that the aborts are commented out for the various checks here – on lons, lats & areas? Maybe we don't want to compare areas, but should we at least be comparing lats and lons? It seems like either we should uncomment these commented lines or stop comparing lats & lons at all.

Comment on lines 448 to 451
! elemAreaArray = ESMF_ArrayCreate(DistGrid, mesh_areas, rc=rc)
! if (ChkErr(rc,__LINE__,u_FILE_u)) return
! call ESMF_MeshGet(Emesh, elemAreaArray=elemAreaArray, rc=rc)
! if (ChkErr(rc,__LINE__,u_FILE_u)) return
Copy link
Member Author

@billsacks billsacks Nov 24, 2020

Choose a reason for hiding this comment

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

  • @mvertens - should we remove this commented-out code, or will you be making use of it soon?

@mvertens
Copy link
Contributor

mvertens commented Nov 24, 2020 via email

Mariana Vertenstein says these error checks for consistency between
internal and mesh lats & lons should probably be active.
These fix build issues
Resolved Conflicts:
	drivers/cpl/nuopc/glc_comp_nuopc.F90
	drivers/cpl/nuopc/glc_import_export.F90
This includes Mariana's fixes to SMB renormalization
Resolved Conflicts:
	Externals.cfg
List the various lines in a consistent order, and use the long hash
This duplicates all tests EXCEPT:
- CISM1 (G1 in compset alias)
- izumi
According to Jim Edwards, NCK tests are not expected to work with nuopc,
and indeed I found that there were roundoff-level differences between
the single and multi-instance versions of that test (maybe due to a
difference in number of processors?). Jim Edwards suggested changing
this to MCC, so I have done this here; this MCC test passes.
This test fails, but I don't think it's very important: I don't think
this is a configuration that will actually be run for scientific
purposes. I have used it for testing purposes to test the noevolve
logic, but I don't think it's very important for that: we can test this
via an I compset. (And in any case, noevolve will be a less important
configuration once we have a data glc model to serve that purpose.)
See ESCOMP/CMEPS#142 for more comments.
These tests die with the error:

  * FATAL ERROR : (glad_main.F90:650)  Valid_inputs cannot be .false. if trying
 to do a mass balance time step

I think this is a known limitation of CMEPS right now, but I will open
an issue to track this - and then to reinstate these tests when the
issue is fixed.
@billsacks billsacks merged commit a66c96a into master Nov 30, 2020
@billsacks billsacks deleted the nuopc_cap branch November 30, 2020 20:13
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.

4 participants