-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from NOC-MSM/57-npd-medusa-orca1
57 npd medusa orca1
- Loading branch information
Showing
43 changed files
with
1,317 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../data/INPUT_eORCA1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/axis_def_nemo-medusa.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/axis_def_nemo.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INPUT/bfr_coef01.nc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
interval=1 # N of seconds between memory queries | ||
record_per_process=0 | ||
min_memory=0 | ||
|
||
|
||
usage=$"$(basename "$0") [-h] [-t n] [-p] \n | ||
where: \n | ||
-h show this help text \n | ||
-t sampling interval in seconds. Must be an integer \n | ||
-p record memory per user process. \n | ||
-m entries with memory below this thresold are ignored. Units in kilobites | ||
" | ||
|
||
while getopts m:pt:h flag | ||
do | ||
case "${flag}" in | ||
t) interval=${OPTARG};; | ||
h) echo -e $usage 1>&2 | ||
exit 1 | ||
;; | ||
p) record_per_process=1 ;; | ||
m) min_memory=${OPTARG} | ||
|
||
|
||
esac | ||
done | ||
|
||
|
||
|
||
|
||
if [ $record_per_process == 1 ] | ||
then | ||
echo "Step Memory Pid Name" | ||
else | ||
echo " Step total used free available" | ||
fi | ||
|
||
i=1 | ||
while [ 1 ] | ||
do | ||
if [ $record_per_process == 1 ] | ||
then | ||
# saves memory usage per process from ps | ||
ps -F | tail -n +2 | awk "{ if (\$6 > $min_memory) print $i,\$6,\$2,\$11 }" | ||
else | ||
# saves system wide memory usage | ||
#free --kilo | grep Mem | awk "{if (\$3 > $min_memory) print $i,\$3}" | ||
free --human | grep Mem | awk "{printf(\"%8.8d %8s %8s %8s %8s\n\",$i,\$2,\$3,\$4,\$7)}" | ||
fi | ||
sleep $interval | ||
|
||
i=$((i+interval)) | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
============================================================================================== | ||
NEMO context | ||
============================================================================================== | ||
--> | ||
<context id="nemo"> | ||
<!-- $id$ --> | ||
<variable_definition> | ||
<!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 --> | ||
<variable id="ref_year" type="int"> 1900 </variable> | ||
<variable id="ref_month" type="int"> 01 </variable> | ||
<variable id="ref_day" type="int"> 01 </variable> | ||
<variable id="rho0" type="float" > 1026.0 </variable> | ||
<variable id="cpocean" type="float" > 3991.86795711963 </variable> | ||
<variable id="convSpsu" type="float" > 0.99530670233846 </variable> | ||
<variable id="rhoic" type="float" > 917.0 </variable> | ||
<variable id="rhosn" type="float" > 330.0 </variable> | ||
<variable id="missval" type="float" > 1.e20 </variable> | ||
</variable_definition> | ||
|
||
<!-- Fields definition --> | ||
<field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics --> | ||
<field_definition src="./field_def_nemo-ice.xml"/> <!-- NEMO ocean sea ice --> | ||
<field_definition src="./field_def_nemo-medusa.xml"/> <!-- NEMO ocean sea ice --> | ||
|
||
|
||
<!-- Files definition --> | ||
<file_definition src="file_def_nemo-oce_1d_C6.xml"/> <!-- NEMO ocean dynamics --> | ||
<file_definition src="file_def_nemo-oce_5d_C6.xml"/> <!-- NEMO ocean dynamics --> | ||
<file_definition src="file_def_nemo-oce_1m_C6.xml"/> <!-- NEMO ocean dynamics --> | ||
<file_definition src="file_def_nemo-oce_1y_C6.xml"/> <!-- NEMO ocean dynamics --> | ||
|
||
<file_definition src="./file_def_nemo-ice_5d_C6.xml"/> <!-- NEMO ocean sea ice --> | ||
<file_definition src="./file_def_nemo-ice_1m_C6.xml"/> <!-- NEMO ocean sea ice --> | ||
<file_definition src="./file_def_nemo-ice_1y_C6.xml"/> <!-- NEMO ocean sea ice --> | ||
|
||
<file_definition src="./file_def_nemo-medusa_5d.xml"/> <!-- MEDUSA Ocean BGC --> | ||
<file_definition src="./file_def_nemo-medusa_1m.xml"/> <!-- MEDUSA Ocean BGC --> | ||
<file_definition src="./file_def_nemo-medusa_1y.xml"/> <!-- MEDUSA Ocean BGC --> | ||
|
||
<!-- Axis definition --> | ||
<axis_definition src="./axis_def_nemo-medusa.xml"/> | ||
|
||
<!-- Domain definition --> | ||
<domain_definition src="./domain_def_nemo.xml"/> | ||
|
||
<!-- Grids definition --> | ||
<grid_definition src="./grid_def_nemo-medusa.xml"/> | ||
|
||
|
||
</context> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/domain_def_nemo.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
#!/bin/bash | ||
|
||
# Slurm job options (job-name, job time) | ||
#SBATCH --job-name=archit | ||
#SBATCH --time=2:59:0 | ||
#SBATCH --ntasks=1 | ||
|
||
#SBATCH --account=n01-CLASS | ||
#SBATCH --partition=serial | ||
#SBATCH --qos=serial | ||
|
||
# Define memory required for this jobs. By default, you would | ||
# get just under 2 GB, but you can ask for up to 125 GB. | ||
#SBATCH --mem=8G | ||
|
||
# Set the number of threads to 1 | ||
# This prevents any threaded system libraries from automatically | ||
# using threading. | ||
export OMP_NUM_THREADS=1 | ||
# | ||
srcdir=${PWD}/OUTPUT/ | ||
dstroot=$1 ## target storing directory | ||
ecount=0 | ||
|
||
|
||
# ======================================================== | ||
## module loads | ||
module load cray-mpich/8.1.23 | ||
module load cray-hdf5-parallel/1.12.2.1 | ||
module load cray-netcdf-hdf5parallel/4.9.0.1 | ||
|
||
|
||
# ======================================================== | ||
# Define useful functions | ||
get_time_count () { | ||
VARNAME=time_counter | ||
NAMNAME=$1 | ||
VAR=$(ncdump -h ${NAMNAME} | grep "time_counter = ") | ||
VAR=${VAR%\ *} | ||
VAR=${VAR#*\(} | ||
echo "$VAR" | ||
} | ||
|
||
|
||
cd $srcdir | ||
|
||
## refresh copied and corrupted list | ||
rm to_be_deleted.txt | ||
rm corrupted_list.txt | ||
# | ||
echo ptrc files to proceed : | ||
ls *ptrc*nc | ||
# | ||
for year in `seq 1976 1 2023` | ||
do | ||
dstdir=${dstroot}/${year} | ||
# | ||
if [ ! -d $dstdir ] ; then mkdir -p $dstdir ; fi | ||
# | ||
for t in 1y 1m 5d 1d | ||
do | ||
for g in scalar icemod grid_U grid_V grid_W grid_T diad_T ptrc_T | ||
do | ||
files=`ls -1 *${t}_${g}_${year}* 2>/dev/null` | ||
#files=`ls \*${t}_${g}_${year}\* ` | ||
#echo ${t}_${g}_${year} | ||
if [ ${#files} -lt 1 ] ; then | ||
echo 'Nothing to transfer for '$g' at '${t}' interval in '${year} | ||
else | ||
scount=0 | ||
numfiles=`wc -w <<< ${files}` | ||
echo 'Transferring '${numfiles}' for '$g' at '${t}' interval:' | ||
for f in $files | ||
do | ||
time_c=$(get_time_count $f) | ||
if [ ! -f $dstdir/$f ] && [ ${time_c} >= 1 ] ; then | ||
## files not yet store and full --> copy them to storedir | ||
echo rsync -vtpo $f $dstdir | ||
rsync -vtpo $f $dstdir | ||
#cp -p $f $dstdir | ||
if [ $? -eq 0 ] ; then scount=$(( $scount + 1 )) ; fi | ||
elif [ -f $dstdir/$f ] ; then | ||
## file already there check if files are the same size : | ||
heres=`wc -c $f | cut -d' ' -f1` | ||
theres=`wc -c $dstdir/$f | cut -d' ' -f1` | ||
if [ $heres -eq $theres ] | ||
then | ||
#echo $f -- copy size match -- can safely erase local copy | ||
echo rm -f $f >> to_be_deleted.txt | ||
# rm -f $f | ||
else | ||
## file broken -- try to complete it | ||
echo fixing broken copy of $f with | ||
echo rsync -vtpo --append $f $dstdir | ||
rsync -vtpo --append $f $dstdir | ||
fi | ||
else | ||
## file not stored because empty or corrupted : record them in corrupted list | ||
echo $f >> corrupted_list.txt | ||
fi | ||
done | ||
if [ $scount -ne $numfiles ] ; then echo 'Errors have occurred' ; ecount=$(( $ecount + 1 )) ; fi | ||
fi | ||
done | ||
done | ||
done | ||
# | ||
if [ $ecount -gt 0 ] ; then | ||
echo 'ERRORS HAVE OCCURRED. Check log for Errors' | ||
else | ||
echo 'Transfers successful' | ||
fi | ||
# Find and delete all files of zero size in the current directory and subdirectories | ||
cd ${dstroot} | ||
echo 'Erasing empty copies --' | ||
find . -type f -size 0 -print -delete | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INPUT/eddy_viscosity_3D_eORCA1.nc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/field_def_nemo-ice.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED_MEDUSA/field_def_nemo-medusa.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/field_def_nemo-oce.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-ice_1m_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-ice_1y_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-ice_5d_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-medusa_1m.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-medusa_1y.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-medusa_5d.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-oce_1d_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-oce_1m_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-oce_1y_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/file_def_nemo-oce_5d_C6.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/grid_def_nemo-medusa.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SHARED/grid_def_nemo.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0"?> | ||
<simulation> | ||
|
||
<!-- ============================================================================================ --> | ||
<!-- XIOS context --> | ||
<!-- ============================================================================================ --> | ||
|
||
<!-- XIOS3 --> | ||
<context id="xios" > | ||
<variable_definition> | ||
<variable_group id="buffer"> | ||
<variable id="min_buffer_size" type="int">4000000</variable> | ||
<variable id="optimal_buffer_size" type="string">performance</variable> | ||
</variable_group> | ||
|
||
<variable_group id="parameters" > | ||
<variable id="using_server" type="bool">true</variable> | ||
<variable id="info_level" type="int">10</variable> | ||
<variable id="print_file" type="bool">false</variable> | ||
<variable id="using_server2" type="bool">false</variable> | ||
<variable id="transport_protocol" type="string" >p2p</variable> | ||
<variable id="using_oasis" type="bool">false</variable> | ||
</variable_group> | ||
</variable_definition> | ||
<pool_definition> | ||
<pool name="Opool" nprocs="57"> | ||
<service name="t1dwriter" nprocs="1" type="writer"/> | ||
<service name="u1dwriter" nprocs="1" type="writer"/> | ||
<service name="v1dwriter" nprocs="1" type="writer"/> | ||
<service name="s1dwriter" nprocs="1" type="writer"/> | ||
<service name="p5dwriter" nprocs="1" type="writer"/> | ||
<service name="t5dwriter" nprocs="1" type="writer"/> | ||
<service name="u5dwriter" nprocs="1" type="writer"/> | ||
<service name="v5dwriter" nprocs="1" type="writer"/> | ||
<service name="w5dwriter" nprocs="1" type="writer"/> | ||
<service name="s5dwriter" nprocs="1" type="writer"/> | ||
<service name="d1mwriter" nprocs="2" type="writer"/> | ||
<service name="p1mwriter" nprocs="2" type="writer"/> | ||
<service name="t1mwriter" nprocs="2" type="writer"/> | ||
<service name="u1mwriter" nprocs="1" type="writer"/> | ||
<service name="v1mwriter" nprocs="1" type="writer"/> | ||
<service name="w1mwriter" nprocs="2" type="writer"/> | ||
<service name="s1mwriter" nprocs="1" type="writer"/> | ||
<service name="d1ywriter" nprocs="2" type="writer"/> | ||
<service name="p1ywriter" nprocs="2" type="writer"/> | ||
<service name="t1ywriter" nprocs="2" type="writer"/> | ||
<service name="u1ywriter" nprocs="1" type="writer"/> | ||
<service name="v1ywriter" nprocs="1" type="writer"/> | ||
<service name="w1ywriter" nprocs="2" type="writer"/> | ||
<service name="s1ywriter" nprocs="1" type="writer"/> | ||
<service name="iwriter" nprocs="1" type="writer"/> | ||
<service name="pgatherer" nprocs="8" type="gatherer"/> | ||
<service name="tgatherer" nprocs="8" type="gatherer"/> | ||
<service name="igatherer" nprocs="4" type="gatherer"/> | ||
<service name="ugatherer" nprocs="4" type="gatherer"/> | ||
</pool> | ||
</pool_definition> | ||
</context> | ||
|
||
<!-- ============================================================================================ --> | ||
<!-- NEMO CONTEXT add and suppress the components you need --> | ||
<!-- ============================================================================================ --> | ||
|
||
<context id="nemo" default_pool_writer="Opool" default_pool_gatherer="Opool" src="./context_nemo.xml"/> <!-- NEMO --> | ||
|
||
</simulation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../GLOBAL_QCO/eORCA1/namelist_cfg |
Oops, something went wrong.