-
Notifications
You must be signed in to change notification settings - Fork 6
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
494 redux local ice fixes #527
base: main
Are you sure you want to change the base?
Conversation
@ccarouge I have several issues with testing required (apart from having limited time):
|
with end of #494 comments/modifiations |
ssnow%wbice(:,4) = 0.90 * ssnow%wb(:,4) | ||
ssnow%wbice(:,5) = 0.90 * ssnow%wb(:,5) | ||
ssnow%wbice(:,6) = 0.90 * ssnow%wb(:,6) | ||
ssnow%wbice(:,1) = frozen_limit * ssnow%wb(:,1) |
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.
how is this SUBROUTINE getting hold of frozen_limit
and Cdensity_ice
? via cable_common
?
Another comments on this routine for completeness - line 38 should be redundant.
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.
USE cbl_ssnow_data_mod
ll 38 - really? It doesnt need to be zeroed?
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 does in coupled - but all of this is inside a IF NOT %cable_runtime_coupled)
condition so this line will never be encountered.
I'm not actually that convinced we need the outer IF condition either as this routine is now only ever encountered via the cbl_serial and mpiworker routines.
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.
@har917 ok - so I've looked at the whole file and not just the line 38.
I agree can remove the outer loop. If we want to zero dgdtg on first step of each run we can add it to um_init_*., without the ktau=1 thing. it looks like a per timestep var anyway so this should be fine just to give it a finite value.
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.
@ccarouge - I gather this was the outstanding change request you were referring to. Just waiting on Ians response
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.
@JhanSrbinovsky @ccarouge My point here is/was really that cbl_soilsnow_init_special.F90
is only ever encountered via the serial driver and mpi_worker routines (and possibly even only on the first call) and so that implies that the some of logical inside the routine is irrelevant (because it's trapped by logic at a higher level).
As such:
- the IF condition at line 35 is irrelevant (you never have
cable_user@cable_runtime_coupled = .TRUE.
in this subroutine). - the IF conditions at line 37 and 81 are irrelevant (we shouldn't be encountering the subroutine twice)
- the IF condition at line 38 is irrelevant - this is an offline-only subroutine and anyway
%dgdtg
is always set indefine_canopy
before first use.
It could/would be sensible to include an initialisation of %dgdtg
(and %dfh_dtg
, %dfe_dtg
and %dfn_dtg
) cbl_um_init_soilsnow
but that's not strictly needed.
It would be sensible to sort this out - if nothing else because it removes things like the need for the SAVE condition on ktau (i.e. applying the coding standards to these refactored parts of the code).
... BUT all of this is really PR creep. Leaving these lines in won't do any damage (as far as I can tell).
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.
These have been here since ACCESS-1.3 days and we just keep adding switches. The canopy% fields (like Claire has been looking at int JAC version of climate% decs) are all zeroed at declaration,allocation as was required there. If not zeroing for the moment is not causing a problem then I suggest we wait until we pick this up and be sure to CALL the zeroing SUBR. AND remove this code. Note aswell the coupled_runtime flag has effectively been re-purposed and should at least be renamed to reflect that it does not indicate whether it is in a coupled run or not. I'll make an issue from here
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.
@har917 The only use of ktau is at the bottom, outside of the runtime_coupled loop so it gets executed for everyone, and in the UM - (potentially) on every restart. BUT init_spec is never called in the UM anyway.
- Does offline ever run in chunks?
IF no, we can just use ktau_gl then and get rid of ktau completely.
Also, it strictly should be using **ssnow%**xx=heat_cap_lower_limit(:,1)
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.
unless of course that is what is being passed but I dont remember editing the offline drivers recently
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.
the only use of ktau is at the bottom, outside of the runtime_coupled loop so it gets executed for everyone, and in the UM.
Not as far as I can tell: at the moment
spec_init_soilsnow
is called fromcable_serial
andmpi_worker
before the first time step and outside the timestepping loop (i.e. the routine only gets called once)spec_init_soilsnow
is not encountered in AM3
That leaves ESM1.6 - going from the ESM1.5 cable_um_init
routine it appears that the intent is to call spec_init_soilsnow
from within an IF (first_call)
construct. If that's correct then we can remove all mentions of ktau from this routine (and probably the if coupled conditions as well).
In rereading I also note that %gamzz
set at line 75 is different to that set at 81 - which seems odd.
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 couple of new things noted - now as new issues.
Please check i) how frozen_limit
and Cdensity_ice
are getting into spec_soilsnow_init
and ii) why we need a REAL() in one of the SUBROUTINE argument calls - if they're okay then this PR is approved.
So @ccarouge - what are we going to do about testing here? |
@JhanSrbinovsky there was a minor mistake in the new gridinfo- apparently xarray's |
Odd - my run didnt fail? Anyway, how do we go about replacing the grid_info in CABLE repo OR are we even concerned with doing that? |
That's very strange, my test run failed with |
This is a worry. Were you running in debug mode?
Neither do I - storing binaries in there is contrary to the whole point really. |
tested version4 against version3 (gridinfo files). Identical results for me. |
Yes, this was running in debug mode. I have since corrected the problem and managed to get a short run, with only 6 grid points and a single year, going with the ACCESS-ESM1.5 gridinfo and meteorology. Now extending it to a longer global run. |
above comment (vn3 vs vn4) was for global GSWP2, so should work for others. |
@JhanSrbinovsky for testing:
And finally, @har917 needs to review again because he is still noted as requesting changes (or @JhanSrbinovsky you haven't put in all requested changes...). For upload to me.org, Ben has been working on it and should get you a reply soon. me.org analysis is not needed here as we can't yet run ILAMB from me.org. |
I reran the single site testing. It isnt bitwise identical. I never really expected it to be except maybe where the ice fixes (including ice density where there is any frozen liquid in soil) dont apply. Looking at the headline subR, soilsnow_main there is a kind=r_2 which is enough to destroy bitwise compatabiliy AND then there is correction of a bug in which wbliq was only local/.This made me wonder how they were ever identical. Returning to the early days - they never were identical.
I will look at updating this |
@JhanSrbinovsky @ccarouge On the question of impact - it's a bit hard to give a definitive answer (partly because this has been a moving target). Referring to map above - I'm assuming this is the net impact on one of the temperatures (which one?) after one day. If so this is reasonable since
I'd like a longer run to see if the temperature differences settle over time and/or we get something more systematic emerging - but no cause for concern so far. |
CABLE
Thank you for submitting a pull request to the CABLE Project.
Description
Please include a brief summary of the change and list the issues that are fixed.
Please also include relevant motivation and context.
You can link issues by using a supported keyword in the pull request's description or in a commit message:
Fixes #(issue)
Type of change
Please delete options that are not relevant.
Checklist
Testing
Are the changes bitwise-compatible with the main branch? If working on an optional feature, are the results bitwise-compatible when this feature is off? If yes, copy benchcab output showing successful completion of the bitwise compatibility tests or equivalent results below this line.
Are the changes non bitwise-compatible with the main branch because of a bug fix or a feature being newly implemented or improved? If yes, add the link to the modelevaluation.org analysis versus the main branch or equivalent results below this line.
Please add a reviewer when ready for review.
📚 Documentation preview 📚: https://cable--527.org.readthedocs.build/en/527/