Add capability to read soil increments on the jedi-based fv3 grid for synthetic soil temp and moisture DA experiments with noahmp#871
Conversation
…xue2870/UFS_UTILS into feature/combine_w_offlineDA
|
@yuanxue2870 - did you open an issue for this? @barlage - are you aware of this work? |
Hi George(@GeorgeGayno-NOAA)- Thanks for the inquiry! This is one of my assigned Redmine tasks, but I am not being assigned an issue nor opening an issue myself for this drafted PR. I was discussing the best way to communicate my edits/revisions of the code with Mike over the past week. I also had a code-review meeting with Mike to walk through all my changes to the code. Mike suggested me only opening a draft PR at this stage and he wants to schedule a meeting with you and other key reviewers to briefly discuss this draft PR. Hope that clarifies things a little bit and we would like to discuss in detail when we have the meeting scheduled. Thank you for your attention and help on this issue! Best, |
…t to ingest soil temp increments and make adjustments
|
I am also getting a lot of Doxygen warnings in Do you know how to turn on the Doxygen build? Modify the build script as follows: In most cases, the warnings occur because some of the routine arguments are not documented. |
@GeorgeGayno-NOAA: Thanks for your detailed instructions to help me re-build the application with Doxygen on. I have now added descriptions of routine arguments in |
|
I am getting an odd warning when I compile with Intel: I don't think it a problem. And according to the following link, the warning can be eliminated by shortening the subroutine names in that module: I don't want you to change your code for this warning, but I worry that NCO will reject a future UFS_UTILS code delivery because of it. The warning can be suppressed by adding a compiler option. Can you update the cmake file as follows: |
|
Your branch is out-of-date. Please merge the latest updates from 'develop' to your branch. |
Done. Thanks. Once the scientific validity of this PR is confirmed by all reviewers, I will shorten the relevant routine name to fully resolve this warning. |
When merging, my current branch has a conflict with ab9b0b9. I need some time to figure out how to merge the latest 'develop" to my branch. Thanks! |
ClaraDraper-NOAA
left a comment
There was a problem hiding this comment.
Thanks @yuanxue2870 this is looking good. See my comments and questions (most of the questions are just for my knowlege). The big changes are: I think we're only reading in the JEDI increment from tile 1 on all processors; and I'm not sure what the value is of changing the order of operations for the SMC / STC updates. We also need to use the same method for the GSI and JEDI, since the whole point is to test what I'm doing for GSI.
| !! -DO_SNO_INC Do land increments to snow states. | ||
| !! -DO_SOI_INC_GSI Do land increments (on the Guassian grid) to soil states. | ||
| !! -DO_SOI_INC_JEDI Do land increments (on the cubed sphere tiles) to soil. | ||
| !! -DO_SNO_INC Do land increments (on the cubed sphere tiles) to snow states. |
There was a problem hiding this comment.
For consistency with the new soil increment flags, please change this to DO_SNO_INC_JEDI.
| DO_SOI_INC_GSI = .TRUE. | ||
| PRINT* | ||
| PRINT*," APPLYING SOIL INCREMENTS FROM THE GSI" | ||
| ALLOCATE(STC_BCK(LENSFC, LSOIL), SMC_BCK(LENSFC, LSOIL), SLC_BCK(LENSFC,LSOIL)) |
There was a problem hiding this comment.
I find the logic here a bit contrived. I seem to have coded this to have an option where DO_LNDINC is on, but then we skip it if the file name is not specified in the namelist. I'm not sure why I did this, but it doesn't make a lot of sense to me now. I'd also like to have a more consistent methods for both options (JEDI, GSI). I suggest changing the namelist to have two input options: DO_SOI_INC_GSI and DO_SOI_INC_JEDI, add then just assume standard file names for each (the GSI one is called, lnd_incr). Add a check to make sure both aren't specified as true, and have the code crash if the file is missing.
There was a problem hiding this comment.
Per discussion, the DO_LNDINC will be kept as it is. Separate DO_SOI_INC_GSI and DO_SOI_INC_JEDI. Add options in the namelist file.
| ELSE | ||
| INQUIRE(FILE='xainc.001', EXIST=file_exists) | ||
| IF (file_exists) then | ||
| IERR=NF90_OPEN('xainc.001',NF90_NOWRITE,NCID) |
There was a problem hiding this comment.
This looks like it's only opening the JEDI increment from tile number 1 (right?). This will need to be generalized to open the appropriate file (with the number coming form the task numbers - copy how it's done for opening the background).
| INQUIRE(FILE='xainc.001', EXIST=file_exists) | ||
| IF (file_exists) then | ||
| IERR=NF90_OPEN('xainc.001',NF90_NOWRITE,NCID) | ||
| IERR=NF90_INQ_VARID(NCID,"stc_inc",ID_VAR) |
There was a problem hiding this comment.
Why would stc_inc not be on the file, and why do we specifically check for it?
| ALLOCATE(STC_BCK(LENSFC, LSOIL), SMC_BCK(LENSFC, LSOIL), SLC_BCK(LENSFC,LSOIL)) | ||
| ALLOCATE(LANDINC_MASK_FG(LENSFC)) | ||
| ! FOR NOW, CODE SO CAN DO BOTH, BUT MIGHT NEED TO THINK ABOUT THIS SOME MORE. | ||
| ! NOTE: BOTH snow and soil related increment file are named as "xainc.00N" |
There was a problem hiding this comment.
This answers my earlier question! If we're going to assume file names here, it would be best to use two different names. The increment file name is specified in the JEDI yaml, so easy to change at that end.
| STC_BCK, STCFCS, SMCFCS, SLCFCS,& | ||
| STC_UPDATED) | ||
|
|
||
| CALL ADD_JEDI_INCREMENT_SOIL_MOISTURE(SLCINC, STCFCS, SMCFCS, SLCFCS,& |
There was a problem hiding this comment.
I see the three-step process now. So it's not re-calling JEDI. Let's talk about why you did this, but my impulse is that it makes it more complicated, without really adding any advantages.
There was a problem hiding this comment.
Will maintain the original logic.
| !! @param[in] slc_inc_tmp Liquid soil moisture increments on the cubed-sphere tiles | ||
| !! @author George Gayno NOAA/EMC | ||
|
|
||
| !! @author Yuan Xue: gsi-based soil increments are interpolated onto the |
There was a problem hiding this comment.
Unless you're using it, I don't think we need this (we can diff the anal and back to get the increment). I think my comment about doing this was out-dated. I suppose we may as well leave it in, in case it's useful in the future?
There was a problem hiding this comment.
Will leave it for now per discussion.
|
|
||
| write(rankch, '(i3.3)') (myrank+1) | ||
|
|
||
| fnbgso = "./fnbgso." // rankch |
There was a problem hiding this comment.
This is an example of how the file names are specified with the rank on the end. In some cases the rank is the file, in others it's the ensemble member.
There was a problem hiding this comment.
Ignore per discussion.
|
|
||
| else | ||
|
|
||
| fnbgso = "./xainc." // rankch |
There was a problem hiding this comment.
Let's give this a different file name. Say "gauss_interp".
| !! @param[out] satpsi Saturated matric potential for each soil type | ||
| !! @param[out] iret Return integer | ||
| subroutine set_soilveg(isot,ivet, maxsmc, bb, satpsi, iret) | ||
| subroutine set_soilveg_noah(isot,ivet, maxsmc, bb, satpsi, iret) |
There was a problem hiding this comment.
This is great, thanks. I'll ask you in person about what has changed (specifically, what errors might be in my experiments so far).
|
Thanks both of your help, @GeorgeGayno-NOAA and @ClaraDraper-NOAA for reviewing this! I had a meeting with @ClaraDraper-NOAA on 01/26/2024 afternoon to go over all of her comments one-by-one and clarify/confirm the unclear part. I will now make this PR as a draft to address all of the comments. Once I am done, I will convert it back to Open and let both of you know in order to re-review it. Thanks!! |
|
This PR is associated with the branch of feature/combine_w_offlineDA as the goal was to combine UFS_UTILS and offline land DA workflow for a series of synthetic twin DA experiments to figure out the best option for soil ice adjustment during frozen to unfrozen transitions. This branch includes some hacks to make UFS_UTILS/global_cycle to be compatible with current version of ufs-land-driver, which should not be incorporated into current UFS_UTILS/global_cycle as it may degrade its functionality. Yuan Xue discussed this issue with Clara Draper first on 01/26/2024 and we thought it might be best to leave the feature/combine_w_offlineDA as a separate repo instead. Yuan Xue further discussed this issue with Mike Barlage and Geroge Gayno on 02/09/2024 and we all agreed with the action. Hence, Yuan Xue closes PR#871, and opens a new PR for the branch feature/soil_ice_adjust to address the soil ice adjustment and fv3-grid soil increment reading issue#872 (#872). All comments from all reviewers are incorporated in the new PR. Please feel free to contact yuan.xue@noaa.gov if there are any further comments/concerns regarding this. Thank you! |
DESCRIPTION OF CHANGES:
calculate_landinc_maskto make it more stable and compatible with offline land DA workflowftst_read_increments) to read jedi-based soil increments on the fv3 gridftst_land_increments) to ingest soil temperature increments and adjust soil ice content (when needed)ISSUE:
Fixes issues mentioned in #872
TESTS CONDUCTED:
Note: I only have access to Hera and Orion as of 11/13/2023.
All my code edits should only affect global_cycle related unit tests and regression tests:
ftst_read_incrementsandftst_land_incrementsare passed without issues.