Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nemo/nemo
  • sparonuz/nemo
  • hatfield/nemo
  • extdevs/nemo
4 results
Show changes
Showing
with 172 additions and 277 deletions
......@@ -51,8 +51,8 @@
iis = Nis0 ; iie = Nie0
ijs = Njs0 ; ije = Nje0
ELSE
iis = 1 ; iie = jpi
ijs = 1 ; ije = jpj
iis = 1 ; iie = ipi
ijs = 1 ; ije = ipj
ENDIF
!
ctmp = CMPLX( 0.e0, 0.e0, dp ) ! warning ctmp is cumulated
......
......@@ -151,14 +151,14 @@ CONTAINS
! !* wind forcing *!
IF( ln_bt_fw ) THEN
DO_2D( 0, 0, 0, 0 )
Ue_rhs(ji,jj) = Ue_rhs(ji,jj) + r1_rho0 * utau(ji,jj) * r1_hu(ji,jj,Kbb)
Ve_rhs(ji,jj) = Ve_rhs(ji,jj) + r1_rho0 * vtau(ji,jj) * r1_hv(ji,jj,Kbb)
Ue_rhs(ji,jj) = Ue_rhs(ji,jj) + r1_rho0 * utauU(ji,jj) * r1_hu(ji,jj,Kbb)
Ve_rhs(ji,jj) = Ve_rhs(ji,jj) + r1_rho0 * vtauV(ji,jj) * r1_hv(ji,jj,Kbb)
END_2D
ELSE
zztmp = r1_rho0 * r1_2
DO_2D( 0, 0, 0, 0 )
Ue_rhs(ji,jj) = Ue_rhs(ji,jj) + zztmp * ( utau_b(ji,jj) + utau(ji,jj) ) * r1_hu(ji,jj,Kbb)
Ve_rhs(ji,jj) = Ve_rhs(ji,jj) + zztmp * ( vtau_b(ji,jj) + vtau(ji,jj) ) * r1_hv(ji,jj,Kbb)
Ue_rhs(ji,jj) = Ue_rhs(ji,jj) + zztmp * ( utau_b(ji,jj) + utauU(ji,jj) ) * r1_hu(ji,jj,Kbb)
Ve_rhs(ji,jj) = Ve_rhs(ji,jj) + zztmp * ( vtau_b(ji,jj) + vtauV(ji,jj) ) * r1_hv(ji,jj,Kbb)
END_2D
ENDIF
!
......
......@@ -317,22 +317,22 @@ CONTAINS
!
ENDIF
!
CALL histdef( nid_T, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! utau
& jpi, jpj, nh_T, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histdef( nid_T, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! vtau
& jpi, jpj, nh_T, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histend( nid_T, snc4chunks=snc4set )
! !!! nid_U : 3D
CALL histdef( nid_U, "ssu_m", "Velocity component in x-direction", "m/s" , & ! ssu
& jpi, jpj, nh_U, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! utau
& jpi, jpj, nh_U, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histend( nid_U, snc4chunks=snc4set )
! !!! nid_V : 3D
CALL histdef( nid_V, "ssv_m", "Velocity component in y-direction", "m/s", & ! ssv_m
& jpi, jpj, nh_V, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! vtau
& jpi, jpj, nh_V, 1 , 1, 1 , - 99, 32, clop, zsto, zout )
CALL histend( nid_V, snc4chunks=snc4set )
......@@ -366,6 +366,8 @@ CONTAINS
CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux
CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction
CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed
CALL histwrite( nid_T, "sozotaux", it, utau , ndim_hT, ndex_hT ) ! i-wind stress
CALL histwrite( nid_T, "sometauy", it, vtau , ndim_hT, ndex_hT ) ! j-wind stress
!
IF( ln_abl ) THEN
ALLOCATE( zw3d_abl(jpi,jpj,jpka) )
......@@ -393,11 +395,9 @@ CONTAINS
! Write fields on U grid
CALL histwrite( nid_U, "ssu_m" , it, ssu_m , ndim_hU, ndex_hU ) ! i-current speed
CALL histwrite( nid_U, "sozotaux", it, utau , ndim_hU, ndex_hU ) ! i-wind stress
! Write fields on V grid
CALL histwrite( nid_V, "ssv_m" , it, ssv_m , ndim_hV, ndex_hV ) ! j-current speed
CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress
! 3. Close all files
! ---------------------------------------
......
......@@ -114,9 +114,9 @@ CONTAINS
zrhs_u = - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
zrhs_v = - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
! ! wind stress and layer friction
zrhs_u = zrhs_u + z1_2rho0 * ( utau_b(ji,jj) + utau(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
zrhs_u = zrhs_u + z1_2rho0 * ( utau_b(ji,jj) + utauU(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
& - rn_rfr * uu(ji,jj,jk,Nbb)
zrhs_v = zrhs_v + z1_2rho0 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
zrhs_v = zrhs_v + z1_2rho0 * ( vtau_b(ji,jj) + vtauV(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
& - rn_rfr * vv(ji,jj,jk,Nbb)
! ! ==> RHS
uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + zrhs_u
......
......@@ -135,9 +135,9 @@ CONTAINS
zrhs_v = - grav * ( ssh(ji,jj+1,Nbb) - ssh(ji,jj,Nbb) ) * r1_e2v(ji,jj)
#if defined key_RK3all
! ! wind stress and layer friction
zrhs_u = zrhs_u + r1_rho0 * ( z5_6*utau_b(ji,jj) + (1._wp - z5_6)*utau(ji,jj) ) / e3u(ji,jj,jk,Nbb) &
zrhs_u = zrhs_u + r1_rho0 * ( z5_6*utau_b(ji,jj) + (1._wp - z5_6)*utauU(ji,jj) ) / e3u(ji,jj,jk,Nbb) &
& - rn_rfr * uu(ji,jj,jk,Nbb)
zrhs_v = zrhs_v + r1_rho0 * ( z5_6*vtau_b(ji,jj) + (1._wp - z5_6)*vtau(ji,jj) ) / e3v(ji,jj,jk,Nbb) &
zrhs_v = zrhs_v + r1_rho0 * ( z5_6*vtau_b(ji,jj) + (1._wp - z5_6)*vtauV(ji,jj) ) / e3v(ji,jj,jk,Nbb) &
& - rn_rfr * vv(ji,jj,jk,Nbb)
#endif
! ! ==> RHS
......@@ -201,9 +201,9 @@ CONTAINS
zrhs_v = - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
#if defined key_RK3all
! ! wind stress and layer friction
zrhs_u = zrhs_u + r1_rho0 * ( z3_4*utau_b(ji,jj) + (1._wp - z3_4)*utau(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
zrhs_u = zrhs_u + r1_rho0 * ( z3_4*utau_b(ji,jj) + (1._wp - z3_4)*utauU(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
& - rn_rfr * uu(ji,jj,jk,Nbb)
zrhs_v = zrhs_v + r1_rho0 * ( z3_4*vtau_b(ji,jj) + (1._wp - z3_4)*vtau(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
zrhs_v = zrhs_v + r1_rho0 * ( z3_4*vtau_b(ji,jj) + (1._wp - z3_4)*vtauV(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
& - rn_rfr * vv(ji,jj,jk,Nbb)
#endif
! ! ==> RHS
......@@ -265,9 +265,9 @@ CONTAINS
zrhs_u = - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
zrhs_v = - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
! ! wind stress and layer friction
zrhs_u = zrhs_u + z1_2rho0 * ( utau_b(ji,jj) + utau(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
zrhs_u = zrhs_u + z1_2rho0 * ( utau_b(ji,jj) + utauU(ji,jj) ) / e3u(ji,jj,jk,Nnn) &
& - rn_rfr * uu(ji,jj,jk,Nbb)
zrhs_v = zrhs_v + z1_2rho0 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
zrhs_v = zrhs_v + z1_2rho0 * ( vtau_b(ji,jj) + vtauV(ji,jj) ) / e3v(ji,jj,jk,Nnn) &
& - rn_rfr * vv(ji,jj,jk,Nbb)
! ! ==> RHS
uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + zrhs_u
......
......@@ -109,7 +109,7 @@ CONTAINS
vtau_ice(ji,jj) = 0.1_wp + zztmp
END_2D
CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. )
CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'T', -1., vtau_ice, 'T', -1. )
#endif
!
END SUBROUTINE usrdef_sbc_ice_tau
......
......@@ -20,15 +20,15 @@
<field field_ref="ssrelpotvor" />
<field field_ref="saltc" />
<field field_ref="salt2c" />
<field field_ref="utau" />
<field field_ref="vtau" />
</file>
<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
<field field_ref="utau" />
<field field_ref="uoce" />
</file>
<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
<field field_ref="vtau" />
<field field_ref="voce" />
</file>
......
......@@ -15,7 +15,7 @@ function ncmdn { ncap2 -O -C -v -s "foo=gsl_stats_median_from_sorted_data(${1}.s
## Variables which may need to be adapted to your experiment:
##
# RUNDIR = directory where the test case is executed: contains all outputs
RUNDIR=/gpfswork/rech/omr/romr001/OUT/CPLTESTCASE/2020-03-31120816
RUNDIR=`pwd`
# NB_NEMO_IT = expected total number of NEMO iterations
NB_NEMO_IT=160
# NB_OASIS_OUTFILES = number of debug.root.0* OASIS output files
......
......@@ -10,9 +10,10 @@
<variable_definition>
<variable id="info_level" type="int">10</variable>
<variable id="using_server" type="bool">false</variable>
<variable id="using_server" type="bool">true</variable>
<variable id="using_oasis" type="bool">true</variable>
<variable id="oasis_codes_id" type="string" >oceanx</variable>
<variable id="call_oasis_enddef" type="bool">false</variable>
</variable_definition>
</context>
......
#!/bin/bash
#!/usr/bin/env bash
###################################
## Definitions for batch system
#SBATCH -A omr@cpu # Accounting information
......@@ -11,10 +12,12 @@
#SBATCH --output=cpltestcase_%j # Name of output listing file
#SBATCH --error=cpltestcase_%j # Name of error listing file (the same)
###################################
set -x
ulimit -s unlimited
##
## CONFIG_DIR is submission directory
##
CONFIG_DIR=${SLURM_SUBMIT_DIR}
CONFIG_DIR=${SLURM_SUBMIT_DIR:-$(pwd)}
#
cd ${CONFIG_DIR}
pwd
......@@ -52,6 +55,7 @@ done
##
cp $CONFIG_DIR/nemo nemo.exe || exit 5
cp $TOYATM_DIR/toyatm.exe . || exit 5
cp $XIOS_DIR/bin/xios_server.exe . || exit 5
##
## Get script generating summary report
cp $CONFIG_DIR/gen_report.sh .
......@@ -62,12 +66,13 @@ echo '(3) Prepare launch of the run'
echo '----------------'
export MPIRUN="srun --mpi=pmi2 --cpu-bind=cores -K1"
NB_PROCS_NEMO=28
NB_PROCS_OASIS=1
NB_PROCS_TOYATM=1
NB_PROCS_XIOS=1
date
touch ./run_file
echo 0-27 ./nemo.exe >>./run_file
echo 28 ./toyatm.exe >>./run_file
echo 29 ./xios_server.exe >>./run_file
echo run_file
cat ./run_file
##
......
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
#set -vx
# ncmax $var_nm $fl_nm : What is maximum of variable?
function ncmax { ncap2 -O -C -v -s "foo=${1}.max();print(foo)" ${2} ~/foo.nc | cut -f 3- -d ' ' ; }
# ncmin $var_nm $fl_nm : What is minimum of variable?
function ncmin { ncap2 -O -C -v -s "foo=${1}.min();print(foo)" ${2} ~/foo.nc | cut -f 3- -d ' ' ; }
# ncmdn $var_nm $fl_nm : What is median of variable?
function ncmdn { ncap2 -O -C -v -s "foo=gsl_stats_median_from_sorted_data(${1}.sort());print(foo)" ${2} ~/foo.nc | cut -f 3- -d ' ' ; }
##
## simple report generator for the test case
##
##
## Variables which may need to be adapted to your experiment:
##
# RUNDIR = directory where the test case is executed: contains all outputs
RUNDIR=`pwd`
# NB_NEMO_IT = expected total number of NEMO iterations
NB_NEMO_IT=160
# NB_OASIS_OUTFILES = number of debug.root.0* OASIS output files
NB_OASIS_OUTFILES=2
##
## END of variables to be checked - Nothing need to be changed below
##
# check if directory is here
if [ ! -d $RUNDIR ]; then
printf "%-27s %s %s\n" $RUNDIR "directory does not exist. Check RUNDIR variable in script. Stop"
return
fi
cd $RUNDIR
echo " "
echo "Check results of test case in directory: " `pwd`
echo " "
##
## Check if OASIS execution has been successful
##
echo " OASIS successful (true if OASIS outputs in debug.root.0? includes SUCCESSFUL RUN) : "
count=0
for file in debug.root.0*
do
echo $file ; grep "SUCCESSFUL RUN" $file
count=`expr $count + 1`
done
echo "OASIS success checked on $count files"
[ $count = $NB_OASIS_OUTFILES ] && echo true || echo false
##
## Check if NEMO execution has been sucessful
##
echo " "
echo " NEMO execution is successful if the run.stat file contains one line for each of NB_NEMO_IT iterations, indicating they have indeed been computed"
if [ ! -f ./run.stat ]; then
echo " the run.stat file does not exist: NEMO did not end its first time step"
echo " NEMO UNSUCESSFUL. Stop"
return
fi
echo "From run.stat NEMO output file, NEMO has executed the 160 time steps:"
nemo_iterations=`wc -l ./run.stat | awk {'print $1'} `; [ $nemo_iterations = $NB_NEMO_IT ] && echo true || echo false
##
## Check mean value of sst field seen by toyatm
##
if [ ! -f ./ATSSTSST_toyatm_01.nc ]; then
echo " the ATSSTSST_toyatm_01.nc file does not exist: the test is not successful"
echo " Test case UNSUCESSFUL. Stop"
return
fi
echo " "
echo "Examining ATSSTSST variable sea surface temperature as seen by toyatm, unit is degree Kelvin (min. should be around 271., max. around 302., median around 280.)"
ASSTmin=`ncmin ATSSTSST ATSSTSST_toyatm_01.nc`
ASSTmax=`ncmax ATSSTSST ATSSTSST_toyatm_01.nc`
ASSTmed=`ncmdn ATSSTSST ATSSTSST_toyatm_01.nc`
echo "Minimum value of ATSSTSST variable in ATSSTSST_toyatm_01.nc file = " $ASSTmin
echo "Maximum value of ATSSTSST variable in ATSSTSST_toyatm_01.nc file = " $ASSTmax
echo "Median value of ATSSTSST variable in ATSSTSST_toyatm_01.nc file = " $ASSTmed
MINMAX=0
if [ ${ASSTmin%%.*} -lt 270 -o ${ASSTmax%%.*} -gt 310 ]; then
echo " Min. or max. values of ATSSTSST do not look reasonable. Check the test again "
MINMAX=1
fi
##
## Summary
##
echo " "
if [ $count = $NB_OASIS_OUTFILES ] && [ $nemo_iterations = $NB_NEMO_IT ] && [ $MINMAX = 0 ]
then
echo " The run looks very succesful!"
echo " Have a look to the ASTSSTSST.nc file (using ncview for example): sea surface temperatures as seen by the toyatm and compare it to the reference file (CPL/ref_ATSSTSST_last_time_step.jpg) "
echo " Units are in degrees Kelvin and it will confirm the test is successful"
echo " "
else
echo "The test case is unsuccessful. Check all inputs and outputs"
fi
......@@ -34,6 +34,8 @@
<field field_ref="qt_oce" name="qt_oce" />
<field field_ref="saltflx" name="sfx" />
<field field_ref="taum" name="taum" />
<field field_ref="utau" name="tauuo" />
<field field_ref="vtau" name="tauvo" />
<field field_ref="wspd" name="windsp" />
<field field_ref="precip" name="precip" />
<!-- ice and snow -->
......@@ -44,7 +46,6 @@
<field field_ref="e3u" />
<field field_ref="ssu" name="uos" />
<field field_ref="uoce" name="uo" operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
<field field_ref="utau" name="tauuo" />
<field field_ref="uocetr_eff" name="uocetr_eff" />
<!-- available with diaar5 -->
<field field_ref="u_masstr" name="vozomatr" />
......@@ -56,7 +57,6 @@
<field field_ref="e3v" />
<field field_ref="ssv" name="vos" />
<field field_ref="voce" name="vo" operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
<field field_ref="vtau" name="tauvo" />
<field field_ref="vocetr_eff" name="vocetr_eff" />
<!-- available with diaar5 -->
<field field_ref="v_masstr" name="vomematr" />
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.