From 3090901b18a01fea1d46b9f6d7b6a1f11d76bbf0 Mon Sep 17 00:00:00 2001 From: "Chan-Hoo.Jeon-NOAA" <60152248+chan-hoo@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:04:41 -0400 Subject: [PATCH] Remove land driver and vector2tile (#129) * remove ufsLand and vector2tile * update ctest * update cmakelists * update ex-scripts * remove forcing parm * remove exp_name * remove unnecessary templates * remove scheduler * remove pathrt from parm yaml * revive scheduler * change ctest list * update ctest script * fix ctest jedi_incr script * update pr template * clean up comments --- .github/pull_request_template.md | 3 - .gitmodules | 8 -- parm/land_analysis_hera.yaml | 19 +-- parm/land_analysis_orion.yaml | 19 +-- parm/run_without_rocoto.sh | 116 ------------------ parm/templates/template.tile2vector | 52 -------- .../template.ufs-noahMP.namelist.era5 | 95 -------------- parm/templates/template.vector2tile | 52 -------- scripts/exlandda_forecast.sh | 19 ++- scripts/exlandda_post_anal.sh | 88 ++----------- scripts/exlandda_pre_anal.sh | 72 ++--------- scripts/exlandda_prep_obs.sh | 16 +-- sorc/CMakeLists.txt | 2 - sorc/app_build.sh | 8 -- sorc/test/CMakeLists.txt | 20 +-- sorc/test/apply_jedi_incr.sh | 2 +- sorc/test/create_bkg_ens.sh | 55 ++++----- sorc/test/runtime_vars.sh | 4 +- sorc/test/test_letkfoi_snowda.sh | 30 ++--- sorc/test/test_vector2tile.sh | 101 --------------- sorc/test/testinput/template.vector2tile | 52 -------- sorc/ufsLand.fd | 1 - sorc/vector2tile_converter.fd | 1 - 23 files changed, 96 insertions(+), 739 deletions(-) delete mode 100755 parm/run_without_rocoto.sh delete mode 100644 parm/templates/template.tile2vector delete mode 100644 parm/templates/template.ufs-noahMP.namelist.era5 delete mode 100644 parm/templates/template.vector2tile delete mode 100755 sorc/test/test_vector2tile.sh delete mode 100644 sorc/test/testinput/template.vector2tile delete mode 160000 sorc/ufsLand.fd delete mode 160000 sorc/vector2tile_converter.fd diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 32f79a4c..4ff695a8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,9 +8,7 @@ Provide a detailed description of what this PR does. What bug does it fix, or wh ## Subcomponents involved: - [ ] apply_incr.fd (NOAA-PSL/land-apply_jedi_incr) -- [ ] ufsLand.fd (NOAA-EPIC/ufs-land-driver-emc-dev) - [ ] ufs_model.fd (ufs-community/ufs-weather-model) -- [ ] vector2tile_converter.fd (NOAA-PSL/land-vector2tile) - [ ] none ## Linked PR's and Issues: @@ -27,7 +25,6 @@ EXAMPLE: Closes ufs-community/land-DA/issues/ - [ ] Hera - [ ] Orion - [ ] Hercules - - [ ] Derecho - CI - [ ] Completed - PW-Clouds diff --git a/.gitmodules b/.gitmodules index 24058bb6..f0489a28 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,3 @@ -[submodule "sorc/ufsLand.fd"] - path = sorc/ufsLand.fd - url = https://github.com/NOAA-EPIC/ufs-land-driver-emc-dev.git - ignore = dirty -[submodule "sorc/vector2tile_converter.fd"] - path = sorc/vector2tile_converter.fd - url = https://github.com/NOAA-PSL/land-vector2tile.git - ignore = dirty [submodule "sorc/ufs_model.fd"] path = sorc/ufs_model.fd url = https://github.com/ufs-community/ufs-weather-model.git diff --git a/parm/land_analysis_hera.yaml b/parm/land_analysis_hera.yaml index 27de9212..3c4df259 100644 --- a/parm/land_analysis_hera.yaml +++ b/parm/land_analysis_hera.yaml @@ -13,11 +13,10 @@ workflow: MACHINE: "hera" SCHED: "slurm" ACCOUNT: "epic" - EXP_NAME: "LETKF" EXP_BASEDIR: "/scratch2/NAGAPE/epic/{USER}/landda_test" JEDI_INSTALL: "/scratch2/NAGAPE/epic/UFS_Land-DA_Dev/jedi_v7" WARMSTART_DIR: "/scratch2/NAGAPE/epic/UFS_Land-DA_Dev/inputs/DATA_RESTART" - FORCING: "gswp3" # "gswp3" or "era5" + ATMOS_FORC: "gswp3" RES: "96" FCSTHR: "24" NPROCS_ANALYSIS: "6" @@ -37,9 +36,8 @@ workflow: COMROOT: "&PTMP;/&envir;/com" DATAROOT: "&PTMP;/&envir;/tmp" KEEPDATA: "YES" - LOGDIR: "&COMROOT;/output/logs/run_&FORCING;" + LOGDIR: "&COMROOT;/output/logs" LOGFN_SUFFIX: "_@Y@m@d@H.log" - PATHRT: "&EXP_BASEDIR;" PDY: "@Y@m@d" cyc: "@H" DATADEP_FILE1: "&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc" @@ -59,8 +57,7 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" + ATMOS_FORC: "&ATMOS_FORC;" model_ver: "&model_ver;" HOMElandda: "&HOMElandda;" COMROOT: "&COMROOT;" @@ -83,8 +80,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" WARMSTART_DIR: "&WARMSTART_DIR;" @@ -130,8 +125,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" model_ver: "&model_ver;" @@ -164,8 +157,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" model_ver: "&model_ver;" @@ -196,7 +187,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" model_ver: "&model_ver;" RUN: "&RUN;" HOMElandda: "&HOMElandda;" @@ -225,8 +215,7 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" + ATMOS_FORC: "&ATMOS_FORC;" RES: "&RES;" WARMSTART_DIR: "&WARMSTART_DIR;" model_ver: "&model_ver;" diff --git a/parm/land_analysis_orion.yaml b/parm/land_analysis_orion.yaml index bf1ea44f..e46d2750 100644 --- a/parm/land_analysis_orion.yaml +++ b/parm/land_analysis_orion.yaml @@ -13,11 +13,10 @@ workflow: MACHINE: "orion" SCHED: "slurm" ACCOUNT: "epic" - EXP_NAME: "LETKF" EXP_BASEDIR: "/work/noaa/epic/{USER}/landda_test" JEDI_INSTALL: "/work/noaa/epic/UFS_Land-DA_Dev/jedi_v7_stack1.6" WARMSTART_DIR: "/work/noaa/epic/UFS_Land-DA_Dev/inputs/DATA_RESTART" - FORCING: "gswp3" # "gswp3" or "era5" + ATMOS_FORC: "gswp3" RES: "96" FCSTHR: "24" NPROCS_ANALYSIS: "6" @@ -37,9 +36,8 @@ workflow: COMROOT: "&PTMP;/&envir;/com" DATAROOT: "&PTMP;/&envir;/tmp" KEEPDATA: "YES" - LOGDIR: "&COMROOT;/output/logs/run_&FORCING;" + LOGDIR: "&COMROOT;/output/logs" LOGFN_SUFFIX: "_@Y@m@d@H.log" - PATHRT: "&EXP_BASEDIR;" PDY: "@Y@m@d" cyc: "@H" DATADEP_FILE1: "&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc" @@ -59,8 +57,7 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" + ATMOS_FORC: "&ATMOS_FORC;" model_ver: "&model_ver;" HOMElandda: "&HOMElandda;" COMROOT: "&COMROOT;" @@ -83,8 +80,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" WARMSTART_DIR: "&WARMSTART_DIR;" @@ -130,8 +125,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" model_ver: "&model_ver;" @@ -164,8 +157,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" RES: "&RES;" TSTUB: "&TSTUB;" model_ver: "&model_ver;" @@ -196,7 +187,6 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" model_ver: "&model_ver;" RUN: "&RUN;" HOMElandda: "&HOMElandda;" @@ -225,8 +215,7 @@ workflow: MACHINE: "&MACHINE;" SCHED: "&SCHED;" ACCOUNT: "&ACCOUNT;" - EXP_NAME: "&EXP_NAME;" - ATMOS_FORC: "&FORCING;" + ATMOS_FORC: "&ATMOS_FORC;" RES: "&RES;" WARMSTART_DIR: "&WARMSTART_DIR;" model_ver: "&model_ver;" diff --git a/parm/run_without_rocoto.sh b/parm/run_without_rocoto.sh deleted file mode 100755 index 7b9f8e5c..00000000 --- a/parm/run_without_rocoto.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash -#SBATCH --job-name=land_da_wflow -#SBATCH --account=epic -#SBATCH --qos=debug -#SBATCH --nodes=1 -#SBATCH --tasks-per-node=6 -#SBATCH --cpus-per-task=1 -#SBATCH -t 00:30:00 -#SBATCH -o log_landda_wflow.%j.log -#SBATCH -e err_landda_wflow.%j.err - - -export MACHINE="orion" -export SCHED="slurm" -export ACCOUNT="epic" -export FORCING="era5" - -if [ "${MACHINE}" = "hera" ]; then - export EXP_BASEDIR="/scratch2/NAGAPE/epic/{USER}/landda_test" - export JEDI_INSTALL="/scratch2/NAGAPE/epic/UFS_Land-DA/jedi_skylabv7.0" - export WARMSTART_DIR="" -elif [ "${MACHINE}" = "orion" ]; then - export EXP_BASEDIR="/work/noaa/epic/{USER}/landda_test" - export JEDI_INSTALL="/work/noaa/epic/UFS_Land-DA_Dev/jedi_v7" - export WARMSTART_DIR="/work/noaa/epic/UFS_Land-DA_Dev/DATA_RESTART" -fi - -export RES="96" -export FCSTHR="24" -export NPROCS_ANALYSIS="6" -export NPROCS_FORECAST="6" -export OBSDIR="" -export OBSDIR_SUBDIR="" -export OBS_TYPES="GHCN" -export DAtype="letkfoi_snow" -export SNOWDEPTHVAR="snwdph" -export TSTUB="oro_C96.mx100" -export NET="landda" -export envir="test" -export model_ver="v1.2.1" -export HOMElandda="${EXP_BASEDIR}/land-DA_workflow" -export PTMP="${EXP_BASEDIR}/ptmp" -export COMROOT="${PTMP}/${envir}/com" -export DATAROOT="${PTMP}/${envir}/tmp" -export KEEPDATA="YES" -export WORKDIR="${EXP_BASEDIR}/workdir/run_&FORCING;" -export LOGDIR="${EXP_BASEDIR}/com/output/logs" -export PATHRT="${EXP_BASEDIR}" -export SLASH_ENSMEM_SUBDIR="" -export ATMOS_FORC="${FORCING}" -export NPROC_JEDI="${NPROCS_ANALYSIS}" - -if [ "${FORCING}" = "era5" ]; then - export PDY="20191221" - export cyc="00" - export PTIME="2019122000" - export NTIME="2019122200" -elif [ "${FORCING}" = "gswp3" ]; then - export PDY="20000103" - export cyc="00" - export PTIME="2000010200" - export NTIME="2000010400" -fi - -# Call J-job scripts -# -echo " ... PREP_OBS running ... " -${HOMElandda}/parm/task_load_modules_run_jjob.sh "prep_obs" "${HOMElandda}" "${MACHINE}" -export err=$? -if [ $err = 0 ]; then - echo " === PREP_OBS completed successfully === " -else - echo " ERROR: PREP_OBS failed !!! " - exit 1 -fi - -echo " ... PRE_ANAL running ... " -${HOMElandda}/parm/task_load_modules_run_jjob.sh "pre_anal" "${HOMElandda}" "${MACHINE}" -export err=$? -if [ $err = 0 ]; then - echo " === PRE_ANAL completed successfully === " -else - echo " ERROR: PRE_ANAL failed !!! " - exit 2 -fi - -echo " ... ANALYSIS running ... " -${HOMElandda}/parm/task_load_modules_run_jjob.sh "analysis" "${HOMElandda}" "${MACHINE}" -export err=$? -if [ $err = 0 ]; then - echo " === Task ANALYSIS completed successfully === " -else - echo " ERROR: ANALYSIS failed !!! " - exit 3 -fi - -echo " ... POST_ANAL running ... " -${HOMElandda}/parm/task_load_modules_run_jjob.sh "post_anal" "${HOMElandda}" "${MACHINE}" -export err=$? -if [ $err = 0 ]; then - echo " === POST_ANAL completed successfully === " -else - echo " ERROR: POST_ANAL failed !!! " - exit 4 -fi - -echo " ... FORECAST running ... " -${HOMElandda}/parm/task_load_modules_run_jjob.sh "forecast" "${HOMElandda}" "${MACHINE}" -export err=$? -if [ $err = 0 ]; then - echo " === Task FORECAST completed successfully === " -else - echo " ERROR: FORECAST failed !!! " - exit 5 -fi - diff --git a/parm/templates/template.tile2vector b/parm/templates/template.tile2vector deleted file mode 100644 index 8be9babd..00000000 --- a/parm/templates/template.tile2vector +++ /dev/null @@ -1,52 +0,0 @@ -&run_setup - -!------------------- common ------------------- -! Direction of conversion: either "vector2tile" or "tile2vector" for restart file -! "lndp2tile" or "lndp2vector" for perturbation - - direction = "tile2vector" - -! FV3 resolution and path to oro files for restart/perturbation conversion - - tile_size = XXRES - tile_path = "FIXlandda/FV3_fix_tiled/CXXRES/" - tile_fstub = "XXTSTUB" - -!------------------- only restart conversion ------------------- -! Time stamp for conversion for restart conversion - - restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00" - -! Path for static file - static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc" - -! Location of vector restart file (vector2tile direction) - - vector_restart_path = "junk" - -! Location of tile restart files (tile2vector direction) - - tile_restart_path = "./" - -! Path for converted files; if same as tile/vector path, files may be overwritten - - output_path = "./" - -!------------------- only perturbation mapping ------------------- -! layout, options: 1x4, 4x1, 2x2, an input settings for generating the perturbation file - - lndp_layout = "" - -! input perturbation pattern files - - lndp_input_file = "" - -! output files - - lndp_output_file = "" - -! land perturbation variable list, for an example: 'vgf','smc' - - lndp_var_list = '' - -/ diff --git a/parm/templates/template.ufs-noahMP.namelist.era5 b/parm/templates/template.ufs-noahMP.namelist.era5 deleted file mode 100644 index 7e7c5ef8..00000000 --- a/parm/templates/template.ufs-noahMP.namelist.era5 +++ /dev/null @@ -1,95 +0,0 @@ -&run_setup - - static_file = "/FIXlandda/static/ufs-land_C96_static_fields.nc" - init_file = "/FIXlandda/forcing/era5/init/ufs-land_C96_init_2010-12-31_23-00-00.nc" - forcing_dir = "/FIXlandda/forcing/era5/datm/C96/" - - separate_output = .false. - output_dir = "./noahmp_output/" - output_frequency_s = 0 - - restart_frequency_s = XXFREQ - restart_simulation = .true. - restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00" - restart_dir = "./" - - timestep_seconds = 3600 - -! simulation_start is required -! either set simulation_end or run_* or run_timesteps, priority -! 1. simulation_end 2. run_[days/hours/minutes/seconds] 3. run_timesteps - - simulation_start = "2011-01-01 00:00:00" ! start date [yyyy-mm-dd hh:mm:ss] -! simulation_end = "1999-01-01 06:00:00" ! end date [yyyy-mm-dd hh:mm:ss] - - run_days = XXRDD ! number of days to run - run_hours = XXRHH ! number of hours to run - run_minutes = 0 ! number of minutes to run - run_seconds = 0 ! number of seconds to run - - run_timesteps = 0 ! number of timesteps to run - - location_start = 1 - location_end = 18322 - -/ - -&land_model_option - land_model = 2 ! choose land model: 1=noah, 2=noahmp -/ - -&structure - num_soil_levels = 4 ! number of soil levels - forcing_height = 10 ! forcing height [m] -/ - -&soil_setup - soil_level_thickness = 0.10, 0.30, 0.60, 1.00 ! soil level thicknesses [m] - soil_level_nodes = 0.05, 0.25, 0.70, 1.50 ! soil level centroids from surface [m] -/ - -&noahmp_options - dynamic_vegetation_option = 4 - canopy_stomatal_resistance_option = 2 - soil_wetness_option = 1 - runoff_option = 1 - surface_exchange_option = 3 - supercooled_soilwater_option = 1 - frozen_soil_adjust_option = 1 - radiative_transfer_option = 3 - snow_albedo_option = 2 - precip_partition_option = 1 - soil_temp_lower_bdy_option = 2 - soil_temp_time_scheme_option = 3 - thermal_roughness_scheme_option = 2 - surface_evap_resistance_option = 1 - glacier_option = 1 -/ - -&forcing - forcing_timestep_seconds = 3600 - forcing_regrid = "none" - forcing_regrid_weights_filename= "" - forcing_type = "dd_1h" - forcing_filename = "C96_ERA5_forcing_" - forcing_interp_solar = "linear" ! gswp3_zenith or linear - forcing_time_solar = "instantaneous" ! gswp3_average or instantaneous - forcing_name_precipitation = "precipitation_bilinear" - forcing_name_temperature = "temperature" - forcing_name_specific_humidity = "specific_humidity" - forcing_name_wind_speed = "wind_speed" - forcing_name_pressure = "surface_pressure" - forcing_name_sw_radiation = "solar_radiation" - forcing_name_lw_radiation = "longwave_radiation" -/ - -&io - output_names = "snow_water_equiv", - "snow_depth", - "temperature_snow" - daily_mean_names = "" - monthly_mean_names = "" - solar_noon_names = "" - restart_names = "" -/ - diff --git a/parm/templates/template.vector2tile b/parm/templates/template.vector2tile deleted file mode 100644 index 25430d49..00000000 --- a/parm/templates/template.vector2tile +++ /dev/null @@ -1,52 +0,0 @@ -&run_setup - -!------------------- common ------------------- -! Direction of conversion: either "vector2tile" or "tile2vector" for restart file -! "lndp2tile" or "lndp2vector" for perturbation - - direction = "vector2tile" - -! FV3 resolution and path to oro files for restart/perturbation conversion - - tile_size = XXRES - tile_path = "FIXlandda/FV3_fix_tiled/CXXRES/" - tile_fstub = "XXTSTUB" - -!------------------- only restart conversion ------------------- -! Time stamp for conversion for restart conversion - - restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00" - -! Path for static file - static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc" - -! Location of vector restart file (vector2tile direction) - - vector_restart_path = "./" - -! Location of tile restart files (tile2vector direction) - - tile_restart_path = "junk" - -! Path for converted files; if same as tile/vector path, files may be overwritten - - output_path = "./" - -!------------------- only perturbation mapping ------------------- -! layout, options: 1x4, 4x1, 2x2, an input settings for generating the perturbation file - - lndp_layout = "" - -! input perturbation pattern files - - lndp_input_file = "" - -! output files - - lndp_output_file = "" - -! land perturbation variable list, for an example: 'vgf','smc' - - lndp_var_list = '' - -/ diff --git a/scripts/exlandda_forecast.sh b/scripts/exlandda_forecast.sh index c6a56d00..742122e0 100755 --- a/scripts/exlandda_forecast.sh +++ b/scripts/exlandda_forecast.sh @@ -27,18 +27,16 @@ case $MACHINE in ;; esac -# convert back to UFS tile, run model (all members) -if [[ ${ATMOS_FORC} == "gswp3" ]]; then - echo '************************************************' - echo 'running the forecast model' +echo '************************************************' +echo 'running the forecast model' - # modify some env variables - reduce core usage - export ATM_compute_tasks=0 - export ATM_io_tasks=1 - export LND_tasks=6 - export layout_x=1 - export layout_y=1 +# modify some env variables - reduce core usage +export ATM_compute_tasks=0 +export ATM_io_tasks=1 +export LND_tasks=6 +export layout_x=1 +export layout_y=1 cp ${PARMlandda}/templates/template.input.nml input.nml cp ${PARMlandda}/templates/template.ufs.configure ufs.configure @@ -138,4 +136,3 @@ if [[ ${ATMOS_FORC} == "gswp3" ]]; then do ln -nsf ${COMOUT}/ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.tile${itile}.nc ${DATA_RESTART} done -fi diff --git a/scripts/exlandda_post_anal.sh b/scripts/exlandda_post_anal.sh index bd5a119b..2204c189 100755 --- a/scripts/exlandda_post_anal.sh +++ b/scripts/exlandda_post_anal.sh @@ -41,77 +41,14 @@ do cp ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc . done -# convert back to vector, run model (all members) convert back to vector, run model (all members) -if [[ ${ATMOS_FORC} == "era5" ]]; then - echo '************************************************' - echo 'calling tile2vector' +# convert back to UFS tile +echo '************************************************' +echo 'calling tile2tile' - cp ${DATA_SHARE}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.nc . - - cp ${PARMlandda}/templates/template.tile2vector tile2vector.namelist - - sed -i "s|FIXlandda|${FIXlandda}|g" tile2vector.namelist - sed -i -e "s/XXYYYY/${YYYY}/g" tile2vector.namelist - sed -i -e "s/XXMM/${MM}/g" tile2vector.namelist - sed -i -e "s/XXDD/${DD}/g" tile2vector.namelist - sed -i -e "s/XXHH/${HH}/g" tile2vector.namelist - sed -i -e "s/XXRES/${RES}/g" tile2vector.namelist - sed -i -e "s/XXTSTUB/${TSTUB}/g" tile2vector.namelist - - export pgm="vector2tile_converter.exe" - . prep_step - ${EXEClandda}/$pgm tile2vector.namelist >>$pgmout 2>errfile - export err=$?; err_chk - cp errfile errfile_tile2vector - if [[ $err != 0 ]]; then - echo "tile2vector failed" - exit 10 - fi - - # save analysis restart - cp -p ${DATA}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.nc ${COMOUT}/ufs_land_restart.anal.${YYYY}-${MM}-${DD}_${HH}-00-00.nc - - echo '************************************************' - echo 'running the forecast model' - - # update model namelist - cp ${PARMlandda}/templates/template.ufs-noahMP.namelist.${ATMOS_FORC} ufs-land.namelist - - sed -i "s|FIXlandda|${FIXlandda}|g" ufs-land.namelist - sed -i -e "s/XXYYYY/${YYYY}/g" ufs-land.namelist - sed -i -e "s/XXMM/${MM}/g" ufs-land.namelist - sed -i -e "s/XXDD/${DD}/g" ufs-land.namelist - sed -i -e "s/XXHH/${HH}/g" ufs-land.namelist - sed -i -e "s/XXFREQ/${FREQ}/g" ufs-land.namelist - sed -i -e "s/XXRDD/${RDD}/g" ufs-land.namelist - sed -i -e "s/XXRHH/${RHH}/g" ufs-land.namelist - - nt=$SLURM_NTASKS - - export pgm="ufsLand.exe" - . prep_step - ${RUN_CMD} -n 1 ${EXEClandda}/$pgm >>$pgmout 2>errfile - export err=$?; err_chk - cp errfile errfile_ufsLand - if [[ $err != 0 ]]; then - echo "ufsLand failed" - exit 10 - fi - - cp -p ${DATA}/ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.nc ${COMOUT}/ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.nc - - # link restart for next cycle - ln -nsf ${COMOUT}/ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.nc ${DATA_RESTART} - -# convert back to UFS tile -elif [[ ${ATMOS_FORC} == "gswp3" ]]; then - echo '************************************************' - echo 'calling tile2tile' - - for itile in {1..6} - do - cp ${DATA_SHARE}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc . - done +for itile in {1..6} +do + cp ${DATA_SHARE}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc . +done cp ${PARMlandda}/templates/template.jedi2ufs jedi2ufs.namelist @@ -133,9 +70,8 @@ elif [[ ${ATMOS_FORC} == "gswp3" ]]; then exit 10 fi - # save analysis restart - for itile in {1..6} - do - cp -p ${DATA}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc ${COMOUT}/ufs_land_restart.anal.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc - done -fi +# save analysis restart +for itile in {1..6} +do + cp -p ${DATA}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc ${COMOUT}/ufs_land_restart.anal.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc +done diff --git a/scripts/exlandda_pre_anal.sh b/scripts/exlandda_pre_anal.sh index 49a1f06d..7a9e7cfd 100755 --- a/scripts/exlandda_pre_anal.sh +++ b/scripts/exlandda_pre_anal.sh @@ -13,69 +13,25 @@ HP=${PTIME:8:2} FILEDATE=${YYYY}${MM}${DD}.${HH}0000 -if [[ $ATMOS_FORC == "era5" ]]; then - # vector2tile for DA - # copy restarts into work directory - rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.nc" +# tile2tile for DA +echo '************************************************' +echo 'calling tile2tile' + +# copy restarts into work directory +for itile in {1..6} +do + rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc" if [[ -e ${DATA_RESTART}/${rst_fn} ]]; then - cp ${DATA_RESTART}/${rst_fn} . + cp ${DATA_RESTART}/${rst_fn} . elif [[ -e ${WARMSTART_DIR}/${rst_fn} ]]; then cp ${WARMSTART_DIR}/${rst_fn} . else - echo "Initial restart file does not exist" - exit 11 + echo "Initial restart files do not exist" + exit 21 fi + # copy restart to data share dir for post_anal cp -p ${rst_fn} ${DATA_SHARE} - - echo '************************************************' - echo 'calling vector2tile' - - # update vec2tile and tile2vec namelists - cp ${PARMlandda}/templates/template.vector2tile vector2tile.namelist - - sed -i "s|FIXlandda|${FIXlandda}|g" vector2tile.namelist - sed -i -e "s/XXYYYY/${YYYY}/g" vector2tile.namelist - sed -i -e "s/XXMM/${MM}/g" vector2tile.namelist - sed -i -e "s/XXDD/${DD}/g" vector2tile.namelist - sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist - sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist - sed -i -e "s/XXRES/${RES}/g" vector2tile.namelist - sed -i -e "s/XXTSTUB/${TSTUB}/g" vector2tile.namelist - - # submit vec2tile - echo '************************************************' - echo 'calling vector2tile' - - export pgm="vector2tile_converter.exe" - . prep_step - ${EXEClandda}/$pgm vector2tile.namelist >>$pgmout 2>errfile - cp errfile errfile_vector2tile - export err=$?; err_chk - if [[ $err != 0 ]]; then - echo "vec2tile failed" - exit 12 - fi - -elif [[ $ATMOS_FORC == "gswp3" ]]; then - # tile2tile for DA - echo '************************************************' - echo 'calling tile2tile' - - # copy restarts into work directory - for itile in {1..6} - do - rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc" - if [[ -e ${DATA_RESTART}/${rst_fn} ]]; then - cp ${DATA_RESTART}/${rst_fn} . - elif [[ -e ${WARMSTART_DIR}/${rst_fn} ]]; then - cp ${WARMSTART_DIR}/${rst_fn} . - else - echo "Initial restart files do not exist" - exit 21 - fi - # copy restart to data share dir for post_anal - cp -p ${rst_fn} ${DATA_SHARE} - done +done # update tile2tile namelist cp ${PARMlandda}/templates/template.ufs2jedi ufs2jedi.namelist @@ -100,8 +56,6 @@ elif [[ $ATMOS_FORC == "gswp3" ]]; then exit 22 fi -fi - #stage restarts for applying JEDI update to intermediate directory for itile in {1..6} do diff --git a/scripts/exlandda_prep_obs.sh b/scripts/exlandda_prep_obs.sh index bb837bf7..ed0d36c3 100755 --- a/scripts/exlandda_prep_obs.sh +++ b/scripts/exlandda_prep_obs.sh @@ -18,17 +18,19 @@ HP=${PTIME:8:2} OBSDIR="${OBSDIR:-${FIXlandda}/DA}" for obs in "${OBS_TYPES[@]}"; do # get the obs file name - if [ ${obs} == "GTS" ]; then + if [ "${obs}" == "GTS" ]; then OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-snow_depth/GTS/data_proc}" obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/${YYYY}${MM}/adpsfc_snow_${YYYY}${MM}${DD}${HH}.nc4" + elif [ "${obs}" == "GHCN" ]; then # GHCN are time-stamped at 18. If assimilating at 00, need to use previous day's obs, so that # obs are within DA window. - elif [ $ATMOS_FORC == "era5" ] && [ ${obs} == "GHCN" ]; then - OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-snow_depth/GHCN/data_proc/v3}" - obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/${YYYY}/ghcn_snwd_ioda_${YYYP}${MP}${DP}_jediv7.nc" - elif [ $ATMOS_FORC == "gswp3" ] && [ ${obs} == "GHCN" ]; then - OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-snow_depth/GHCN/data_proc/v3}" - obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/${YYYY}/ghcn_snwd_ioda_${YYYP}${MP}${DP}.nc" + if [ "${ATMOS_FORC}" == "era5" ]; then + OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-snow_depth/GHCN/data_proc/v3}" + obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/${YYYY}/ghcn_snwd_ioda_${YYYP}${MP}${DP}_jediv7.nc" + elif [ "${ATMOS_FORC}" == "gswp3" ]; then + OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-snow_depth/GHCN/data_proc/v3}" + obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/${YYYY}/ghcn_snwd_ioda_${YYYP}${MP}${DP}.nc" + fi elif [ ${obs} == "SYNTH" ]; then OBSDIR_SUBDIR="${OBSDIR_SUBDIR:-synthetic_noahmp}" obsfile="${OBSDIR}/${OBSDIR_SUBDIR}/IODA.synthetic_gswp_obs.${YYYY}${MM}${DD}${HH}.nc" diff --git a/sorc/CMakeLists.txt b/sorc/CMakeLists.txt index 835f0b77..be103b4d 100755 --- a/sorc/CMakeLists.txt +++ b/sorc/CMakeLists.txt @@ -67,8 +67,6 @@ ExternalProject_Add(ufs_model.fd ) add_subdirectory(tile2tile_converter.fd) -add_subdirectory(vector2tile_converter.fd) -add_subdirectory(ufsLand.fd) add_subdirectory(apply_incr.fd) # Include testing. add_subdirectory(test) diff --git a/sorc/app_build.sh b/sorc/app_build.sh index 8a400cc7..b147a2a3 100755 --- a/sorc/app_build.sh +++ b/sorc/app_build.sh @@ -198,18 +198,10 @@ if [ "${REMOVE}" = true ]; then printf "... Remove apply_incr.fd ...\n" rm -rf "${SORC_DIR}/apply_incr.fd" fi - if [ -d "${SORC_DIR}/ufsLand.fd" ]; then - printf "... Remove ufsLand.fd ...\n" - rm -rf "${SORC_DIR}/ufsLand.fd" - fi if [ -d "${SORC_DIR}/ufs_model.fd" ]; then printf "... Remove ufs_model.fd ...\n" rm -rf "${SORC_DIR}/ufs_model.fd" fi - if [ -d "${SORC_DIR}/vector2tile_converter.fd" ]; then - printf "... Remove vector2tile_converter.fd ...\n" - rm -rf "${SORC_DIR}/vector2tile_converter.fd" - fi cd "${HOME_DIR}" git submodule update --init --recursive diff --git a/sorc/test/CMakeLists.txt b/sorc/test/CMakeLists.txt index bbb18b31..1aa89028 100644 --- a/sorc/test/CMakeLists.txt +++ b/sorc/test/CMakeLists.txt @@ -1,18 +1,9 @@ -# test for vector2tile for use in jedi-fv3 -add_test(NAME test_vector2tile - COMMAND ${PROJECT_SOURCE_DIR}/test/test_vector2tile.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} vector2tile bkg - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test) -set_tests_properties(test_vector2tile - PROPERTIES - ENVIRONMENT "FIXlandda=$ENV{FIXlandda}") - # test for creating pseudo ensemble for use in letkfoi add_test(NAME test_create_ens COMMAND ${PROJECT_SOURCE_DIR}/test/create_bkg_ens.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test) set_tests_properties(test_create_ens PROPERTIES - DEPENDS "test_vector2title" ENVIRONMENT "FIXlandda=$ENV{FIXlandda}") # test for running letkfoi to assimilate snow DA @@ -33,17 +24,8 @@ set_tests_properties(test_apply_jediincr DEPENDS "test_letkfoi_snowda" ENVIRONMENT "FIXlandda=$ENV{FIXlandda}") -# test for tile2vector for use in ufs-land-driver -add_test(NAME test_tile2vector - COMMAND ${PROJECT_SOURCE_DIR}/test/test_vector2tile.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} tile2vector ana - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test) -set_tests_properties(test_tile2vector - PROPERTIES - DEPENDS "test_apply_jediincr" - ENVIRONMENT "FIXlandda=$ENV{FIXlandda}; - TOL=$ENV{TOL}") - # test for ufs-datm-lnd model add_test(NAME test_ufs_datm_land COMMAND ${PROJECT_SOURCE_DIR}/test/run_ufs_datm_lnd.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test) + diff --git a/sorc/test/apply_jedi_incr.sh b/sorc/test/apply_jedi_incr.sh index e7c0b3c7..6681d621 100755 --- a/sorc/test/apply_jedi_incr.sh +++ b/sorc/test/apply_jedi_incr.sh @@ -9,7 +9,7 @@ project_source_dir=$2 source ${project_source_dir}/test/runtime_vars.sh ${project_binary_dir} ${project_source_dir} # set extra paths -RSTDIR=$project_binary_dir/test/bkg/restarts/tile +RSTDIR=$project_source_dir/../fix/test_base/sfc_data INCDIR=$project_binary_dir/test # set executables diff --git a/sorc/test/create_bkg_ens.sh b/sorc/test/create_bkg_ens.sh index eb38485a..2a3b97e6 100755 --- a/sorc/test/create_bkg_ens.sh +++ b/sorc/test/create_bkg_ens.sh @@ -9,7 +9,7 @@ project_source_dir=$2 source ${project_source_dir}/test/runtime_vars.sh ${project_binary_dir} ${project_source_dir} # set extra paths -RSTDIR=$project_binary_dir/test/bkg/restarts/tile +RSTDIR=$project_source_dir/../fix/test_base/sfc_data # set executables TEST_EXEC="${project_source_dir}/../ush/letkf_create_ens.py" @@ -20,34 +20,33 @@ cd $WORKDIR if [[ ${DAtype} == 'letkfoi_snow' ]]; then - # FOR LETKFOI, CREATE THE PSEUDO-ENSEMBLE - for ens in pos neg + # FOR LETKFOI, CREATE THE PSEUDO-ENSEMBLE + for ens in pos neg + do + #clean results from previous test + if [ -e $WORKDIR/mem_${ens} ]; then + rm -rf $WORKDIR/mem_${ens} + fi + + mkdir -p $WORKDIR/mem_${ens} + + for i in ${RSTDIR}/${FILEDATE}.sfc_data.tile*.nc; do - #clean results from previous test - if [ -e $WORKDIR/mem_${ens} ]; then - rm -rf $WORKDIR/mem_${ens} - fi - - mkdir -p $WORKDIR/mem_${ens} - - for i in ${RSTDIR}/${FILEDATE}.sfc_data.tile*.nc; - do - cp $i ${WORKDIR}/mem_${ens} - done - - cres_file=$WORKDIR/mem_${ens}/${FILEDATE}.coupler.res - cp ${project_source_dir}/../parm/templates/template.coupler.res $cres_file - sed -i -e "s/XXYYYY/${YY}/g" $cres_file - sed -i -e "s/XXMM/${MM}/g" $cres_file - sed -i -e "s/XXDD/${DD}/g" $cres_file - sed -i -e "s/XXHH/${HH}/g" $cres_file - sed -i -e "s/XXYYYP/${YP}/g" $cres_file - sed -i -e "s/XXMP/${MP}/g" $cres_file - sed -i -e "s/XXDP/${DP}/g" $cres_file - sed -i -e "s/XXHP/${HP}/g" $cres_file + cp $i ${WORKDIR}/mem_${ens} done - - echo "============================= calling create ensemble" - ${MPIRUN} -n $NPROC $PYTHON_EXEC ${TEST_EXEC} $FILEDATE $SNOWDEPTHVAR $B + cres_file=$WORKDIR/mem_${ens}/${FILEDATE}.coupler.res + cp ${project_source_dir}/../parm/templates/template.coupler.res $cres_file + sed -i -e "s/XXYYYY/${YY}/g" $cres_file + sed -i -e "s/XXMM/${MM}/g" $cres_file + sed -i -e "s/XXDD/${DD}/g" $cres_file + sed -i -e "s/XXHH/${HH}/g" $cres_file + sed -i -e "s/XXYYYP/${YP}/g" $cres_file + sed -i -e "s/XXMP/${MP}/g" $cres_file + sed -i -e "s/XXDP/${DP}/g" $cres_file + sed -i -e "s/XXHP/${HP}/g" $cres_file + done + + echo "============================= calling create ensemble" + ${MPIRUN} -n $NPROC $PYTHON_EXEC ${TEST_EXEC} $FILEDATE $SNOWDEPTHVAR $B fi diff --git a/sorc/test/runtime_vars.sh b/sorc/test/runtime_vars.sh index 68710d04..79423358 100755 --- a/sorc/test/runtime_vars.sh +++ b/sorc/test/runtime_vars.sh @@ -7,7 +7,7 @@ project_source_dir=$2 # Prepare runtime environement # set date -export CYMDH=2019122100 +export CYMDH=2000010300 export YY=`echo $CYMDH | cut -c1-4` export MM=`echo $CYMDH | cut -c5-6` export DD=`echo $CYMDH | cut -c7-8` @@ -50,7 +50,7 @@ export PYTHON_EXEC=${PYTHON_EXEC:-`which python`} # configurations export RES=96 -export atmos_forc=era5 +export atmos_forc=gswp3 export TPATH="$FIXlandda/FV3_fix_tiled/C${RES}/" export TSTUB="oro_C${RES}.mx100" export GFSv17=NO diff --git a/sorc/test/test_letkfoi_snowda.sh b/sorc/test/test_letkfoi_snowda.sh index 8a973448..74e75a1c 100755 --- a/sorc/test/test_letkfoi_snowda.sh +++ b/sorc/test/test_letkfoi_snowda.sh @@ -10,7 +10,7 @@ source ${project_source_dir}/test/runtime_vars.sh ${project_binary_dir} ${projec # set extra paths OROG_PATH=$TPATH -OBSDIR=${FIXlandda}/DA/ +OBSDIR="${FIXlandda}/DA" # set executables JEDI_EXEC=${JEDI_EXEC:-$JEDI_EXECDIR/fv3jedi_letkf.x} @@ -31,21 +31,21 @@ done cp $project_source_dir/../parm/jedi/${DAtype}.yaml letkf_land.yaml for ii in "${!OBS_TYPES[@]}"; do - echo "============================= ${OBS_TYPES[$ii]}" - cat $project_source_dir/../parm/jedi/${OBS_TYPES[$ii]}.yaml >> letkf_land.yaml - - # link ioda obs file - # GHCN are time-stamped at 18. If assimilating at 00, need to use previous day's obs, so that - # obs are within DA window. - [[ -e ${OBS_TYPES[$ii]}_${YY}${MP}${DP}${HP}.nc ]] && rm ${OBS_TYPES[$ii]}_${YY}${MP}${DP}${HP}.nc - obs_file=${OBSDIR}/snow_depth/${OBS_TYPES[$ii]}/data_proc/v3/${YY}/${OBS_TYPES[$ii],,}_snwd_ioda_${YY}${MP}${DP}_jediv7.nc - if [[ -e $obs_file ]]; then - echo "${OBS_TYPES[$ii]} observations found: $obs_file" - else - echo "${OBS_TYPES[$ii]} observations not found: $obs_file" - fi - ln -fs $obs_file ./${OBS_TYPES[$ii]}_${YY}${MM}${DD}${HH}.nc + echo "============================= ${OBS_TYPES[$ii]}" + cat $project_source_dir/../parm/jedi/${OBS_TYPES[$ii]}.yaml >> letkf_land.yaml + # link ioda obs file + # GHCN are time-stamped at 18. If assimilating at 00, need to use previous day's obs, so that + # obs are within DA window. + [[ -e ${OBS_TYPES[$ii]}_${YY}${MP}${DP}${HP}.nc ]] && rm ${OBS_TYPES[$ii]}_${YY}${MP}${DP}${HP}.nc + obs_file=${OBSDIR}/snow_depth/${OBS_TYPES[$ii]}/data_proc/v3/${YY}/${OBS_TYPES[$ii],,}_snwd_ioda_${YY}${MP}${DP}.nc + if [[ -e $obs_file ]]; then + echo "${OBS_TYPES[$ii]} observations found: $obs_file" + else + echo "${OBS_TYPES[$ii]} observations not found: $obs_file" + exit 11 + fi + ln -fs $obs_file ./${OBS_TYPES[$ii]}_${YY}${MM}${DD}${HH}.nc done sed -i -e "s/XXYYYY/${YY}/g" letkf_land.yaml diff --git a/sorc/test/test_vector2tile.sh b/sorc/test/test_vector2tile.sh deleted file mode 100755 index 434c92d7..00000000 --- a/sorc/test/test_vector2tile.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -set -e -################################################ -# pass arguments -project_binary_dir=$1 -project_source_dir=$2 -DIRECTION=$3 -prefix=$4 #bkg or ana - -# Export runtime env. variables -source ${project_source_dir}/test/runtime_vars.sh ${project_binary_dir} ${project_source_dir} - -# set baseline dir -export TEST_BASEDIR=${TEST_BASEDIR:-"${EPICHOME}/inputs/test_base/restarts/vector"} - -# set executables -TEST_EXEC="vector2tile_converter.exe" -NPROC=1 - -# move to work directory -cd $WORKDIR - -# Clean test files created during a previous test -# only clean vector folder for now -[[ -e ${WORKDIR}/${prefix}/restarts/vector ]] && rm -rf ${WORKDIR}/${prefix}/restarts/vector -[[ ${DIRECTION} = "vector2tile" ]] && rm -rf ${WORKDIR}/${prefix}/restarts/tile -[[ -e ./vector2tile.namelist ]] && rm vector2tile.namelist - -# copy vector restarts -mkdir -p $WORKDIR/${prefix}/restarts/vector -source_restart=${FIXlandda}/restarts/${atmos_forc}/ufs_land_restart.${YY}-${MM}-${DD}_${HH}-00-00.nc -target_restart=$WORKDIR/${prefix}/restarts/vector/ufs_land_restart.${YY}-${MM}-${DD}_${HH}-00-00.nc -cp $source_restart $target_restart - -# select case -case $DIRECTION in - - vector2tile) - echo "============================= direction: ${DIRECTION}" - [[ ! -e ${WORKDIR}/${prefix}/restarts/tile ]] && mkdir -p ${WORKDIR}/${prefix}/restarts/tile - # set variables for namelist - VECTOR_PATH=./PREFIX/restarts/vector/ - TILE_PATH=junk - OUTPUT_PATH=./PREFIX/restarts/tile/ - ;; - - tile2vector) - echo "============================= direction: ${DIRECTION}" - # Assume tile files are already created by apply_incr test - # in .${prefix}/restarts/tile - for tile in 1 2 3 4 5 6 - do - if [[ ! -e $WORKDIR/${prefix}/restarts/tile/${FILEDATE}.sfc_data.tile${tile}.nc ]]; then - echo "$WORKDIR/${prefix}/restarts/tile/${FILEDATE}.sfc_data.tile${tile}.nc missing" - exit 1 - fi - done - # set variables for namelist - VECTOR_PATH=junk - TILE_PATH=./PREFIX/restarts/tile/ - OUTPUT_PATH=./PREFIX/restarts/vector/ - # if prefix = ana, turn on baseline check - [[ ${prefix} == "ana" ]] && BASELINE_CHECK="true" - ;; - - *) - echo "============================= direction unknown stop now!" - exit 1 - ;; -esac - -# update namelist -cp ${project_source_dir}/test/testinput/template.vector2tile vector2tile.namelist -sed -i "s|DIRECTION|${DIRECTION}|g" vector2tile.namelist -sed -i "s|FIXlandda|${FIXlandda}|g" vector2tile.namelist -sed -i "s|VECTOR_PATH|${VECTOR_PATH}|g" vector2tile.namelist -sed -i "s|TILE_PATH|${TILE_PATH}|g" vector2tile.namelist -sed -i "s|OUTPUT_PATH|${OUTPUT_PATH}|g" vector2tile.namelist -sed -i "s|PREFIX|${prefix}|g" vector2tile.namelist -sed -i -e "s/XXYYYY/${YY}/g" vector2tile.namelist -sed -i -e "s/XXMM/${MM}/g" vector2tile.namelist -sed -i -e "s/XXDD/${DD}/g" vector2tile.namelist -sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist -sed -i -e "s/XXRES/${RES}/g" vector2tile.namelist -sed -i -e "s#XXTPATH#${TPATH}#g" vector2tile.namelist -sed -i -e "s/XXTSTUB/${TSTUB}/g" vector2tile.namelist - - -# run test -echo "============================= calling ${TEST_EXEC}" -${MPIRUN} -n ${NPROC} ${EXECDIR}/${TEST_EXEC} vector2tile.namelist - -# check anal rst with baseline -if [[ ${BASELINE_CHECK} == "true" ]]; then - echo "============================= baseline check with tol= ${TOL}" - ${project_source_dir}/test/compare.py ./${prefix}/restarts/vector/ufs_land_restart.${YY}-${MM}-${DD}_${HH}-00-00.nc ${TEST_BASEDIR}/ufs_land_restart_anal.${YY}-${MM}-${DD}_${HH}-00-00.nc ${TOL} - if [[ $? != 0 ]]; then - echo "baseline check fail!" - exit 20 - fi -fi diff --git a/sorc/test/testinput/template.vector2tile b/sorc/test/testinput/template.vector2tile deleted file mode 100644 index f4973fad..00000000 --- a/sorc/test/testinput/template.vector2tile +++ /dev/null @@ -1,52 +0,0 @@ -&run_setup - -!------------------- common ------------------- -! Direction of conversion: either "vector2tile" or "tile2vector" for restart file -! "lndp2tile" or "lndp2vector" for perturbation - - direction = "DIRECTION" - -! FV3 resolution and path to oro files for restart/perturbation conversion - - tile_size = XXRES - tile_path = "XXTPATH" - tile_fstub = "XXTSTUB" - -!------------------- only restart conversion ------------------- -! Time stamp for conversion for restart conversion - - restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00" - -! Path for static file - static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc" - -! Location of vector restart file (vector2tile direction) - - vector_restart_path = "VECTOR_PATH" - -! Location of tile restart files (tile2vector direction) - - tile_restart_path = "TILE_PATH" - -! Path for converted files; if same as tile/vector path, files may be overwritten - - output_path = "OUTPUT_PATH" - -!------------------- only perturbation mapping ------------------- -! layout, options: 1x4, 4x1, 2x2, an input settings for generating the perturbation file - - lndp_layout = "" - -! input perturbation pattern files - - lndp_input_file = "" - -! output files - - lndp_output_file = "" - -! land perturbation variable list, for an example: 'vgf','smc' - - lndp_var_list = '' - -/ diff --git a/sorc/ufsLand.fd b/sorc/ufsLand.fd deleted file mode 160000 index 6c6bf430..00000000 --- a/sorc/ufsLand.fd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6c6bf43012362c8fc349d7b52d9afeeb13352241 diff --git a/sorc/vector2tile_converter.fd b/sorc/vector2tile_converter.fd deleted file mode 160000 index 2fb5c1b4..00000000 --- a/sorc/vector2tile_converter.fd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2fb5c1b493b3c03809e081f6fe8e8e76a40a100d