-
Notifications
You must be signed in to change notification settings - Fork 153
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
rrfs.v1.0.0 release branch update with GDIT's performance optimization #811
base: release/rrfs.v1.0.0
Are you sure you want to change the base?
rrfs.v1.0.0 release branch update with GDIT's performance optimization #811
Conversation
xcent=quarter*(xc(1,1)+xc(1,ny)+xc(nx,1)+xc(nx,ny)) | ||
ycent=quarter*(yc(1,1)+yc(1,ny)+yc(nx,1)+yc(nx,ny)) | ||
zcent=quarter*(zc(1,1)+zc(1,ny)+zc(nx,1)+zc(nx,ny)) | ||
|
||
rnorm=one/sqrt(xcent**2+ycent**2+zcent**2) | ||
xcent=rnorm*xcent | ||
ycent=rnorm*ycent | ||
zcent=rnorm*zcent | ||
centlat=asin(zcent)*rad2deg | ||
centlon=atan2(ycent,xcent)*rad2deg | ||
rnorm=one/sqrt(xcent**2+ycent**2+zcent**2) | ||
xcent=rnorm*xcent | ||
ycent=rnorm*ycent | ||
zcent=rnorm*zcent | ||
centlat=asin(zcent)*rad2deg | ||
centlon=atan2(ycent,xcent)*rad2deg |
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 like some additional indents were added in mod_fv3_lola.f90
. Not sure if that is intended or not.
local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" | ||
local zlib_ver=os.getenv("zlib_ver") or "1.2.11" | ||
local hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" | ||
local netcdf_ver=os.getenv("netcdf_ver") or "4.9.2" |
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 do we need those setup changes for this PR? if those changes are needed for this PR , does that mean similar changes are needed for other machines?
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.
Yes, but we only run this on WCOSS2 for now.
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.
Thanks! . I suspect the different modules used in this PR compared with the "control" branch (release/rrfs.v1.0.0) caused the failures of my ctests reported previously. I am working on this.
@@ -930,6 +948,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g | |||
couplerres=fv3_filenameginput%couplerres | |||
|
|||
|
|||
!write(6,'("general_read_fv3_regional: fv3sar_ensemble_opt= " I4)') fv3sar_ensemble_opt |
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.
Those commented out lines could be deleted or just uncommented if needed.
@@ -0,0 +1,23 @@ | |||
module crc32 |
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.
could "crc32" be replaced with a more informative name?
implicit none | ||
character(len=*), intent(in) :: m | ||
!m='nid001019' | ||
digest=abs(digest_c(trim(m)//c_null_char)) |
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 understand digest_c will return a unique "checksum" to be used as an unique "id" for the later use.
But, to do this, GSI need to directly use zlib and add the crc32_c.c , a c code in gsi, which has been a pure fortran package. Can we use simpler while still working way to specify an unique string here?
For example, can we add a fortran hash function to do this ?
I am interested in hearing other GSI developers' opinions on this.
@@ -0,0 +1,7 @@ | |||
#include <stdio.h> |
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.
see the above comment.
I hesitate to justify adding such a c code to the currently pure fortran GSI only for this function.
A correction. I saw there is already a c code in gsi : blockIO.c.
Then, the question is for the use of the additionally required zlib.
@@ -128,8 +128,12 @@ subroutine generate_anl_grid(nx,ny,grid_lon,grid_lont,grid_lat,grid_latt) | |||
use gridmod, only:grid_ratio_fv3_regional, region_lat,region_lon,nlat,nlon |
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.
A general comment. I hope in this step, a verification step is added. Namely, GSI need to know if the existing "parameters/coefficents' files exactly match the current setup (the grid setup, the mpi setup (mpi rank numbers and its layout ). This verification is important to avoid the errors of mismatching between the to read-in coefficients and the right ones, which is hard to notice when GSI could successfully finish while giving normal results.
@@ -164,431 +168,641 @@ subroutine generate_anl_grid(nx,ny,grid_lon,grid_lont,grid_lat,grid_latt) | |||
real(r_kind) d(4),ds | |||
integer(i_kind) kk,k | |||
|
|||
integer(i_kind) name_len,nodeID,nodeComm,nodeRank,RanksPerNode,ierr,npes,inunit | |||
character(len=72) :: input | |||
character(len=5) :: np,nlatc,nlonc |
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.
could more informative names be used for those character variables? like str_np, str_nlat ..?
@ShunLiu-NOAA As we discussed off-line, the PR looks good to me when it is supposed to merge to the release branch, except for a minor change to add an explicit parameter to help users know the fv3reg conversion fix files could be used.
Among them , global_4denvar, netcdf_fv3_regional,hafs_3denvar/4denvar failed for "penalty nonreproducible". |
@TingLei-NOAA Thank you. Let me make another test with my test case again. |
Ting, Could you tell me how did you run regression tests. This PR is based on branch RRFS.v1. Did you run regression test based on the branch hash that this PR based on? |
@hu5970 the control is (git log)
I am doing a clean ctest (deleted previous tmpdir ) and will see if the different hdf/netcdf modules caused the differences if the re-run ctests still failed. |
An update: using the PR's modulefiles and add the same zlib related lines in cmakelist.txt in src/gsi for the control GSI , the global 4denvar test still failed. Confusing. I am switching to debug mode GSI to investigate this issue. |
Description
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist