Skip to content
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

enaable rootbeta parametrization of froot #453

Merged

Conversation

JhanSrbinovsky
Copy link
Collaborator

@JhanSrbinovsky JhanSrbinovsky commented Oct 30, 2024

CABLE

Description

enable parametrisation bases on rootbeta as default behaviour

Fixes #451

Type of change

Please delete options that are not relevant.

Checklist

  • The new content is accessible and located in the appropriate section.
  • I have checked that links are valid and point to the intended content.
  • I have checked my code/text and corrected any misspellings

Please add a reviewer when ready for review.


📚 Documentation preview 📚: https://cable--453.org.readthedocs.build/en/453/

@JhanSrbinovsky JhanSrbinovsky self-assigned this Oct 30, 2024
@JhanSrbinovsky JhanSrbinovsky linked an issue Oct 30, 2024 that may be closed by this pull request
Copy link
Contributor

@rml599gh rml599gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code change looks fine. Have you done any testing of the change?

Perhaps also worth cleaning up:
There are froot values set in cable_pft_params.F90 but these are never used and are incorrect if they were to be used - the froot values should sum to 1 over soil levels which is the first index for vegin%froot(soil-level, veg-type) but the 2nd index for veg%froot(mp, soil-level). Suggest delete the lines unless we wanted to have the capability to set froot values by pft.
I noticed rootbeta is allocated in allocate_veg_params_cbl.F90 while froot is allocated both in that file and in cable_define_types.F90. Is this correct?

@JhanSrbinovsky
Copy link
Collaborator Author

I'll have to setup an ESM1.5 build/run w the current main CABLE and then a 2nd with this branch.

Analysis will be difficult. I'm almost certain that with both (main&here) set to TRUE/FALSE there will be no difference. However, testing the impact of TRUE vs FALSE, or comparing the 2 methods will show differences. A 20+ year run will then be needed BUT I am assuming that your original comment implies that you have already done this and so are wanting to move to the root_beta method. In which case, what am I testing - that the IF() condition works?

@rml599gh
Copy link
Contributor

rml599gh commented Nov 4, 2024

I think it is worth testing that using access13roots=TRUE is the same as the current 'main'. For the change from froot to rootbeta - probably the best we can do is compare my test runs with yours. The carbon fluxes do seem to be quite sensitive to the change, including smaller seasonality - which was already underestimated in ESM1.5, so this may discourage us from going to the rootbeta method.

@JhanSrbinovsky
Copy link
Collaborator Author

That's what I mean, we are effectively testing whether the IF condition actually works, or am I missing something?

oh BTW - I doubt the cable_define_types ALLOCATION is ever called. I just never deleted it.

@JhanSrbinovsky
Copy link
Collaborator Author

I just looked at the allocate() issue.

in the alloc_veg_params module the CALL is to allocate_veg_parameter_type. The cable_define_types thing CALL allocate_cbm_var. So the other is just dangling it seems.

@JhanSrbinovsky JhanSrbinovsky added the priority:high High priority issues that should be included in the next release. label Nov 6, 2024
@JhanSrbinovsky JhanSrbinovsky added this to the ESM1.6 FastTrack milestone Nov 6, 2024
@JhanSrbinovsky JhanSrbinovsky force-pushed the 451-enable-root-distribution-flexibility-in-esm15 branch from 9b463d6 to 771028e Compare November 26, 2024 03:48
@JhanSrbinovsky
Copy link
Collaborator Author

how is this going @rml599gh ?

Copy link
Contributor

@rml599gh rml599gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to take a copy of the file that is changed: cable_um_init_subrs.F90 to run some tests myself and it doesn't compile because 'totdepth' and 'is' are not explicitly defined. Is this because the rootbeta block of code has been moved out of the init_veg_from_vegin subroutine into init_veg_pars_fr_vegin? I suggest we might want to do this the other way and move the ESM1.5 froot block into init_veg_from_vegin subroutine. This might set us up better for coding up the option to prescribe froot by pft.

@JhanSrbinovsky
Copy link
Collaborator Author

odd - it seems to have built here - anyway - about to head into a meeting. I'll look at it after that.

@JhanSrbinovsky
Copy link
Collaborator Author

haha - of course it has - checks doesnt build coupled models

@JhanSrbinovsky
Copy link
Collaborator Author

builds in ESM now

@rml599gh
Copy link
Contributor

@JhanSrbinovsky - I've also had a go at giving extra flexibility as to how froot is set.

 IF (cable_user%access13roots) THEN
      ! prescribed values from vegin%froot so can be set to ESM1.5 values
      ! which were the same for all pfts (0.05, 0.2, 0.2, 0.2, 0.2, 0.15)
      ! or alternate prescribed root fractions could be used with pft dependence
      DO is = 1, ms
        DO h=1, mp
          veg%froot(h,is) = vegin%froot(is,veg%iveg(h))
        ENDDO
      ENDDO
    ELSE

What do you think? I haven't tested this yet, only that it compiles. If we implement this, then we also need to update cable_pft_params.F90 as the vegin%froot values in the current file are incorrect. I think they should be

    !vegin%froot(soil-level,veg-type) ESM1.5 values (all pfts the same)
    vegin%froot(1,1) =        0.050000
    vegin%froot(2,1) =        0.200000
    vegin%froot(3,1) =        0.200000
    vegin%froot(4,1) =        0.200000
    vegin%froot(5,1) =        0.200000
    vegin%froot(6,1) =        0.150000

and replicated across each of the PFTs.
My file is here:
/g/data/p66/rml599/ESM1.5-CABLE3-main/submodels/UM/umbase_hg3/src/atmosphere/CABLE/src/coupled/ESM1.5/cable_pft_params.F90

It also has updated parameters for running Medlyn and the CM2/ESM1.5 refl/taul parameters next to each other in the file so it is clearer to swap between them.

@JhanSrbinovsky
Copy link
Collaborator Author

no problem. I dont know where else the froot values in there could've come from?

@rml599gh
Copy link
Contributor

It just looked like they'd been put into the subroutine incorrectly (pfts and soil levels swapped) i.e. all the pft1 values were 0.05, all the pft2 values were 0.2 etc and after 6 pfts, everything was zero.

@JhanSrbinovsky
Copy link
Collaborator Author

I can imagine how such an error could occur. mixing up dimensions (pft,layer).

@JhanSrbinovsky
Copy link
Collaborator Author

done :)

@rml599gh
Copy link
Contributor

I ran some one-month tests replicating these changes in my working copy. Plots are zonal mean GPP. Black and green are cases where I'd switched files in the build in order to change between froot and rootbeta. Red and blue use the new file and the access13roots switch i.e. a run-time rather than build-time choice.
image

And here's a difference plot, with the original froot case subtracted from each of the others. Black is switchable with froot used. Red and green are rootbeta with red hardwired and green switchable.
image

Ideally the black line should be zero and the red and green should be identical but something seems to have given divergent meteorology. Probably should at least check that we are still bit reproducible.

@JhanSrbinovsky JhanSrbinovsky merged commit 3879551 into main Dec 16, 2024
7 checks passed
@JhanSrbinovsky JhanSrbinovsky deleted the 451-enable-root-distribution-flexibility-in-esm15 branch December 16, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high High priority issues that should be included in the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable root distribution flexibility in ESM1.5
2 participants