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

Updating history file in CLM #577

Closed
wants to merge 10 commits into from
Closed

Updating history file in CLM #577

wants to merge 10 commits into from

Conversation

braczka
Copy link
Contributor

@braczka braczka commented Nov 13, 2023

Description:

Allows for updating of CLM history files for special cases (e.g. SIF observations updating GPP fluxes). General behavior is
for DART to only update restart domain in CLM, because restart files contain the prognostic variables which impact the model forecast. However, in special cases, it is valuable for observations to update diagnostic variables such as land-atmospheric fluxes to provide best flux estimates.

Fixes issue

This added functionality is intended to address Issue #574 "Add capability to update history domain in CLM-DART".

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Tests

Currently testing a simple case using CLM5-DART Tutorial as template.
Case Directory: /glade/work/bmraczka/cases/cesm2.2.0/clm5_hist_on_e5/
Run Directory: /glade/scratch/bmraczka/cesm2.2.0/clm5_hist_on_e5/run/

Also dart_to_clm testing performed in: /glade/work/bmraczka/DART/models/clm/work/

with dart_to_clm input files included:
dart_posterior.nc
clm_restart.nc
dart_posterior_history.nc
clm_history.nc
clm_vector_history.nc

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

@braczka braczka added Enhancement New feature or request Help Wanted Extra attention is needed CLM Community Land Model labels Nov 13, 2023
@braczka braczka self-assigned this Nov 13, 2023
@braczka
Copy link
Contributor Author

braczka commented Nov 13, 2023

When performing ./dart_to_clm I get an error related to the rank/dimension of the clm_history file. To get the error
I do the following:

cd /glade/work/bmraczka/DART/models/clm/work
./dart_to_clm

Gives the following error (this is an excerpt below, full output is given in dart_to_clm_error file):

forrtl: severe (408): fort: (2): Subscript #1 of the array VARSIZE has value 3 which is greater than the upper bound of 2

Image              PC                Routine            Line        Source             
dart_to_clm        0000000000C65E46  Unknown               Unknown  Unknown
dart_to_clm        000000000078CB29  dart_to_clm_IP_co        1020  dart_to_clm.f90
dart_to_clm        0000000000772A31  dart_to_clm_IP_re         416  dart_to_clm.f90
dart_to_clm        0000000000770FB6  MAIN__                    302  dart_to_clm.f90
dart_to_clm        0000000000404062  Unknown               Unknown  Unknown
libc-2.22.so       00007F585BFA1A35  __libc_start_main     Unknown  Unknown
dart_to_clm        0000000000403F69  Unknown               Unknown  Unknown

This error makes sense because the GPP variable for the clm history file (clm_history.nc) and the dart history file (dart_posterior_history.nc) has 3 dimensions (lat,lon,time), but the rank variable was calculated as 2 within get_num_dims thus the code calls on the function replace_values_2D to update the history file.

My interpretation is that the dart_to_clm code needs a separate function such as replace_values_3D. But it is unclear to me, why the rank = 2, instead of rank = 3, which leads me to believe I am missing something else here......

Just wanted some feedback before I took a wrong path here. @hkershaw-brown @mjs2369 I know there is a conference this week, so not urgent, but I could use your feedback when you get a chance.

@braczka
Copy link
Contributor Author

braczka commented Nov 20, 2023

I think I am bailing on this PR. Further testing shows I can get same functionality with main branch through traditional use of 'UPDATE' and 'NO_COPY_BACK' settings for history files. Unfortunately, I didn't recognize this before given dart_to_clm.f90 only operates on restart domain, and other domains are left out of bothdart_to_clm.f90 and assimilate.csh. For this reason I thought the history domain was not updated at all -- but filter still updates all domains independently of dart_to_clm.f90, and dart_to_clm.f90 was only intended to correct for missing/indeterminate layers, something unique to the restart domain.

@hkershaw-brown
Copy link
Member

closing, functionality is available through 'UPDATE' and 'NO_COPY_BACK'

@hkershaw-brown hkershaw-brown deleted the history_domain_update branch January 26, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLM Community Land Model Enhancement New feature or request Help Wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants