-
Notifications
You must be signed in to change notification settings - Fork 132
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
Allow for read of tlat, tlon, anglet with popgrid #463
Conversation
Update from cice consortium
Update according to consortium
…ces between values in coupled setups based on different methods for calculating these
Merge changes from main
update from main
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 @TillRasmussen
Most of the changes in ice_grid.F90 are not needed, although I don't mind them except that 'call Tlatlon' is not longer horizontally aligned. The new blank line and line 477 shouldn't be there, and having the blank lines in lines 809 and following are helpful when reading the code. But these are all just picky comments and okay........
The blank spaces is a result of some test I have been doing in order to read anglet, tlon and tlat instead of calculating these. This included adding some if else around the Tlonlat function.. |
Update from main
@TillRasmussen is this PR ready to merge or are you still working on it? |
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 recommend getting rid of the ice_barrier as well. Otherwise, looks fine.
call ice_read_global_nc(fid_grid,1,fieldname,work_g1,diag) | ||
call scatter_global(TLAT, work_g1, master_task, distrb_info, & | ||
field_loc_center, field_type_scalar) | ||
endif |
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 looks like there might be a slight indentation problem in this if block. Can you check that there are no "tabs".
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 thnk that this has been solved
This pull request has been updated. Editiing is done if test are complete |
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.
It looks like something happened with Icepack and you'll be pulling in a different version. I think this needs to be fixed.
updated according git cice
My icepack fork is now updated |
I ran a full test suite last night and everything looks good, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash#3fedc78b1b012f8bd6c0fde7c1b41e79b9db63a9 |
In 3fedc78 (Allow for read of tlat, tlon, anglet with popgrid (CICE-Consortium#463), 2020-06-24), ice_grid::init_grid2 was changed so that ice_grid::Tlatlon, which computes the TLAT and TLON arrays from ULAT and ULON, is only called if the private module variable 'l_readCenter' is false. The idea is that if the grid file contains a variable 'anglet', then it is assumed that it also contains variables 'tlon' and 'tlat', and so these fields are read directly instead of being computed. This logic, however, was only implemented in ice_grid::popgrid_nc, which sets 'l_readCenter' depending on the presence or absence of 'anlglet' in the grid file. This means that if 'popgrid_nc' is not called (for example with "grid_format='bin'", in which case init_grid2 calls 'popgrid' and not 'popgrid_nc'), then 'l_readCenter' is used uninitialized in init_grid2, and so it's possible that 'Tlatlon' is not called, if 'l_readCenter' happens to be initialized to true. This in turns leads to 'TLAT' and 'TLON' being uninitialized, and the code failing when accessing these arrays if compiling with NaN initialization. Fix this by initializing 'l_readCenter' at the beginning of init_grid2, such that it is initialized for all choices of 'grid_format' and 'grid_type'. Remove the initialization in 'popgrid_nc'.
In 3fedc78 (Allow for read of tlat, tlon, anglet with popgrid (CICE-Consortium#463), 2020-06-24), ice_grid::init_grid2 was changed so that ice_grid::Tlatlon, which computes the TLAT and TLON arrays from ULAT and ULON, is only called if the private module variable 'l_readCenter' is false. The idea is that if the grid file contains a variable 'anglet', then it is assumed that it also contains variables 'tlon' and 'tlat', and so these fields are read directly instead of being computed. This logic, however, was only implemented in ice_grid::popgrid_nc, which sets 'l_readCenter' depending on the presence or absence of 'anglet' in the grid file. This means that if 'popgrid_nc' is not called (for example with "grid_format='bin'", in which case init_grid2 calls 'popgrid' and not 'popgrid_nc'), then 'l_readCenter' is used uninitialized in init_grid2, and so it's possible that 'Tlatlon' is not called, if 'l_readCenter' happens to be initialized to true. This in turns leads to 'TLAT' and 'TLON' being uninitialized, and the code failing when accessing these arrays if compiling with NaN initialization. Fix this by initializing 'l_readCenter' at the beginning of init_grid2, such that it is initialized for all choices of 'grid_format' and 'grid_type'. Remove the initialization in 'popgrid_nc'.
In 3fedc78 (Allow for read of tlat, tlon, anglet with popgrid (#463), 2020-06-24), ice_grid::init_grid2 was changed so that ice_grid::Tlatlon, which computes the TLAT and TLON arrays from ULAT and ULON, is only called if the private module variable 'l_readCenter' is false. The idea is that if the grid file contains a variable 'anglet', then it is assumed that it also contains variables 'tlon' and 'tlat', and so these fields are read directly instead of being computed. This logic, however, was only implemented in ice_grid::popgrid_nc, which sets 'l_readCenter' depending on the presence or absence of 'anglet' in the grid file. This means that if 'popgrid_nc' is not called (for example with "grid_format='bin'", in which case init_grid2 calls 'popgrid' and not 'popgrid_nc'), then 'l_readCenter' is used uninitialized in init_grid2, and so it's possible that 'Tlatlon' is not called, if 'l_readCenter' happens to be initialized to true. This in turns leads to 'TLAT' and 'TLON' being uninitialized, and the code failing when accessing these arrays if compiling with NaN initialization. Fix this by initializing 'l_readCenter' at the beginning of init_grid2, such that it is initialized for all choices of 'grid_format' and 'grid_type'. Remove the initialization in 'popgrid_nc'.
…um#758) In 3fedc78 (Allow for read of tlat, tlon, anglet with popgrid (CICE-Consortium#463), 2020-06-24), ice_grid::init_grid2 was changed so that ice_grid::Tlatlon, which computes the TLAT and TLON arrays from ULAT and ULON, is only called if the private module variable 'l_readCenter' is false. The idea is that if the grid file contains a variable 'anglet', then it is assumed that it also contains variables 'tlon' and 'tlat', and so these fields are read directly instead of being computed. This logic, however, was only implemented in ice_grid::popgrid_nc, which sets 'l_readCenter' depending on the presence or absence of 'anglet' in the grid file. This means that if 'popgrid_nc' is not called (for example with "grid_format='bin'", in which case init_grid2 calls 'popgrid' and not 'popgrid_nc'), then 'l_readCenter' is used uninitialized in init_grid2, and so it's possible that 'Tlatlon' is not called, if 'l_readCenter' happens to be initialized to true. This in turns leads to 'TLAT' and 'TLON' being uninitialized, and the code failing when accessing these arrays if compiling with NaN initialization. Fix this by initializing 'l_readCenter' at the beginning of init_grid2, such that it is initialized for all choices of 'grid_format' and 'grid_type'. Remove the initialization in 'popgrid_nc'.
For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers
PR checklist
Eliminate warning due to print of iblk when not in a loop
Till Rasmussen, DMI
@apcraig
ENTER INFORMATION HERE