Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4c01e69a authored by Swen Jullien's avatar Swen Jullien
Browse files

Merge branch 'dev_CPL_2024_update_tools' into 'master'

Coupling_tools: update for run_wps
See merge request !8
parents ad084988 5c0192d7
No related branches found
No related tags found
2 merge requests!9Merge for croco_tools v2.0.0,!8Coupling_tools: update for run_wps
......@@ -27,79 +27,8 @@
# swen.jullien@ifremer.fr
# --------------------------------------------------
domain_name="BENGUELA"
# Nb domains (ie nests)
max_domains=1
#-------------------------------------------------------------------------
# Data Sources
#
# LBC_type : data source for initial and boundary conditions
# LSM_type : data source for surface forcing
# obc_freq_h : boundary condition frequency [hour]
# sst_interval_m : interval between SST updates [minutes]
#-------------------------------------------------------------------------
LBC_type="CFSR_press_pgbh06"
LSM_type="CFSR_sfc_flxf06"
obc_freq_h=6
sst_interval_m=360
#-------------------------------------------------------------------------
# Grid parameters
#
# dx : horizontal resolution in [km]
# xdim : number of points in x
# ydim : number of points in y
# central_lat : latitude at the center of the domain
# central_lon : longitude at the center of the domain
# topo_res_d01 : horizontal resolution of orography data
#
# Nesting
#
# dimensions must check:
# xdim_child=N*refine_coef+1
# ydim_child=M*refine_coef+1
#
# Variables for real.exe
#
# nbvertlevel : number of vertical levels
# nbmetlevel : number of boundary data levels
#-------------------------------------------------------------------------
#
dt=150
nbvertlevel=60
nbmetlevel=38
nbmetsoil=4
ptop=5000
#
# Parent domain (d01)
dx=30
xdim_d01=56
ydim_d01=50
central_lat=-32.0
central_lon=15.0
topo_res_d01='30s'
#topo_res_d01='3s+30s+10m'
# Nest 1 (d02)
refine_d02=5
i_str_d02=32
j_str_d02=153
xdim_d02=456
ydim_d02=476
topo_res_d02='3s'
#topo_res_d02='2s+3s+30s'
#
# Nest 2 (d03)
refine_d03=3
i_str_d03=35
j_str_d03=24
xdim_d03=277
ydim_d03=349
topo_res_d03='3s+30s'
#-------------------------------------------------------------------------
# Dates of parent simulation
#-------------------------------------------------------------------------
# real-time mode
# Dates to process
#-----------------
start_y=2005
start_m=01
start_d=01
......@@ -110,12 +39,45 @@ end_m=01
end_d=31
end_h=18
start_date_d01=$start_y'-'$start_m'-'$start_d'_'$start_h:00:00
end_date_d01=$end_y'-'$end_m'-'$end_d'_'$end_h:00:00
start_date_d02=$start_date_d01
end_date_d02=$end_date_d01
# Domains
#---------
max_domains=1 # Nb domains
#
# Parent domain (d01)
dx=30 # horizonal resolution dx=dy in [kml]
xdim_d01=56 # number of points in x
ydim_d01=50 # number of points in y
#
# Nest 1 (d02): information read only if max_domains>1
refine_d02=5 # refinement coefficient from parent
i_str_d02=32 # starting index in x-dir from the parent domain
j_str_d02=153 # starting index in y-dir from the parent domain
xdim_d02=456 # nb of points, must check: xdim_child=N*refine_coef+1
ydim_d02=476 # nb of points, must check: ydim_child=M*refine_coef+1
#
# Nest 2 (d03): information read only if max_domains>2
refine_d03=3 # refinement coefficient from previous nest
i_str_d03=35 # starting index in x-dir from the previous nest
j_str_d03=24 # starting index in y-dir from the previous nest
xdim_d03=277 # nb of points, must check: xdim_child=N*refine_coef+1
ydim_d03=349 # nb of points, must check: ydim_child=M*refine_coef+1
start_date_d03=$start_date_d01
end_date_d03=$end_date_d01
# Other information for geogrid
#-------------------------------
central_lat=-32.0 # central longitude of the parent domain
central_lon=15.0 # central latitude of the parent domain
projection='mercator' # projection used
#
# resolution of the topographic data to use for each domain
topo_res_d01='30s+10m'
topo_res_d02='3s+30s'
topo_res_d03='3s+30s'
# Other information for ungrib
#------------------------------
obc_freq_h=6 # boundary condition frequency [hour]
#
# suffix for Vtable to use
LBC_type="CFSR_press_pgbh06" # for initial and boundary forcing
LSM_type="CFSR_sfc_flxf06" # for surface data (if different from boundary data)
#!/bin/bash
#PBS -l select=1:ncpus=24:mpiprocs=8
#PBS -P WCHPC
#PBS -q smp
#PBS -l walltime=01:00:00
cd $PBS_O_WORKDIR
./run_wps.bash configure.namelist.wps 8
#!/bin/bash
#SBATCH --job-name=Run_wps
#SBATCH --partition=slims
#SBATCH --ntasks=1
#SBATCH --time=12:00:00 # temps d execution maximum demande (HH:MM:SS)
#SBATCH --output=run_wps.out
#SBATCH --error=run_wps.err
cd ${SLURM_SUBMIT_DIR}
#===============================================================================
umask 022
set -u
./run_wps.bash configure.namelist.wps 1
......@@ -107,7 +107,7 @@ source ../../myenv_mypath.sh
# WPS paths
# WPS source dir
export WPS_EXE_DIR="${ATM}/../WPS4.2"
export WPS_EXE_DIR="${ATM}/../WPS"
# Data dir
DATA_DIR=${CWORK}/DATA
#
......@@ -120,10 +120,10 @@ export Vtable_ROOT="$PWD"
#
# Inputs directory and prefix (initial and boundary data)
export I_DATAROOT="$DATA_DIR/CFSR_grib"
export I_DATAprefix="200901*pgbh06.gdas"
export I_DATAprefix="200501*pgbh06.gdas"
# Surface Inputs directory and prefix (if different surface file)
export SFC_DATAROOT="$DATA_DIR/CFSR_grib"
export SFC_DATAprefix="200901*flxf06.gdas"
export SFC_DATAprefix="200501*flxf06.gdas"
#
# Outputs data directory
export O_DATAROOT="${ATM_FILES_DIR}/WPS_DATA"
......@@ -137,9 +137,9 @@ else
fi
#
# MPI launch commands
if [ ${MACHINE} == "JEANZAY" ]; then
if [ ${MACHINE} == "JEANZAY" ] || [ ${MACHINE} == "LEFTRARU" ]; then
export myMPI="srun -n $NBPROCS "
elif [ ${MACHINE} == "DATARMOR" ]; then
elif [ ${MACHINE} == "DATARMOR" ] || [ ${MACHINE} == "WCHPC" ]; then
export myMPI="$MPI_LAUNCH -np $NBPROCS "
elif [ ${MACHINE} == "IRENE" ]; then
export myMPI="ccc_mprun -n $NBPROCS "
......@@ -183,7 +183,7 @@ echo "************************************************************"
cd $MYWORKDIR
#----------------------------------------------
# Rescale parameters from configure.namelist
# Rescale parameters from configure.namelist.wps
#----------------------------------------------
export interval_s=`expr $obc_freq_h \* 3600`
export interval_s_SFC=$interval_s
......@@ -251,6 +251,18 @@ else
exit 1
fi
#--------------------------------------
# Prepare dates
#--------------------------------------
start_date_d01=$start_y'-'$start_m'-'$start_d'_'$start_h:00:00
end_date_d01=$end_y'-'$end_m'-'$end_d'_'$end_h:00:00
start_date_d02=$start_date_d01
end_date_d02=$end_date_d01
start_date_d03=$start_date_d01
end_date_d03=$end_date_d01
# O O O O O O O O O START geogrid O O O O O O O O O
if [ $switch_geogrid -eq 1 ]; then
......@@ -265,7 +277,7 @@ if [ $switch_geogrid -eq 1 ]; then
echo " "
#------------------------------------------------
# Create namelist.wps from configure.namelist
# Create namelist.wps from configure.namelist.wps
#------------------------------------------------
if [ -e namelist.wps ] ; then
rm -f namelist.wps
......@@ -293,7 +305,7 @@ cat << End_Of_Namelist | sed -e 's/#.*//; s/ *$//' > ./namelist.wps
geog_data_res = $topo_res_d01, $topo_res_d02, $topo_res_d03,
dx = $dx_d01,
dy = $dx_d01,
map_proj = 'mercator',
map_proj = $projection,
ref_lat = $central_lat
ref_lon = $central_lon
truelat1 = $central_lat,
......@@ -304,10 +316,10 @@ cat << End_Of_Namelist | sed -e 's/#.*//; s/ *$//' > ./namelist.wps
/
End_Of_Namelist
cp namelist.wps namelist.wps.geogrid.${domain_name}
cp namelist.wps namelist.wps.geogrid
#${myMPI}geogrid.exe >& geogrid.log
./geogrid.exe >& geogrid.log
${myMPI}geogrid.exe >& geogrid.log
#./geogrid.exe >& geogrid.log
echo "% list geogrid output directory $O_DATAROOT :"
ls $O_DATAROOT
fi
......@@ -405,7 +417,7 @@ cat << End_Of_Namelist | sed -e 's/#.*//; s/ *$//' > ./namelist.wps
/
End_Of_Namelist
cp namelist.wps namelist.wps.ungrib.${LBC_type}.${domain_name}
cp namelist.wps namelist.wps.ungrib.${LBC_type}
#-----------------------------------
# check VTABLE for LBC and make link
......@@ -478,7 +490,7 @@ cat << End_Of_Namelist | sed -e 's/#.*//; s/ *$//' > ./namelist.wps
/
End_Of_Namelist
cp namelist.wps namelist.wps.ungrib.${LSM_type}.${domain_name}
cp namelist.wps namelist.wps.ungrib.${LSM_type}
#--------------------------
# Check VTABLE for LSM
......@@ -577,10 +589,10 @@ if [ $switch_metgrid -eq 1 ]; then
/
End_Of_Namelist
cp namelist.wps namelist.wps.metgrid.${domain_name}
cp namelist.wps namelist.wps.metgrid
#${myMPI}metgrid.exe >& metgrid.log
./metgrid.exe >& metgrid.log
${myMPI}metgrid.exe >& metgrid.log
#./metgrid.exe >& metgrid.log
echo " ls -rtl $O_DATAROOT"
ls -rtl $O_DATAROOT*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment