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

-- Fix coastal lakes with revised code #856

Merged
merged 16 commits into from
Nov 6, 2023

Conversation

ghost
Copy link

@ghost ghost commented Sep 29, 2023

DESCRIPTION OF CHANGES:

Link orog to /scratch1/NCEPDEV/global/glopara/fix/raw/orog/ to read MODISP lake fraction and GLDBV3 lake depth for now.

Add options to choose different lake datasets

TESTS CONDUCTED:

If there are changes to the build or source code, the tests below must be conducted. Contact a repository manager if you need assistance.

  • Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera and WCOSS2). Done with 58e25cd.
  • Compile branch on Hera using GNU. Done using 58e25cd.
  • Compile branch in 'Debug' mode on WCOSS2. Done on Dogwood using 58e25cd.
  • Run unit tests locally on any Tier 1 machine. Done on Hera using 58e25cd.
  • Run relevant consistency tests locally on all Tier 1 machine. Done with 58e25cd.

The C96 uniform grid regression test failed. This is expected because the lake option was turned on for that test. All other grid regression tests passed as expected.

DEPENDENCIES:

None.

DOCUMENTATION:

ISSUE:

Fixes issue mentioned in #854.

CONTRIBUTORS (optional):

Co-authored-by: Ning Wang [email protected]

-- Link orog to /scratch1/NCEPDEV/global/glopara/fix/raw/orog/ to read MODISP lake fraction and GLDBV3 lake depth for now
-- Add options to choose different lake datasets

Fixes ufs-community#854
@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA your branch won't compile using GNU. To compile with GNU, adjust the build_all.sh script as follow:

 # User Options
 target=${target:-"NULL"}
-compiler=${compiler:-"intel"}
+compiler=${compiler:-"gnu"}

Here are the errors:

[ 70%] Building Fortran object sorc/orog_mask_tools.fd/lake.fd/CMakeFiles/lakefrac.dir/lakefrac.F90.o
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:56:132:

   56 |        ' [tile_num (0:all tiles, 7:regional)] [resolution (48,96, ...)] [lake data path] [lake status source] [lake depth source] [lake_cutoff]'
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:56:8:

   56 |        ' [tile_num (0:all tiles, 7:regional)] [resolution (48,96, ...)] [lake data path] [lake status source] [lake depth source] [lake_cutoff]'
      |        1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:696:132:

  696 |       write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:696:33:

  696 |       write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                 1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:918:132:

  918 |     write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:918:31:

  918 |     write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                               1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:309:14:

  309 |           IF (two_section == .false.) THEN
      |              1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:313:17:

  313 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:323:17:

  323 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:332:17:

  332 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
f951: some warnings being treated as errors

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA None of the consistency tests use the 'lake' option. Would it be a good idea to add one?

https://github.com/ufs-community/UFS_UTILS/tree/develop/reg_tests/grid_gen

I can help with that.

@GeorgeGayno-NOAA
Copy link
Collaborator

The 'readthedocs' will need to be updated as well. I can help with that.

https://noaa-emcufs-utils.readthedocs.io/en/latest/ufs_utils.html#lakefrac

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA your branch won't compile using GNU. To compile with GNU, adjust the build_all.sh script as follow:

 # User Options
 target=${target:-"NULL"}
-compiler=${compiler:-"intel"}
+compiler=${compiler:-"gnu"}

Here are the errors:

[ 70%] Building Fortran object sorc/orog_mask_tools.fd/lake.fd/CMakeFiles/lakefrac.dir/lakefrac.F90.o
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:56:132:

   56 |        ' [tile_num (0:all tiles, 7:regional)] [resolution (48,96, ...)] [lake data path] [lake status source] [lake depth source] [lake_cutoff]'
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:56:8:

   56 |        ' [tile_num (0:all tiles, 7:regional)] [resolution (48,96, ...)] [lake data path] [lake status source] [lake depth source] [lake_cutoff]'
      |        1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:696:132:

  696 |       write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:696:33:

  696 |       write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                 1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:918:132:

  918 |     write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:918:31:

  918 |     write(string,'(a,es8.1)') 'land_frac and lake_frac are adjusted such that their sum is 1 at points where inland=1; land_frac cutoff is',land_cutoff
      |                               1
Error: Unterminated character constant beginning at (1)
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:309:14:

  309 |           IF (two_section == .false.) THEN
      |              1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:313:17:

  313 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:323:17:

  323 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
/scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90:332:17:

  332 |               IF(enclosure_cnvx(v, 4, p, co_gc) == .true.) THEN
      |                 1
Error: Logicals at (1) must be compared with .eqv. instead of ==
f951: some warnings being treated as errors

Fixed with 7dee97b.

driver_scripts/driver_grid.hera.sh Outdated Show resolved Hide resolved
driver_scripts/driver_grid.hera.sh Outdated Show resolved Hide resolved
sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 Show resolved Hide resolved
sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 Show resolved Hide resolved
@GeorgeGayno-NOAA
Copy link
Collaborator

I am still getting one doxygen warning. The driver needs a return code. For example:

diff --git a/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 b/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
index 0b70d50b..9f1608fc 100644
--- a/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
+++ b/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
@@ -5,6 +5,7 @@
 !> This program computes lake fraction and depth numbers for FV3 cubed sphere
 !! grid cells, from a high resolution lat/lon data set.
 !!
+!! @return 0 for success.
 !! @author Ning Wang @date July 2018
 !!
 !!  - Shan Sun, Aug. 2018: Added Caspian Sea and Aral Sea to the lake fraction

@GeorgeGayno-NOAA
Copy link
Collaborator

I am still getting one doxygen warning. The driver needs a return code. For example:

diff --git a/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 b/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
index 0b70d50b..9f1608fc 100644
--- a/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
+++ b/sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90
@@ -5,6 +5,7 @@
 !> This program computes lake fraction and depth numbers for FV3 cubed sphere
 !! grid cells, from a high resolution lat/lon data set.
 !!
+!! @return 0 for success.
 !! @author Ning Wang @date July 2018
 !!
 !!  - Shan Sun, Aug. 2018: Added Caspian Sea and Aral Sea to the lake fraction

Thanks @ShanSun-NOAA. It compiles now with no warnings.

Copy link
Collaborator

@GeorgeGayno-NOAA GeorgeGayno-NOAA left a comment

Choose a reason for hiding this comment

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

Before merging, the following must be done:

  • All scripts in ./driver_scripts must be updated for the new datasets.
  • The 'readthedocs' must be updated for the new datasets.
  • None of the regression tests in ./reg_tests/grid_gen excercise the 'lake' option. Do you want to add a test for lakes?

@@ -106,10 +106,12 @@ export soil_type_src="bnu.v3.30s" # Soil type data.
# For Beijing Norm. Univ. data
# 1) "bnu.v3.30s" for global 30s data.

export lake_data_srce=MODISP_GLDBV3 # 'GLDBV3', 'MODISP_GLOBATHY', 'MODISP_GLDBV3', and 'VIIRS_GLDBV3'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This new variable will also need to be defined in the driver scripts for WCOSS, Orion and Jet. I would also define what the four choices are as is done for the soil and vegetation data.

Copy link
Author

Choose a reason for hiding this comment

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

lake_data_srce is now defined in all driver_scripts. It runs well on hera, jet and orion. The lakefrac generated on hera, jet and orion are identical.

Copy link
Author

Choose a reason for hiding this comment

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

Q: The 'readthedocs' must be updated for the new datasets.
A: Could you help with updating 'readthedocs', as I don't have the permisson? Thanks!
Q: None of the regression tests in ./reg_tests/grid_gen excercise the 'lake' option. Do you want to add a test for lakes?
A: Lake option for regional is not ready at the moment.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can help with the 'readthedocs'.

One of the regression tests is for a C96 global uniform. That test has the lakes turned off. We can turn on the lakes for that test or add a new global test that uses lakes. We could also test multiple input lake datasets.

In the driver scripts, can you define what the lake source options are? For example, what is 'GLDBV3'? I assume 'VIIRS_GLDBV3' means VIIRS-base GLDBV3. The general user should know what to pick.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In order to get 'readthedocs' to work, please merge the latest updates from 'develop' to your branch.

sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 Show resolved Hide resolved
sorc/orog_mask_tools.fd/lake.fd/lakefrac.F90 Show resolved Hide resolved
@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA Here is the documentation for lake code. Does anything need to be updated now that there are multiple choices of input data?

