From 2ed2c79c2e14da2ac168b51eba39b397d007a076 Mon Sep 17 00:00:00 2001 From: GeorgeGayno-NOAA <52789452+GeorgeGayno-NOAA@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:48:17 -0400 Subject: [PATCH] New BNU soil type and VIIRS vegetation type data (#843) Updates to use new versions of the BNU and VIIRS data with spurious ice points in the tropics removed, and a new higher-res (0.5-degree) version of the GFS soil substrate data. Fixes #821 Fixes #803 --- docs/source/ufs_utils.rst | 11 +++----- driver_scripts/driver_grid.hera.sh | 15 ++++------- driver_scripts/driver_grid.jet.sh | 21 ++++++--------- driver_scripts/driver_grid.orion.sh | 21 ++++++--------- driver_scripts/driver_grid.wcoss2.sh | 19 +++++-------- fix/link_fixdirs.sh | 2 +- .../{c96.viirs.vegt.sh => c96.viirs.bnu.sh} | 23 ++++++++-------- reg_tests/grid_gen/driver.hera.sh | 6 ++--- reg_tests/grid_gen/driver.jet.sh | 6 ++--- reg_tests/grid_gen/driver.orion.sh | 6 ++--- reg_tests/grid_gen/driver.wcoss2.sh | 6 ++--- sorc/sfc_climo_gen.fd/search.f90 | 2 +- sorc/sfc_climo_gen.fd/source_grid.F90 | 21 +++++++++++---- ush/sfc_climo_gen.sh | 2 +- util/sfc_climo_gen/sfc_gen.sh | 27 +++++++++---------- 15 files changed, 86 insertions(+), 102 deletions(-) rename reg_tests/grid_gen/{c96.viirs.vegt.sh => c96.viirs.bnu.sh} (69%) diff --git a/docs/source/ufs_utils.rst b/docs/source/ufs_utils.rst index ef50d2838..314c179b9 100644 --- a/docs/source/ufs_utils.rst +++ b/docs/source/ufs_utils.rst @@ -528,7 +528,7 @@ The surface climatological data is located here `./fix/fix_sfc_climo >>" + echo "<<< C96 VIIRS BNU TEST FAILED. >>>" if [ "$UPDATE_BASELINE" = "TRUE" ]; then - $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "c96.viirs.vegt" $commit_num + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "c96.viirs.bnu" $commit_num fi else - echo "<<< C96 VIIRS VEGT TEST PASSED. >>>" + echo "<<< C96 VIIRS BNU TEST PASSED. >>>" fi exit 0 diff --git a/reg_tests/grid_gen/driver.hera.sh b/reg_tests/grid_gen/driver.hera.sh index ef3b37b1c..c0211cc73 100755 --- a/reg_tests/grid_gen/driver.hera.sh +++ b/reg_tests/grid_gen/driver.hera.sh @@ -70,12 +70,12 @@ TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:10:00 -A $PROJECT_ -o $LOG_FILE1 -e $LOG_FILE1 ./c96.uniform.sh) #----------------------------------------------------------------------------- -# C96 uniform grid using viirs vegetation data. +# C96 uniform grid using viirs vegetation and bnu soil data. #----------------------------------------------------------------------------- LOG_FILE2=${LOG_FILE}02 -TEST2=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.vegt \ - -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.vegt.sh) +TEST2=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.bnu \ + --partition=bigmem -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.bnu.sh) #----------------------------------------------------------------------------- # gfdl regional grid diff --git a/reg_tests/grid_gen/driver.jet.sh b/reg_tests/grid_gen/driver.jet.sh index 2d3f5fcfc..6641098bc 100755 --- a/reg_tests/grid_gen/driver.jet.sh +++ b/reg_tests/grid_gen/driver.jet.sh @@ -68,12 +68,12 @@ TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:10:00 -A $PROJECT_ --partition=xjet -o $LOG_FILE1 -e $LOG_FILE1 ./c96.uniform.sh) #----------------------------------------------------------------------------- -# C96 uniform grid using viirs vegetation type data. +# C96 uniform grid using viirs vegetation type and bnu soil type data. #----------------------------------------------------------------------------- LOG_FILE2=${LOG_FILE}02 -TEST2=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.vegt \ - --partition=xjet -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.vegt.sh) +TEST2=$(sbatch --parsable --ntasks-per-node=10 --nodes=3 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.bnu \ + --partition=xjet -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.bnu.sh) #----------------------------------------------------------------------------- # gfdl regional grid diff --git a/reg_tests/grid_gen/driver.orion.sh b/reg_tests/grid_gen/driver.orion.sh index a3a60e678..9a50ae251 100755 --- a/reg_tests/grid_gen/driver.orion.sh +++ b/reg_tests/grid_gen/driver.orion.sh @@ -66,12 +66,12 @@ TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:15:00 -A $PROJECT_ -o $LOG_FILE1 -e $LOG_FILE1 ./c96.uniform.sh) #----------------------------------------------------------------------------- -# C96 uniform grid using viirs vegetation type data. +# C96 uniform grid using viirs vegetation and bnu soil type data. #----------------------------------------------------------------------------- LOG_FILE2=${LOG_FILE}02 -TEST2=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.vegt \ - -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.vegt.sh) +TEST2=$(sbatch --parsable --ntasks-per-node=15 --nodes=2 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.bnu \ + -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.bnu.sh) #----------------------------------------------------------------------------- # GFDL regional grid diff --git a/reg_tests/grid_gen/driver.wcoss2.sh b/reg_tests/grid_gen/driver.wcoss2.sh index da8b9d0ed..398765e1c 100755 --- a/reg_tests/grid_gen/driver.wcoss2.sh +++ b/reg_tests/grid_gen/driver.wcoss2.sh @@ -71,12 +71,12 @@ TEST1=$(qsub -V -o $LOG_FILE1 -e $LOG_FILE1 -q $QUEUE -A $PROJECT_CODE -l wallti -N c96.uniform -l select=1:ncpus=30:mem=40GB $PWD/c96.uniform.sh) #----------------------------------------------------------------------------- -# C96 uniform grid using viirs vegetation data. +# C96 uniform grid using viirs vegetation and bnu soil type data. #----------------------------------------------------------------------------- LOG_FILE2=${LOG_FILE}02 -TEST2=$(qsub -V -o $LOG_FILE2 -e $LOG_FILE2 -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \ - -N c96.viirs.vegt -l select=1:ncpus=30:mem=40GB $PWD/c96.viirs.vegt.sh) +TEST2=$(qsub -V -o $LOG_FILE2 -e $LOG_FILE2 -q $QUEUE -A $PROJECT_CODE -l walltime=00:15:00 \ + -N c96.viirs.bnu -l select=1:ncpus=30:mem=250GB $PWD/c96.viirs.bnu.sh) #----------------------------------------------------------------------------- # gfdl regional grid diff --git a/sorc/sfc_climo_gen.fd/search.f90 b/sorc/sfc_climo_gen.fd/search.f90 index d5b44ebe6..0de2b5817 100644 --- a/sorc/sfc_climo_gen.fd/search.f90 +++ b/sorc/sfc_climo_gen.fd/search.f90 @@ -76,7 +76,7 @@ subroutine search (field, mask, idim, jdim, tile, field_name) case ('vegetation_type') ! vegetation type default_value = float(3) case default - print*,'- FATAL ERROR IN ROUTINE SEARCH. UNIDENTIFIED FIELD : ', field + print*,'- FATAL ERROR IN ROUTINE SEARCH. UNIDENTIFIED FIELD : ', field_name call mpi_abort(mpi_comm_world, 77, ierr) end select diff --git a/sorc/sfc_climo_gen.fd/source_grid.F90 b/sorc/sfc_climo_gen.fd/source_grid.F90 index d9abacd34..31f0b00e0 100644 --- a/sorc/sfc_climo_gen.fd/source_grid.F90 +++ b/sorc/sfc_climo_gen.fd/source_grid.F90 @@ -59,6 +59,7 @@ subroutine define_source_grid(localpet, npets, input_file) integer, intent(in) :: localpet, npets + character(len=50) :: field_names_save(100) character(len=50) :: vname integer :: dimid, dims(1), ncid, status @@ -160,10 +161,9 @@ subroutine define_source_grid(localpet, npets, input_file) ! number of variables minus 5. !----------------------------------------------------------------------- - num_fields = num_vars - 5 - num_records = num_vars * num_time_recs - - allocate(field_names(num_fields)) +! NOTE: the new BNU soil type data contains extra records for +! sand and clay percentages. These extra records are not need yet, +! so add logic to temporarily ignore them. count = 0 do n = 1, num_vars @@ -176,12 +176,23 @@ subroutine define_source_grid(localpet, npets, input_file) if (trim(vname) == 'lon_corner') cycle if (trim(vname) == 'lat') cycle if (trim(vname) == 'lat_corner') cycle + if (trim(vname) == 'clay_lev1') cycle + if (trim(vname) == 'clay_top') cycle + if (trim(vname) == 'sand_lev1') cycle + if (trim(vname) == 'sand_top') cycle count = count + 1 - field_names(count) = vname + field_names_save(count) = vname enddo + num_fields = count + num_records = num_vars * num_time_recs + + allocate(field_names(num_fields)) + + field_names = field_names_save(1:num_fields) + if(localpet==0) print*,'- FIELDS TO BE PROCESSED: ', field_names if (localpet == 0) then diff --git a/ush/sfc_climo_gen.sh b/ush/sfc_climo_gen.sh index 020ec0d13..63bedb3e5 100755 --- a/ush/sfc_climo_gen.sh +++ b/ush/sfc_climo_gen.sh @@ -70,7 +70,7 @@ fi cat << EOF > ./fort.41 &config input_facsf_file="${input_sfc_climo_dir}/facsf.1.0.nc" -input_substrate_temperature_file="${input_sfc_climo_dir}/substrate_temperature.2.6x1.5.nc" +input_substrate_temperature_file="${input_sfc_climo_dir}/substrate_temperature.gfs.0.5.nc" input_maximum_snow_albedo_file="${input_sfc_climo_dir}/maximum_snow_albedo.0.05.nc" input_snowfree_albedo_file="${input_sfc_climo_dir}/snowfree_albedo.4comp.0.05.nc" input_slope_type_file="${input_sfc_climo_dir}/slope_type.1.0.nc" diff --git a/util/sfc_climo_gen/sfc_gen.sh b/util/sfc_climo_gen/sfc_gen.sh index 9ba7b747c..cdde11640 100755 --- a/util/sfc_climo_gen/sfc_gen.sh +++ b/util/sfc_climo_gen/sfc_gen.sh @@ -39,12 +39,7 @@ # # veg_type_src - Input vegetation type data. Choices are: # For viirs-based vegetation type data, set to: -# - "viirs.igbp.0.1" for global 0.10-deg data -# - "viirs.igbp.0.05" for global 0.05-deg data -# - "viirs.igbp.0.03" for global 0.03-deg data -# - "viirs.igbp.conus.30s" for CONUS 30s data -# - "viirs.igbp.nh.30s" for NH 30s data -# - "viirs.igbp.30s" for global 30s data +# - "viirs.v3.igbp.30s" for global 30s data # For the modis-based vegetation data, set to: # - "modis.igbp.0.05" for global 0.05-deg data # - "modis.igbp.0.03" for global 0.03-deg data @@ -53,14 +48,14 @@ # - "modis.igbp.30s" for global 30s data # # soil_type_src - Input soil type data. Choices are: +# For Beijing Norm. Univ. soil type data +# - "bnu.v3.30s" for global 30s data # For STATSGO soil type data # - "statsgo.0.05" for global 0.05-deg data # - "statsgo.0.03" for global 0.03-deg data # - "statsgo.conus.30s" for CONUS 30s data # - "statsgo.nh.30s" for NH 30s data # - "statsgo.30s" for global 30s data -# For Beijing Norm. Univ. soil type data -# - "bnu.30s" for global 30s data # # vegsoilt_frac - When .true., output the fraction of each # vegetation and soil type and the dominant @@ -70,23 +65,25 @@ set -x -#export res=96 -export res=96.mx100 +export res=768.mx025 #HALO=4 #export GRIDTYPE=regional #FIX_REG=/lfs/h2/emc/stmp/$LOGNAME/fix.reg -export veg_type_src="modis.igbp.0.05" +export veg_type_src="viirs.v3.igbp.30s" -export soil_type_src="statsgo.0.05" +export soil_type_src="bnu.v3.30s" -export WORK_DIR=/lfs/h2/emc/stmp/$LOGNAME/work.sfc -export SAVE_DIR=/lfs/h2/emc/stmp/$LOGNAME/sfc.C${res} +export WORK_DIR=/scratch1/NCEPDEV/stmp2/$LOGNAME/work.sfc +export SAVE_DIR=/scratch1/NCEPDEV/stmp2/$LOGNAME/sfc.C${res} export FIX_FV3=${BASE_DIR}/fix/orog/C${res} -export vegsoilt_frac=.true. +# Requires much more resources when true. On hera, use 6 nodes, +# 12 tasks per node. On WCOSS2, use 5 nodes, 12 tasks per node. + +export vegsoilt_frac=.false. #------------------------------------------------------------------------ #------------------------------------------------------------------------