Skip to content

Commit d57fb14

Browse files
authored
Merge branch 'develop' into feature/zhaobin74/merge-main-post650
2 parents e628943 + aea9319 commit d57fb14

File tree

8 files changed

+52
-14
lines changed

8 files changed

+52
-14
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/GEOS_SurfaceGridComp.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
# - backfilled with global land average snow albedo where unavailable
121121
# - must use compatible bcs version that includes MODIS-based snow albedo (e.g., v06, v08, v09, ...)
122122
# - NOTE: bcs v06, v08, and v09 used approximate averaging of MODIS-based snow albedo to tile space;
123-
# later bcs versions employ more accurate, raster-based averaging
123+
# bcs v11 and v12 employ more accurate, raster-based averaging.
124124
#
125125
# GEOSagcm=>SNOW_ALBEDO_INFO: 0
126126
# GEOSldas=>SNOW_ALBEDO_INFO: 0

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ ecbuild_add_executable (TARGET mkEASETilesParam.x SOURCES mkEASETilesParam.F90 L
5151

5252
install(PROGRAMS clsm_plots.pro create_README.csh DESTINATION bin)
5353
file(GLOB MAKE_BCS_PYTHON CONFIGURE_DEPENDS "./make_bcs*.py")
54+
list(FILTER MAKE_BCS_PYTHON EXCLUDE REGEX "make_bcs_shared.py")
5455
install(PROGRAMS ${MAKE_BCS_PYTHON} DESTINATION bin)
56+
57+
set(file ./make_bcs_shared.py)
58+
configure_file(${file} ${file} @ONLY)
59+
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION bin)

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/create_README.csh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ APPENDIX I - mkCatchParam input options and log ................................
620620
file name: soil_param.dat
621621
do n = 1, ${NTILES}
622622
_EOI_
623-
if( $mysoil == HWSD ) then
623+
if( $mysoil == HWSD || $mysoil == HWSD_b ) then
624624
cat << _EOS1_ > clsm/soil
625625
read ([UNIT],'(i10,i8,i4,i4,3f8.4,f12.8,f7.4,f10.4,3f7.3,4f7.3,2f10.4, f8.4)') &
626626
tile_index, pfaf_code, soil_class_top, soil_class_com, BEE, &

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_questionary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def ask_questions(default_grid="Cubed-Sphere"):
194194
"v09 : NL3 + PEATMAP + MODIS snow alb", \
195195
"v10 : NL3 + PEATMAP + MODIS snow alb v2", \
196196
"v11 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2", \
197+
"v12 : NL3 + JPL veg height + PEATMAP + MODIS snow alb v2 + Argentina peatland fix", \
197198
"ICA : Icarus (archived*: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus/)", \
198199
"GM4 : Ganymed-4_0 (archived*: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Ganymed-4_0/)", \
199200
"F25 : Fortuna-2_5 (archived*: n/a)"],

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_shared.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55
import os
66
import glob
77

8+
BUILT_ON_SLES15 = "@BUILT_ON_SLES15@"
89
def get_script_head() :
910