https://noaa-emcufs-utils.readthedocs.io/en/latest/ufs_utils.html#lakefrac

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA - The updated regression test requires more wall clock time. Can you commit the following scripts from /scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/reg_tests/grid_gen:

  • driver.hera.sh
  • driver.wcoss2.sh
  • driver.jet.sh

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA - The updated regression test requires more wall clock time. Can you commit the following scripts from /scratch2/NCEPDEV/stmp1/George.Gayno/UFS_UTILS.shan/reg_tests/grid_gen:

  • driver.hera.sh
  • driver.wcoss2.sh
  • driver.jet.sh

Done at 3754527. Thanks, @ShanSun-NOAA

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA - Two things, then I can merge:

  1. Merge latest changes from 'develop'.
  2. Update 'readthedocs' (I can help with this).

@barlage
Copy link
Collaborator

barlage commented Oct 27, 2023

@ShanSun-NOAA can you update the latest changes from 'develop' into your branch? You should be able to do this directly from github without any command line interaction (let me know if that isn't correct George). Once you do this, @GeorgeGayno-NOAA can update 'readthedocs'. But from what I understand above, he can't help with readthdocs until this branch is updated with the latest develop.

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA can you update the latest changes from 'develop' into your branch? You should be able to do this directly from github without any command line interaction (let me know if that isn't correct George). Once you do this, @GeorgeGayno-NOAA can update 'readthedocs'. But from what I understand above, he can't help with readthdocs until this branch is updated with the latest develop.

@ShanSun-NOAA readthedocs is broken. So you will need to merge from 'develop' for the fix. Also, I will need to know how you want to update this section for the additional GlobalLake options:
https://noaa-emcufs-utils.readthedocs.io/en/latest/ufs_utils.html#id44

@ShanSunNOAA
Copy link
Contributor

I have updated the latest changes from 'develop' into my branch, directly from github. Thanks for your guidance. Regarding the update for 'readthedocs,' Ning has proposed the following. Please feel free to make any necessary edits. Your assistance with this matter is greatly appreciated.

lake status code file - one of the following files: GlobalLakeStatus_MODISp.dat, GlobalLakeStatus_GLDBv3release.dat, GlobalLakeStatus_VIIRS.dat (specified by the shell variable lake_data_srce and located in ./fix/orog_raw).

lake depth file - one of the following files: GlobalLakeDepth_GLDBv3release.dat, GlobalLakeDepth_GLOBathy.dat (specified by the shell variable lake_data_srce and located in ./fix/orog_raw).


IF (iargc() == 3) THEN
IF (iargc() == 5) THEN
Copy link
Collaborator

Choose a reason for hiding this comment

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

add line after lake_cutoff line:
gridcell_lake = 1

Copy link
Collaborator

Choose a reason for hiding this comment

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

it seems like there is some inconsistency on default values; in some places lake_cutoff = 0.5, in others, lake_cutoff = 0.2; same for binary_lake, in some places it's 1 in others 0

lake_frac(i) = 0.
endif

if (lake_frac(i) < lake_cutoff) lake_frac(i)=0.
Copy link
Collaborator

Choose a reason for hiding this comment

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

add this here:
if (lake_frac(i) >= lake_cutoff .and. gridcell_lake == 1) lake_frac(i)=1.0

@barlage
Copy link
Collaborator

barlage commented Nov 1, 2023

@ShanSun-NOAA can you check what I proposed above? I think we should be able to support both lake methods, i.e.,

  1. lake_cutoff = X, gridcell_lake = 0: remove lakes < X and return lake_fraction between lake_cutoff and 1
  2. lake_cutoff = X, gridcell_lake = 1: remove lakes < X and return lake_fraction = 1 for all remaining lakes

that should give us more flexibility for having both fractional lakes and gridcell lakes

@ShanSunNOAA
Copy link
Contributor

ShanSunNOAA commented Nov 1, 2023 via email

@ShanSunNOAA
Copy link
Contributor

ShanSunNOAA commented Nov 1, 2023 via email

@barlage
Copy link
Collaborator

barlage commented Nov 1, 2023

I have updated the latest changes from 'develop' into my branch, directly from github. Thanks for your guidance. Regarding the update for 'readthedocs,' Ning has proposed the following. Please feel free to make any necessary edits. Your assistance with this matter is greatly appreciated.

lake status code file - one of the following files: GlobalLakeStatus_MODISp.dat, GlobalLakeStatus_GLDBv3release.dat, GlobalLakeStatus_VIIRS.dat (specified by the shell variable lake_data_srce and located in ./fix/orog_raw).

lake depth file - one of the following files: GlobalLakeDepth_GLDBv3release.dat, GlobalLakeDepth_GLOBathy.dat (specified by the shell variable lake_data_srce and located in ./fix/orog_raw).

@ShanSun-NOAA @NingWang325 Don't we still have the option to use GLDBv2 by using GlobalLakeStatus.dat and GlobalLakeDepth.dat ?

@ShanSunNOAA
Copy link
Contributor

With v3, Ning has recommended renaming the file from 'GlobalLakeDepth.dat' to 'GlobalLakeDepth_GLDBv2release.dat' to ensure accuracy. As v3 is a bug-fix version of v2, we have removed v2 from the input list to discourage users from selecting it. However, v2 remains available as an option.

@barlage
Copy link
Collaborator

barlage commented Nov 1, 2023

Let's deal with the v2 issue when we convert to netcdf in the future.

@ShanSunNOAA
Copy link
Contributor

'binary_lake' is added as a namelist. When binary_lake=1 or 0, grid points with '1 > lake_frac >= lake_cutoff' to have lake_frac= 1 or 0.

export lake_cutoff=0.20 # lake frac < lake_cutoff ignored when add_lake=T
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # ignore lake_frac < lake_cutoff when add_lake=T
export binary_lake=1 # return '1 > lake_frac >= lake_cutoff' as 1/0 when binary_lake=1/0
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a little confusing to me; I don't understand the need for "/0"

Copy link
Collaborator

Choose a reason for hiding this comment

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

when binary_lake=1, return lake_frac = 1 when lake_frac >= lake_cutoff

@ShanSunNOAA
Copy link
Contributor

@barlage Thanks for your prompt action and detailed review. I have modified it accordingly.

@GeorgeGayno-NOAA
Copy link
Collaborator

@barlage, have all your comments been addressed?

Copy link
Collaborator

@barlage barlage left a comment

Choose a reason for hiding this comment

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

@ShanSun-NOAA @GeorgeGayno-NOAA looks good to me, thanks for making all the changes Shan

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA @GeorgeGayno-NOAA looks good to me, thanks for making all the changes Shan

I will do a few final checks, then merge (sometime tomorrow).

@GeorgeGayno-NOAA
Copy link
Collaborator

@ShanSun-NOAA The branch would not compile with GNU, so I made a minor update. See 58e25cd.

@ShanSunNOAA
Copy link
Contributor

@GeorgeGayno-NOAA Thanks for your help with GNU.

@GeorgeGayno-NOAA
Copy link
Collaborator

All tests required before merging have passed.

@shansun6, @barlage and @sanatcumar - If there are no further changes, I will merge to develop this afternoon.

@barlage
Copy link
Collaborator

barlage commented Nov 3, 2023

@sanatcumar can you confirm that the tests with @ShanSun-NOAA 's branch are working as expected?

@sanatcumar
Copy link
Collaborator

sanatcumar commented Nov 3, 2023

@sanatcumar can you confirm that the tests with @ShanSun-NOAA 's branch are working as expected?
@barlage @ShanSun-NOAA ,I can compile and ran a few test cases. The new parameters have an effect on the results. I have not visually confirmed if the coastal lake issue issue is fully resolved.
Unrelated to this PR but @ShanSun-NOAA, there is a binary_lake variable in this new branch and there is a logical variable (int_lake) in the old ocean merge code. Are these the same and need to be carried over into the lake merge codes ?

@ShanSunNOAA
Copy link
Contributor

@sanatcumar Yes, they are doing the same thing, except binary_lake is done in lakefrac.F90 when lake frac is first created, and int_lake is done at the post-processing step. Only one of the two methods is necessary.

@sanatcumar
Copy link
Collaborator

@sanatcumar can you confirm that the tests with @ShanSun-NOAA 's branch are working as expected?
Hello All,
I tested two runs of C96 with
[1] lake cutoff =0, binary_lake =0,
[2] lake cutoff =0.5, binary_lake =1,

As expected locations where 0 > lake_frac < 0.5 in [1] are 0 in [2] & locations where lake_frac >= 0.5 in [1] are 1 in [2].

Working as expected.

@GeorgeGayno-NOAA GeorgeGayno-NOAA merged commit dc0e4a6 into ufs-community:develop Nov 6, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants