-
Notifications
You must be signed in to change notification settings - Fork 163
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
Convert real(kind_phys) vegetation, slope and soil type arrays into integer arrays without affecting input/output files #388
Conversation
…y interstitial arrays
…types before/after surface physics
… be used in the _init phases
…etation_soil_slope_type_integer
…etation_soil_slope_type_integer
…etation_soil_slope_type_integer
…etation_soil_slope_type_integer
…etation_soil_slope_type_integer
nb = Atm_block%blkno(ii,jj) | ||
ix = Atm_block%ixp(ii,jj) | ||
if (Diag(idx)%data(nb)%var21(ix) /= 0) var2(i,j) = Diag(idx)%data(nb)%var2(ix)*lcnvfac | ||
call store_data(Diag(idx)%id, var2, Time, idx, Diag(idx)%intpl_method, Diag(idx)%name) |
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.
This GitHub diff view is confusing. The only thing that changed was adding the int_or_real: if
case and move the existing code into the else
block.
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.
Maybe in the future we need to consider outputting those fields as integer too.
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, that would be nice, but it will require changes to the pre- and post-processing chain.
…etation_soil_slope_type_integer
This PR is ready to merge, ccpp-physics hash is up to date. |
Description
This PR converts the real vegetation, slope and soil type arrays and replaces them with the existing (interstitial) "integer" arrays (these become persistent). Additional
_save
variables are added as required for obtaining b4b identical output (see NCAR/ccpp-physics#730).The approach taken here was to take the conversion from integer to real for writing the data to disk to the latest point possible, and to convert back from real to integer when reading from disk. This ensures that there are zero changes to upstream and downstream processes. It should also be noted that the I/O layer currently does not support writing/reading integer data and that, if changes to the input/output files are preferred in a follow-up PR, additional development will be necessary.
Issue(s) addressed
Testing
For regression testing, see ufs-community/ufs-weather-model#804
Dependencies
NCAR/ccpp-physics#730
#388
ufs-community/ufs-weather-model#804