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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: CLM water/snow/radiation/energy balance checks turned off when DA turned on #671

Open
braczka opened this issue Apr 25, 2024 · 2 comments
Assignees
Labels
CLM Community Land Model SourceMods code used to modify CESM

Comments

@braczka
Copy link
Contributor

braczka commented Apr 25, 2024

馃悰

Describe the bug

  1. List the steps someone needs to take to reproduce the bug.
    Run CLM-DART with version cesm2.2.0 versions or later. For example, run CLM-DART tutorial.
    Run CLM-DART with DA enabled (i.e. DATA_ASSIMILATION_LAND=TRUE)

  2. What was the expected outcome?

    The balance checks within CLM source code ~/src/biogeophys/BalanceCheckMod.F90 should be enabled after skipping a time
    step or two after DA analysis step, because the skip_step = 2.

    We currently do not have DART cesm2_2 SourceMods that override this functionality because it looked like the original CLM
    code was designed to be run interactively with DART without specific SourceMods.

  3. What actually happened?

    The balance checks are never enabled, because DAnstep = 0, for the entirety of the simulation, thus failure of balance checks is never enabled because the following if statement to throw mass balance error is never true, for example:

if ((errh2o_max_val > error_thresh) .and. (DAnstep > skip_steps))

When DA is turned off (running ensemble free run), the DAnstep is updated, and the checks are enabled.

Error Message

None.

Which model(s) are you working with?

ctsm-release-cesm2.2.03

Version of DART

Which version of DART are you using?

v11.4.0

Have you modified the DART code?

No

Build information

Please describe:

  1. NSF NCAR supercomputer Derecho with intel compiler
@braczka braczka added CLM Community Land Model SourceMods code used to modify CESM labels Apr 26, 2024
@XueliHuo
Copy link
Collaborator

Thanks for opening this issue, Brett. I am going to add the BalanceCheckMod.F90 in the SourceMods used for SWE DA.

@braczka
Copy link
Contributor Author

braczka commented May 1, 2024

This same problem (DA_nstep not updated properly) also impacts the operation of the carbon and nitrogen balance checks in ~/src/biogeochem/CNBalanceCheckMod.F90. Although the CNBalanceCheckMod DART SourceMods allow for skipping of first time step through is_first_restart_step , this script is never called from ~/src/biogeochem/CNVegetationFacade.F90 because of DA_nstep problem.

Quick patch is easy enough by removing following lines from CNVegetationFacade.F90:

DA_nstep = get_nstep_since_startup_or_lastDA_restart_or_pause()if (DA_nstep <= skip_steps ) then
       if (masterproc) then
          write(iulog,*) '--WARNING-- skipping CN balance check for first timesteps after startup or data assimilation'
       end if

I will implement this quick patch for immediate solution. For longer term solution will also look into problem with initialization and update of DA_nstep and nstep variables within CTSM. Currently, these bugs are not allowing any balance checks (snow,water,energy,carbon,nitrogen) to take place when DA is turned on. Not a problem with the functioning of DART necessarily, but balance checks are a key diagnostic for model stability, which can be a problem for DA applications.

@braczka braczka self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLM Community Land Model SourceMods code used to modify CESM
Projects
None yet
Development

No branches or pull requests

2 participants