-
Notifications
You must be signed in to change notification settings - Fork 171
part of cam6_3_008: Replace serial reads with infld calls. #241
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
Conversation
src/physics/cam/nudging.F90
Outdated
| call cam_pio_openfile(fileID,trim(anal_file),0) | ||
| call pio_seterrorhandling(fileID,PIO_BCAST_ERROR ) | ||
| call pio_seterrorhandling(fileID,PIO_INTERNAL_ERROR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the error handling calls back to back? Internal error is the default, and normally you'd change that to broadcast error while you do checks that may fail, and later switch back to the default. This code doesn't seem to be doing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the code in metdata.F90 as a guide for my modifications. There were originally a couple of pio_inq_var() calls between them in the section of code I was referencing. The pio_inq calls were not relevant for my usage, but because I am not familiar with the PIO error handling functionality, I thought it best to include both of the pio_seterrorhandling() calls. Since they do nothing, they can certainly be removed.
|
Murphy ensures that whenever you select some code as a guide, you will select the worst possible example :-) and this at the end of your routine. This will reset the error handling back to whatever it was which is important if your routine is called from a region that has already changed the default PIO error handling method. |
nusbaume
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me, beyond the seterrorhandling issue found previously. However, I do have a few concerns which I would like to see addressed, if possible. Thanks!
src/physics/cam/nudging.F90
Outdated
| endif | ||
| grid_id = cam_grid_id('physgrid') | ||
| call cam_grid_get_dim_names(grid_id,dim1name,dim2name) | ||
| ! if(masterproc) write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all of the commented out if(masterproc) write... statements here and below, I would recommend either un-commenting or deleting them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another technique is to define a debug private logical symbol at module scope which you can set to .true. when you want these messages.
| ! if(masterproc) write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name | |
| if(masterproc .and. debug) then | |
| write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name | |
| end if |
gold2718
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly supporting previous change requests (just added a suggestion).
src/physics/cam/nudging.F90
Outdated
| endif | ||
| grid_id = cam_grid_id('physgrid') | ||
| call cam_grid_get_dim_names(grid_id,dim1name,dim2name) | ||
| ! if(masterproc) write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another technique is to define a debug private logical symbol at module scope which you can set to .true. when you want these messages.
| ! if(masterproc) write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name | |
| if(masterproc .and. debug) then | |
| write(iulog,*)'PIO: DIM1NAME=',dim1name,' DIM2NAME=',dim2name | |
| end if |
|
What issue does this PR fix? Does this address scalability issues? |
src/physics/cam/nudging.F90
Outdated
| call mpibcast(Nudge_File_Present, Nudge_NumObs, mpilog, 0, mpicom) | ||
| call mpibcast(Nudge_ObsInd , Nudge_NumObs, mpiint, 0, mpicom) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mpi_bcast (without ifdef SPMD) be used rather than mpibcast?
#237, thanks for noticing, I updated the description. |
|
Are we expecting this regression test to be restored. I am hoping someone checks that it is bit-for-bit compared to cam6_3_006. FAIL ERP_Ln9.ne30_ne30_mg17.FCnudged.cheyenne_intel.cam-outfrq9s RUN time=39 |
Yes, I will make sure of that. |
nusbaume
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just one typo in all the new endrun calls.
src/physics/cam/nudging.F90
Outdated
| if(VARflag) then | ||
| Nobs_U(:,:,begchunk:endchunk,Nudge_ObsInd(1)) = Tmp3D(:,:,begchunk:endchunk) | ||
| else | ||
| call endrun('Varibale "U" is missing in '//trim(anal_file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelled variable in the endrun calls here and below.
|
From around line 772:
Is this still true? Should it work with MPAS and/or FV3? |
|
The module originally needed different interfaces to read in the data for |
Fix remaining PR issues in nudging.F90 Update ChangeLog
|
The changes from this PR were merged to cam_development as part of cam6_3_008 (#310). |
This is an incremental revision to the nudging.F90 module which replaces serial reads with infld() calls so that PIO is used to read values on known model grids from an open netcdf file. This update does not address the need for in-line horizontal/vertical interpolations.
Fixes #237