-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enable maxpft>1 #161
Enable maxpft>1 #161
Conversation
From the PDAF-side I do not have any objections to this. I have one question: Are currently used CLM3.5 models (most prominently the FallSchoolCase) expected to behave differently after this PR? Then, I would have to update the test routines. |
The current behaviour will change, yes. |
Ah, I see. I agree that the default should be aligned with CLM-defaults as far as possible. The only problem is that we have to deal with the backward compatibility of results inside the TSMP-framework. Maybe something to discuss in a meetings with supervisors. |
Hmm, However, I totally agree in providing some consistency that people do not have to upgrade their workflows with any new commit. |
I think the issue of backward compatibility is a tricky one. Things should not change too dramatically/often that very large changes in workflows are warranted. On the core of the subject, does anyone know why |
TSMP is designed to use the mosaic approach, which is known to be superior of the tile approach (see e.g. Ament and Simmer 2006; https://doi.org/10.1007/s10546-006-9066-4). In the mosaic approach one keep the location information of the land surface (finer land surface resolution) compared to the tile approach, where the different PFTs within one grid points are bundled. However, using one of the mentioned approaches outperform using none. As @niklaswr already mentioned I would either opt to add a control switch in |
Okay, summarising the above comments:
I will provide an update to this PR that implements a command line option for I also see the unresolved issue of testing the impact of this PR, also mentioned in @s-poll's last comment. Just for the sake of completeness, Im mentioning @skollet here. |
Hi Niklas, Could you please test if the simulation results change in case of modifying |
@Stefan Poll, I did the test you mentioned and a little bit more. I run the following simulations:
The results are: |
Thank you for the detailed check! This is indeed an unexpected behavior (especially for case iii). Please keep us up to date. I am available, if you want to talk bilateral about this PR. |
To study the problem mentioned above, that rewriting the function updating First, I printed (into a file) all the values that are part of the corresponding code section, for the two cases Second, I run two simulations with the same setup and the same model. The difference between these two simulations is that So my conclusion for this PR is, that the observed differences can be explained by machine inaccuracy and are not the result of a systematic error in the rewritten function updating Do we need any further testing? |
f237ab6
to
0bd4844
Compare
- set `maxpft=4` as new default in `bldsva/intf_oas3/common_build_interface.ksh` - rewrite workaround in `bldsva/intf_oas3/common_build_interface.ksh` correcting `forc_hgt` according to pft types present in CLM35 grid cell. This is now working for `maxpft!=1` as well.
- Add a command line option to modify maxpft long: --maxpft=X short -f=X - Default behaviour is still maxpft=1
- I have marked my changes in the src-code with !NWa to indicate which change was introduced by me. However, this is what git is for, so it is not necessary. As a good practice, I have removed these comments.
0bd4844
to
c6afa9c
Compare
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.
Without having it explicitly tested, changes look fine.
do pi = 1,max_pft_per_col | ||
! num_nolakec: number of column non-lake points in column filter | ||
do fc = 1,num_nolakec | ||
c = filter_nolakec(fc) | ||
l = clandunit(c) | ||
g = cgridcell(c) | ||
if (pi <= npfts(c)) then |
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 you explain this line to me, thanks.
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.
No, actually I cannot. This is the official 'description' of this variable taken from Biogeophysics1Mod.F90#L80
.
- Adding best practice for FORTRAN array notation. Scalar: A vs. Vector: A(:) Co-authored-by: s-poll <[email protected]>
- add comment indicating maxpft=4 is CLM3.5 default. Co-authored-by: s-poll <[email protected]>
@DCaviedesV Right now this PR aims to merged into the |
@niklaswr, yes, let's collect this PR with |
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.
Changes fine. PR could be merged from my side.
- Remove unused src-code Co-authored-by: s-poll <[email protected]>
maxpft=4
as new default inbldsva/intf_oas3/common_build_interface.ksh
bldsva/intf_oas3/common_build_interface.ksh
correctingforc_hgt
according to pft types present in CLM35 grid cell. This is now working formaxpft!=1
as well.