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

Code update for HR4_roughness #2022

Merged
merged 23 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'develop' into HR4_roughness
  • Loading branch information
grantfirl committed Jan 26, 2024
commit e810db1309a100a9a834d245e762a0501de63136
3 changes: 3 additions & 0 deletions CDEPS-interface/cdeps_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ list(APPEND cdeps_share_files
CDEPS/share/shr_string_mod.F90
CDEPS/share/shr_sys_mod.F90
CDEPS/share/shr_timer_mod.F90
CDEPS/share/shr_file_mod.F90
CDEPS/share/shr_nl_mod.F90
)

list(APPEND cdeps_streams_files
Expand All @@ -46,6 +48,7 @@ list(APPEND cdeps_datm_files
CDEPS/datm/datm_datamode_gfs_mod.F90
CDEPS/datm/datm_datamode_gfs_hafs_mod.F90
CDEPS/datm/datm_datamode_jra_mod.F90
CDEPS/datm/datm_datamode_simple_mod.F90
)

list(APPEND cdeps_dice_files
Expand Down
3 changes: 1 addition & 2 deletions CMEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ set_target_properties(cmeps PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_
target_include_directories(cmeps PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_compile_definitions(cmeps PRIVATE ${CDEPS_SHARE_DEFS})
target_link_libraries(cmeps PUBLIC fms
esmf
target_link_libraries(cmeps PUBLIC esmf
PIO::PIO_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(cmeps PRIVATE OpenMP::OpenMP_Fortran)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if(FMS)
elseif (APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL|NG-GODAS)$")
add_library(fms ALIAS FMS::fms_r8)
endif()
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|LND|HAFS|HAFS-ALL)$")
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|HAFS|HAFS-ALL)$")
if(32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
Expand Down
2 changes: 1 addition & 1 deletion MOM6-interface/MOM6
2 changes: 1 addition & 1 deletion NOAHMP-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ add_library(noahmp STATIC ${_noahmp_cap_files} ${_noahmp_ccpp_files} ${_noahmp_f
set_target_properties(noahmp PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(noahmp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(noahmp PUBLIC esmf fms)
target_link_libraries(noahmp PUBLIC esmf)

###############################################################################
### Install
Expand Down
2 changes: 1 addition & 1 deletion WW3
4 changes: 4 additions & 0 deletions cmake/Intel.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source")

if(CMAKE_Platform STREQUAL "derecho.intel")
set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries")
endif()

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
endif()
Expand Down
3 changes: 1 addition & 2 deletions cmake/configure_apps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if(APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL)$")
set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE)
string(CONCAT APP_MSG ${APP_MSG} " with Waves")
endif()
if(APP MATCHES "^(S2SA|S2SWA)")
if(APP MATCHES "^(S2SA|S2SWA|S2SWAL)")
set(UFS_GOCART ON CACHE BOOL "Enable GOCART" FORCE)
string(CONCAT APP_MSG ${APP_MSG} " with Aerosols")
endif()
Expand Down Expand Up @@ -96,5 +96,4 @@ if(APP MATCHES "^(LND)$")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(CDEPS ON CACHE BOOL "Enable CDEPS" FORCE)
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
endif()
2 changes: 1 addition & 1 deletion tests/bl_date.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export BL_DATE=20240111
export BL_DATE=20240124
8 changes: 7 additions & 1 deletion tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ export CPLICE=.false.
export CPLWAV=.false.
export CPLWAV2ATM=.false.
export CPLLND=.false.
export CPLLND2ATM=.false.
export USE_MED_FLUX=.false.
export DAYS=1
export NPX=97
Expand Down Expand Up @@ -637,6 +638,8 @@ export PRINT_DIFF_PGR=.false.

# Coupling
export coupling_interval_fast_sec=0
export CHOUR=06
export MOM6_OUTPUT_DIR=./MOM6_OUTPUT
}

# Defaults for the CICE6 model namelist, mx100
Expand Down Expand Up @@ -782,6 +785,7 @@ export SYEAR=2021
export SMONTH=03
export SDAY=22
export SHOUR=06
export CHOUR=06
export FHMAX=24
export FHROT=0
export DT_ATMOS=720
Expand Down Expand Up @@ -826,7 +830,7 @@ export FRAC_GRID=.true.
export CCPP_SUITE=FV3_GFS_v17_coupled_p8
export INPUT_NML=cpld_control.nml.IN
export FIELD_TABLE=field_table_thompson_noaero_tke_GOCART
export DIAG_TABLE=diag_table_p8_template
export DIAG_TABLE=diag_table_cpld.IN
export DIAG_TABLE_ADDITIONAL=''

export FHZERO=6
Expand Down Expand Up @@ -1029,6 +1033,7 @@ export FILENAME_BASE=cfsr.
export MESH_ATM=${FILENAME_BASE//.}_mesh.nc
export atm_datamode=${DATM_SRC}
export stream_files=INPUT/${FILENAME_BASE}201110.nc
export EXPORT_ALL=.false.
export STREAM_OFFSET=0

export BL_SUFFIX=""
Expand All @@ -1049,6 +1054,7 @@ export NTILES=1
export atm_model=datm
export DATM_IN_CONFIGURE=datm_in.IN
export DATM_STREAM_CONFIGURE=hafs_datm.streams.era5.IN
export EXPORT_ALL=.false.
}
export_hafs_docn_cdeps ()
{
Expand Down
1 change: 0 additions & 1 deletion tests/fv3_conf/control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ else
cp $RFILE INPUT/${RFILE_NEW}
done
fi

fi

if [ $TILEDFIX = .true. ]; then
Expand Down
5 changes: 5 additions & 0 deletions tests/fv3_conf/cpld_control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ else
cp ../${DEP_RUN}${SUFFIX}/${RFILE} .
fi

# LAND restart file
if [ $CPLLND = .true. ]; then
cp ../${DEP_RUN}${SUFFIX}/ufs.cpld.lnd.out.${RESTART_FILE_SUFFIX_SECS}.tile*.nc RESTART/.
fi

else
# C48mx500 warm start from ICs
cp ${FV3_IC}/*.nc ./INPUT
Expand Down
22 changes: 22 additions & 0 deletions tests/fv3_conf/lnd_datm_cdeps_era5.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
mkdir -p RESTART INPUT

cd INPUT
rsync -arv @[INPUTDATA_ROOT]/DATM_ERA5_input_data_v2/. .
cd -

SUFFIX=${RT_SUFFIX}
# restart
if [ $WARM_START = .true. ]; then
# NoahMP restart files
cp ../${DEP_RUN}${SUFFIX}/ufs.cpld.lnd.out.${RESTART_FILE_SUFFIX_SECS}.tile*.nc RESTART/.

# CMEPS restart and pointer files
RFILE1=ufs.cpld.cpl.r.${RESTART_FILE_SUFFIX_SECS}.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/${RFILE1} RESTART/.
ls -1 "RESTART/${RFILE1}">rpointer.cpl

# CDEPS restart and pointer files
RFILE2=ufs.cpld.datm.r.${RESTART_FILE_SUFFIX_SECS}.nc
cp ../${DEP_RUN}${SUFFIX}/${RFILE2} RESTART/.
ls -1 "RESTART/${RFILE2}">rpointer.atm
fi
84 changes: 61 additions & 23 deletions tests/fv3_conf/noahmp_run.IN
Original file line number Diff line number Diff line change
@@ -1,26 +1,64 @@
mkdir -p INPUT RESTART

cd INPUT
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile1.nc C96.initial.tile1.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile2.nc C96.initial.tile2.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile3.nc C96.initial.tile3.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile4.nc C96.initial.tile4.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile5.nc C96.initial.tile5.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/ufs-land_C96_init_fields.tile6.nc C96.initial.tile6.nc
if [ "$LNDRES" = "C96" ]; then
inputdir=FV3_input_data
elif [ "$LNDRES" = "C48" ]; then
inputdir=FV3_input_data48
elif [ "$LNDRES" = "C192" ]; then
inputdir=FV3_input_data192
elif [ "$LNDRES" = "C384" ]; then
inputdir=FV3_input_data384
elif [ "$LNDRES" = "C768" ]; then
inputdir=FV3_input_data768
fi
echo "inputdir=$inputdir,LNDRES=$LNDRES"

rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.maximum_snow_albedo.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.slope_type.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.soil_type.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.soil_color.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.substrate_temperature.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.vegetation_greenness.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/C96.vegetation_type.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile1.nc oro_data.tile1.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile2.nc oro_data.tile2.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile3.nc oro_data.tile3.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile4.nc oro_data.tile4.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile5.nc oro_data.tile5.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/C96/oro_C96.mx100.tile6.nc oro_data.tile6.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_input_data/INPUT/C96_grid.tile*.nc .
rsync -arv @[INPUTDATA_ROOT]/FV3_input_data/INPUT/grid_spec.nc C96_mosaic.nc
cd -
if [ $DATM_CDEPS == true ]; then
targetdir="./INPUT"
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile1.nc ./${targetdir}/@[LNDRES].initial.tile1.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile2.nc ./${targetdir}/@[LNDRES].initial.tile2.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile3.nc ./${targetdir}/@[LNDRES].initial.tile3.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile4.nc ./${targetdir}/@[LNDRES].initial.tile4.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile5.nc ./${targetdir}/@[LNDRES].initial.tile5.nc
rsync -arv @[INPUTDATA_ROOT]/NOAHMP_IC/$atm_datamode/ufs-land_@[LNDRES]_init_fields.tile6.nc ./${targetdir}/@[LNDRES].initial.tile6.nc
else
if [ "$ATMRES" = "$LNDRES" ]; then
targetdir="./INPUT"
cd ${targetdir}
ln -sf grid_spec.nc @[LNDRES]_mosaic.nc
cd -
else
mkdir -p INPUT/$LNDRES
targetdir="./INPUT/$LNDRES"
fi

if [ $WARM_START = .false. ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127/sfc_data.tile*.nc ${targetdir}/.
else
# land restart file
cp ../${DEP_RUN}${SUFFIX}/ufs.cpld.lnd.out.${RESTART_FILE_SUFFIX_SECS}.tile*.nc RESTART/.
# CMEPS restart and pointer files
RFILE=ufs.cpld.cpl.r.${RESTART_FILE_SUFFIX_SECS}.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/${RFILE} .
ls -1 ${RFILE}>rpointer.cpl
# link grid spec file
fi
fi

if [ "$ATMRES" != "$LNDRES" ]; then
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].maximum_snow_albedo.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].slope_type.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].soil_type.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].soil_color.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].substrate_temperature.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].vegetation_greenness.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/@[LNDRES].vegetation_type.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile1.nc ${targetdir}/oro_data.tile1.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile2.nc ${targetdir}/oro_data.tile2.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile3.nc ${targetdir}/oro_data.tile3.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile4.nc ${targetdir}/oro_data.tile4.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile5.nc ${targetdir}/oro_data.tile5.nc
rsync -arv @[INPUTDATA_ROOT]/FV3_fix_tiled/@[LNDRES]/oro_@[LNDRES].mx*.tile6.nc ${targetdir}/oro_data.tile6.nc
rsync -arv @[INPUTDATA_ROOT]/${inputdir}/INPUT/@[LNDRES]_grid.tile*.nc ${targetdir}/.
rsync -arv @[INPUTDATA_ROOT]/${inputdir}/INPUT/grid_spec.nc ${targetdir}/@[LNDRES]_mosaic.nc
fi
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.