10-
return """#!/bin/csh -x
11+
head = """#!/bin/csh -x
1112
1213
#SBATCH --output={EXPDIR}/{TMP_DIR}/logs/{GRIDNAME}/{GRIDNAME2}.log
1314
#SBATCH --error={EXPDIR}/{TMP_DIR}/logs/{GRIDNAME}/{GRIDNAME2}.err
1415
#SBATCH --account={account}
1516
#SBATCH --time=12:00:00
1617
#SBATCH --nodes=1
1718
#SBATCH --job-name={GRIDNAME2}.j
18-
#SBATCH --constraint=sky|cas
19+
"""
20+
constraint = "#SBATCH --constraint=sky|cas"
21+
if BUILT_ON_SLES15 :
22+
constraint = "#SBATCH --constraint=mil"
1923

24+
head = head + constraint + """
2025
echo "-----------------------------"
2126
echo "make_bcs starts date/time"
2227
echo `date`
@@ -37,6 +42,7 @@ def get_script_head() :
3742
mkdir -p geometry land/shared til rst data/MOM5 data/MOM6 clsm/plots
3843
endif
3944
"""
45+
return head
4046

4147
def get_change_til_file(grid_type):
4248
script = ""
@@ -116,6 +122,11 @@ def get_script_mv(grid_type):
116122
/bin/mv clsm/lnfm.dat land/{GRIDNAME}/lnfm_clim_{RC}.data
117123
/bin/mv clsm/ndvi.dat land/{GRIDNAME}/ndvi_clim_{RC}.data
118124
125+
# vegdyn_{RC}.dat file is nc4; for clarification, create link with proper file name extension
126+
cd land/{GRIDNAME}
127+
ln -s vegdyn_{RC}.dat vegdyn_{RC}.nc4
128+
cd ../../
129+
119130
/bin/mv clsm/ar.new \\
120131
clsm/bf.dat \\
121132
clsm/ts.dat \\

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/mkCatchParam.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ PROGRAM mkCatchParam
545545
! this block is for n_threads>1
546546
!==============================
547547

548-
if(SOILBCS=='NGDC') then
548+
if(trim(SOILBCS)=='NGDC') then
549549
write (log_file,'(a)')'Creating (intermediate) NGDC soil types file...'
550550
call create_soil_types_files (nc,nr,ease_grid,fnameTil,fnameRst)
551551
write (log_file,'(a)')' Done.'
@@ -562,11 +562,11 @@ PROGRAM mkCatchParam
562562
inquire(file=trim(fname_tmp), exist=file_exists)
563563
if (.not.file_exists) then
564564
write (log_file,'(a)')' Creating file...'
565-
if(SOILBCS=='NGDC') then
565+
if(trim(SOILBCS)=='NGDC') then
566566
if( F25Tag) call soil_para_high (nc,nr,regrid,fnameRst,F25Tag=F25Tag)
567567
if(.not.F25Tag) call soil_para_high (nc,nr,regrid,fnameRst)
568568
endif
569-
if(SOILBCS=='HWSD') call soil_para_hwsd (nc,nr,fnameRst)
569+
if(SOILBCS(1:4)=='HWSD') call soil_para_hwsd (nc,nr,fnameRst)
570570
write (log_file,'(a)')' Done.'
571571
else
572572
write (log_file,'(a,a)')' Using existing file.'
@@ -586,8 +586,8 @@ PROGRAM mkCatchParam
586586
inquire(file=trim(fname_tmp4), exist=file_exists4)
587587
if ((.not.file_exists).or.(.not.file_exists2).or.(.not.file_exists3).or.(.not.file_exists4)) then
588588
write (log_file,'(a)')' Creating files...'
589-
if(SOILBCS=='NGDC') call create_model_para (MaskFile)
590-
if(SOILBCS=='HWSD') call create_model_para_woesten (MaskFile)
589+
if(trim(SOILBCS)=='NGDC') call create_model_para( MaskFile)
590+
if(SOILBCS(1:4) =='HWSD') call create_model_para_woesten(MaskFile)
591591
write (log_file,'(a)')' Done.'
592592
else
593593
write (log_file,'(a,a)')' Using existing files.'

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/mod_process_hres_data.F90

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3608,7 +3608,7 @@ SUBROUTINE soil_para_hwsd (nx,ny,fnameRst)
36083608
character*100 :: fout
36093609
character*200 :: fname
36103610
character*10 :: string
3611-
character*2 :: VV,HH
3611+
character*2 :: VV,HH, tmpversion
36123612

36133613
logical, allocatable, dimension(:,:) :: land_pixels
36143614
integer, allocatable, dimension (:,:) :: &
@@ -3869,7 +3869,16 @@ SUBROUTINE soil_para_hwsd (nx,ny,fnameRst)
38693869
! get info common to all H[xx]V[yy] rectangles (could in theory differ from that
38703870
! of soildepth data read above but is the same as of 29 Apr 2022).
38713871

3872-
fname =trim(MAKE_BCS_INPUT_DIR)//'/land/soil/SOIL-DATA/soil_properties/v2/SoilProperties_H11V13.nc'
3872+
if (trim(SOILBCS)=='HWSD_b') then
3873+
tmpversion = 'v3'
3874+
else if (trim(SOILBCS)=='HWSD') then
3875+
tmpversion = 'v2'
3876+
else
3877+
print *, 'Unknown SOILBCS: ', SOILBCS
3878+
stop
3879+
end if
3880+
3881+
fname =trim(MAKE_BCS_INPUT_DIR)//'/land/soil/SOIL-DATA/soil_properties/' // tmpversion // '/SoilProperties_H11V13.nc'
38733882
status = NF_OPEN(trim(fname),NF_NOWRITE, ncid); VERIFY_(STATUS)
38743883
!status = NF_GET_att_INT(ncid,NF_GLOBAL,'i_ind_offset_LL',iLL); VERIFY_(STATUS) ! cannot be needed here
38753884
!status = NF_GET_att_INT(ncid,NF_GLOBAL,'j_ind_offset_LL',jLL); VERIFY_(STATUS) ! cannot be needed here
@@ -3925,7 +3934,7 @@ SUBROUTINE soil_para_hwsd (nx,ny,fnameRst)
39253934
do ix = 1,36
39263935
write (vv,'(i2.2)')jx
39273936
write (hh,'(i2.2)')ix
3928-
fname = trim(MAKE_BCS_INPUT_DIR)//'/land/soil/SOIL-DATA/soil_properties/v2/SoilProperties_H'//hh//'V'//vv//'.nc'
3937+
fname = trim(MAKE_BCS_INPUT_DIR)//'/land/soil/SOIL-DATA/soil_properties/' // tmpversion // '/SoilProperties_H'//hh//'V'//vv//'.nc'
39293938
status = NF_OPEN(trim(fname),NF_NOWRITE, ncid)
39303939
if(status == 0) then
39313940
status = NF_GET_att_INT (ncid, NF_GLOBAL,'i_ind_offset_LL',iLL); VERIFY_(STATUS)

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/rmTinyCatchParaMod.F90

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ SUBROUTINE init_bcs_config (LBCSV)
8787
! MODC061 : Static snow albedo derived from MODIS Collection 6.1 data where available, fill value of 0.56 elsewhere.
8888
! MODC061v2 : Same as MODC061 but using tile ID instead of tile bounding box for mapping from raster to tile.
8989
!
90-
! SOILBCS: Soil parameter data. DEFAULT : HWSD
91-
! HWSD : Merged HWSD-STATSGO2 soil properties on 43200x21600 with Woesten et al. (1999) parameters
90+
! SOILBCS: Soil parameter data. DEFAULT : HWSD
91+
! NGDC : Soil parameters from Reynolds et al. 2000, doi:10.1029/2000WR900130 (MERRA-2, Fortuna, Ganymed, Icarus)
92+
! HWSD : Merged HWSDv1.21-STATSGO2 soil properties on 43200x21600 with Woesten et al. (1999) parameters
93+
! HWSD_b : As in HWSD but with surgical fix of Argentina peatland issue (38S,60W)
9294

9395
implicit none
9496

@@ -194,6 +196,16 @@ SUBROUTINE init_bcs_config (LBCSV)
194196
GNU = 1.0
195197
use_PEATMAP = .true.
196198
jpl_height = .true.
199+
200+
case ("v12")
201+
LAIBCS = 'MODGEO'
202+
SOILBCS = 'HWSD_b'
203+
MODALB = 'MODIS2'
204+
SNOWALB = 'MODC061v2'
205+
GNU = 1.0
206+
use_PEATMAP = .true.
207+
jpl_height = .true.
208+
197209
case default
198210

199211
print *,'init_bcs_config(): unknown land boundary conditions version (LBCSV)'

0 commit comments

Comments
 (0)