-
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
Conversation
@ccarouge I have several issues with testing required (apart from having limited time):
|
with end of #494 comments/modifiations |
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? |
I think the easiest way around this is to replace the local re-evaluation of the total water (liquid++frozen). and hence change in water content, with that evaluated in In effect the
and (first time step and main calculation)
There is an interesting quirk around how this water balance works with the lakes (where we keep adding water anyway) |
@ccarouge Looking at one of the problematic cases with the Assuming that the output is working - this seems to indicate that Looking at the CABLE-POP_TRENDY branch and MAIN in a bit more detail indicates that a possible problem is that I don't know when that difference was implemented - likely around the refactorisation of the code. |
If we are going to change how the REAL(r_2), DIMENSION(:),POINTER, SAVE :: owb ! volumetric soil moisture
REAL(r_2), DIMENSION(mp) :: delwb ! change in soilmoisture
IF(ktau==1) THEN
ALLOCATE( owb(mp) )
! initial value of soil moisture
owb=ssnow%wbtot
END IF
! Calculate change in soil moisture b/w timesteps:
delwb = ssnow%wbtot - owb
! Update old soil moisture to this timestep value.
owb = ssnow%wbtot It does the same thing and is faster to read (well, at least for me). We could add this to this PR if we want to. For the |
Also - interestingly @mcuntz added ... but I can't see how |
I think we have to do this in this PR - it's a related part of the whole liquid/ice densities aren't equal topic and could create confusion later on if we don't do it now. Happy to go with your preferred implementation. |
opened new issue about the fwsoil quirk with 'Haverd2013' at #546 |
I'm changing the water balance calculation then. |
User ssnow%wbtot to avoid approximating the ice density with the liquid water density.
New water balances after the fix to the densities:
The fix seems to improve the cumulative water balances for this branch in general, although they are still worse than the main branch. Except for something weird at US-UMB for |
@ccarouge @JhanSrbinovsky, @rml599gh has just pointed me to #484 Just to note that the current branch includes the changes necessary to capture that issue. |
@ccarouge @JhanSrbinovsky @rml599gh I now understand why we're getting somewhat inconsistent impacts from the 'Haverd2013' parameterisation. Below are 4 plots showing time series (blue = 'standard' R0_S2, orange = 'Haverd2013', R0_S0) for fwsoil, latent heat Qle (basically transpiration), wbal (the integrated water imbalance) and soil moisture in each of the 6 layers - from the benchcab runs for UMB from #545. As noted 'Haverd2013' is not varying the fwsoil, this allows unrestricted transpiration, which is driving the soil moisture below the standard case (and even below the wilting point swilt). However it is only if and when this drives the water content below one or other of the hard limits (0 soil moisture in soil layer 4) that this manifests as a water imbalance. If you don't hit such a case then 'Haverd2013' is conserving well, albeit the dynamics are incorrect - hence the inconsistency in results across cases. All this is pointing towards the need to understand what's happening with fwsoil with Haverd et al. as the route to explain this issue.
|
Sorry - In and out today - what's the 4000-6000? |
fwsoil stuck at .95 is suspicious isnt it ? |
time steps in the output - i.e. 0 on the x-axis relates to time step 4000 in the output. Sorry could have been cleaner. |
@JhanSrbinovsky @ccarouge @rml599gh - see #546 okay so it appears that @rml599gh was at least partially correct. I took MAIN and only edited For reference, the 'standard' switch on this case gives a water imbalance of -4.42E-4mm . However this doesn't explain what's happening with the #494 branch since I think that branch incorporates those edits to |
- (bwb(k,:,1)))*soil%zse)*1000.0 | ||
END DO | ||
END IF | ||
owb=ssnow%wbtot |
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 sorry this is incorrect. This updates owb
before using it to evaluate delwb
- i.e. delwb
will always = 0
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's only on ktau == 1. so first time step initialisation. So at first time step we will have 0 but then it will work fine. Same behaviour as before.
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.
also what's the idea behind the wbal tracking "main" until timestep~5000 (in the above plots)? |
@ccarouge I think we need to look at the timeseries of Are these data still on gadi somewhere? |
I just re-read it, so the soil moisture just t takes that long to dry out I guess |
In effect the Once there's some rain and the soil moisture content can naturally climb above zero again (time step ~5250) it reverts to conserving nicely at the wbal plot levels off. With a sensibly behaving |
@JhanSrbinovsky In this #494 branch - is This was in |
ok - thanks, that was my next question - so the recovery had to wait for the rain. wbliq init in AM3 happens. IDK about offline. It used to be there. wbliq was messed up, but the initialization was still there. Did someone remove it? |
@ccarouge @JhanSrbinovsky This is worse than it looks from the headline water balance numbers. Looking at the time series of BUT I'm not sure which set of numbers I've picked up from me.org - the time stamp indicates 12/3/2025 whereas I thought we'd (well @ccarouge) redone the analysis on the 14th. So it could be that this comment is out of date given the changes to Also - my comment around |
@har917 @JhanSrbinovsky Trying to look into this more systematically, I've created very rough plots for all the sites for:
The plots have timeseries of Wbal, Fwsoil and SoilMoist for all soil levels. There is a file for Haverd2013: And a file for standard What I see from these is:
So it looks like we have enough there to document the changes. I'm not too sure why the fwsoil_switch=Haverd2013 seems to work better with this branch changes but I'm fine with that. So we are good to go for me. |
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.
Good to go
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/