Skip to content

Commit

Permalink
rebase to head
Browse files Browse the repository at this point in the history
  • Loading branch information
jupalm committed Dec 20, 2024
2 parents 1233ce7 + 0f4617f commit 2b1660c
Show file tree
Hide file tree
Showing 101 changed files with 3,043 additions and 213 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ cfgs/GLOBAL_QCO_MEDUSA/MY_SRC/*.F90
head/
ISSUE.md

data/INPUT_eORCA025
data/INPUT_eORCA1
data/INPUT_eORCA12
scripts/compile_nemo
scripts/compile_tools
scripts/python/mkslurm_NPD
tools/INITIAL_CONDITIONS/dev
tools/INITIAL_CONDITIONS/data


# Created by https://www.toptal.com/developers/gitignore/api/jupyternotebooks,fortran,svn,matlab,python,emacs,vim
# Edit at https://www.toptal.com/developers/gitignore?templates=jupyternotebooks,fortran,svn,matlab,python,emacs,vim

Expand Down
4 changes: 2 additions & 2 deletions arch/NOC/arch-Anemone-ifort-xios3.fcm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
%NCDF_HOME $EBROOTNETCDF
%HDF5_HOME $EBROOTHDF5
%XIOS_HOME /home/acc/xios3-trunk-head
%XIOS_HOME /dssgfs01/working/atb299/XIOS3
#%OASIS_HOME /not/defined

%NCDF_INC -I%NCDF_HOME/include
Expand All @@ -45,7 +45,7 @@
#%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip

%CPP cpp
%FC mpiifort -c -fpp -fpp-name:/opt/software/eb/software/GCCcore/11.2.0/bin/cpp -Dkey_xios3 -Wp,-P,-traditional
%FC mpiifort -c -fpp -fpp-name:/opt/software/rocky9/eb/software/GCCcore/12.3.0/bin/cpp -Dkey_xios3 -Wp,-P,-traditional
%FCFLAGS -i4 -r8 -O3 -fp-model precise -fno-alias
%FFLAGS %FCFLAGS
%LD mpiifort
Expand Down
4 changes: 2 additions & 2 deletions arch/NOC/arch-Anemone-ifort.fcm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
%NCDF_HOME $EBROOTNETCDF
%HDF5_HOME $EBROOTHDF5
%XIOS_HOME /home/acc/xios-trunk
%XIOS_HOME /dssgfs01/working/atb299/XIOS3
#%OASIS_HOME /not/defined

%NCDF_INC -I%NCDF_HOME/include
Expand All @@ -45,7 +45,7 @@
#%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip

%CPP cpp
%FC mpiifort -c -fpp -fpp-name:/opt/software/eb/software/GCCcore/11.2.0/bin/cpp -Wp,-P,-traditional
%FC mpiifort -c -fpp -fpp-name:/opt/software/rocky9/eb/software/GCCcore/12.3.0/bin/cpp -Wp,-P,-traditional
%FCFLAGS -i4 -r8 -O3 -fp-model precise -fno-alias
%FFLAGS %FCFLAGS
%LD mpiifort
Expand Down
4 changes: 2 additions & 2 deletions cfgs/GLOBAL_QCO/MY_SRC/icethd_pnd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ SUBROUTINE pnd_TOPO
! differential growth of base of surface floating ice layer
zdTice = MAX( - ( t_su(ji,jj,jl) - zTd ) , 0._wp ) ! > 0
zomega = rcnd_i * zdTice / zrhoi_L
zdHui = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_i(ji,jj,jl) )**2 ) &
- v_il(ji,jj,jl) / a_i(ji,jj,jl)
zdHui = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_ip(ji,jj,jl) )**2 ) &
- v_il(ji,jj,jl) / a_ip(ji,jj,jl)
zdvice = min( zdHui*a_ip(ji,jj,jl) , v_ip(ji,jj,jl) )

IF ( zdvice > epsi10 ) THEN
Expand Down
24 changes: 16 additions & 8 deletions cfgs/GLOBAL_QCO/eORCA025/iodef.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,29 @@
</variable_definition>
<pool_definition>
<pool name="Opool" nprocs="96">
<service name="t1dwriter" nprocs="4" type="writer"/>
<service name="t1dwriter" nprocs="3" type="writer"/>
<service name="s1dwriter" nprocs="1" type="writer"/>
<service name="t5dwriter" nprocs="4" type="writer"/>
<service name="w5dwriter" nprocs="4" type="writer"/>
<service name="w5dwriter" nprocs="3" type="writer"/>
<service name="s5dwriter" nprocs="1" type="writer"/>
<service name="iwriter" nprocs="4" type="writer"/>
<service name="t1mwriter" nprocs="4" type="writer"/>
<service name="w1mwriter" nprocs="4" type="writer"/>
<service name="u1dwriter" nprocs="4" type="writer"/>
<service name="u5dwriter" nprocs="4" type="writer"/>
<service name="u1mwriter" nprocs="4" type="writer"/>
<service name="w1mwriter" nprocs="3" type="writer"/>
<service name="s1mwriter" nprocs="1" type="writer"/>
<service name="u1dwriter" nprocs="2" type="writer"/>
<service name="u5dwriter" nprocs="2" type="writer"/>
<service name="u1mwriter" nprocs="2" type="writer"/>
<service name="v1dwriter" nprocs="2" type="writer"/>
<service name="v5dwriter" nprocs="2" type="writer"/>
<service name="v1mwriter" nprocs="2" type="writer"/>
<service name="tgatherer" nprocs="24" type="gatherer"/>
<service name="igatherer" nprocs="8" type="gatherer"/>
<service name="ugatherer" nprocs="16" type="gatherer"/>
<service name="t1ywriter" nprocs="4" type="writer"/>
<service name="w1ywriter" nprocs="4" type="writer"/>
<service name="u1ywriter" nprocs="4" type="writer"/>
<service name="w1ywriter" nprocs="3" type="writer"/>
<service name="s1ywriter" nprocs="1" type="writer"/>
<service name="u1ywriter" nprocs="2" type="writer"/>
<service name="v1ywriter" nprocs="2" type="writer"/>
</pool>
</pool_definition>
</context>
Expand Down
11 changes: 8 additions & 3 deletions cfgs/GLOBAL_QCO/eORCA025/namelist_cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
&namtsd
cn_dir = './INPUT/',
ln_tsd_init = .false.,
sn_tem = 'EN.4.1.1.f.analysis.g10.1995-2014.eORCA025_v4.2.teos10.nc', -1, 'temperature', .true., .true., 'yearly',
sn_tem = 'woa23_decav71A0_TS_TEOS10_eORCA025.nc', -1, 'temperature', .true., .true., 'yearly',
'', '', '',
sn_sal = 'EN.4.1.1.f.analysis.g10.1995-2014.eORCA025_v4.2.teos10.nc', -1, 'salinity', .true., .true., 'yearly',
sn_sal = 'woa23_decav71A0_TS_TEOS10_eORCA025.nc', -1, 'salinity', .true., .true., 'yearly',
'', '', '',
/

Expand Down Expand Up @@ -67,6 +67,8 @@
sn_tair = 'tas', 3, 'tas', .true., .false., 'yearly', 'weights_grid_jra_bilin_e025_nohaloes_full.nc', '', ''
sn_wndi = 'uas', 3, 'uas', .true., .false., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Ume', ''
sn_wndj = 'vas', 3, 'vas', .true., .false., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Vme', ''
sn_uoatm = 'uos', -12, 'uos', .false., .true., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Uoceatm', ''
sn_voatm = 'vos', -12, 'vos', .false., .true., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Voceatm', ''
/

&namtra_qsr
Expand All @@ -82,7 +84,7 @@
nn_sssr = 2,
rn_deds = -33.3333333,
cn_dir = './INPUT/',
sn_sss = 'sss_1m_teos10_v4.2.nc', -1, 'salinity', .true., .true., 'yearly',
sn_sss = 'woa23_decav91C0_sss_TEOS10_eORCA025.nc', -1, 'salinity', .true., .true., 'yearly',
'', '', '',
/

Expand Down Expand Up @@ -232,3 +234,6 @@
ln_diacfl = .true.,
/

&namtrd
ln_tra_trd = .true.,
/
3 changes: 3 additions & 0 deletions cfgs/GLOBAL_QCO/eORCA025/namelist_cfg_ERA5
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
sn_tair = 't2m', 1, 't2m', .true., .false., 'monthly', 'weights_ERA5_eORCA025_bilin.nc', '', ''
sn_wndi = 'u10', 1, 'u10', .true., .false., 'monthly', 'weights_ERA5_eORCA025_bicub.nc', 'Ume', ''
sn_wndj = 'v10', 1, 'v10', .true., .false., 'monthly', 'weights_ERA5_eORCA025_bicub.nc', 'Vme', ''
! ATB: Need to check whether uos,vos are required for ERA5, and if so what fields to use.
! sn_uoatm = 'uos', -12, 'uos', .false., .true., 'yearly', 'weights_ERA5_eORCA025_bicub.nc', 'Uoceatm', ''
! sn_voatm = 'vos', -12, 'vos', .false., .true., 'yearly', 'weights_ERA5_eORCA025_bicub.nc', 'Voceatm', ''
/

&namtra_qsr
Expand Down
6 changes: 4 additions & 2 deletions cfgs/GLOBAL_QCO/eORCA025/namelist_cfg_JRA55
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
cn_ocerst_outdir = './RESTARTS',
nn_stock = 70128,
ln_mskland = .true.,
ln_rst_list = .false.
nn_stocklist = 0,0,0,0,0,0,0,0,0,0
/

&namdom
Expand Down Expand Up @@ -65,6 +67,8 @@
sn_tair = 'tas', 3, 'tas', .true., .false., 'yearly', 'weights_grid_jra_bilin_e025_nohaloes_full.nc', '', ''
sn_wndi = 'uas', 3, 'uas', .true., .false., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Ume', ''
sn_wndj = 'vas', 3, 'vas', .true., .false., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Vme', ''
sn_uoatm = 'uos', -12, 'uos', .false., .true., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Uoceatm', ''
sn_voatm = 'vos', -12, 'vos', .false., .true., 'yearly', 'weights_grid_jra_bicubic_e025_nohaloes_full.nc', 'Voceatm', ''
/

&namtra_qsr
Expand Down Expand Up @@ -134,7 +138,6 @@
&nambbl
ln_trabbl = .true.,
nn_bbl_adv = 1,

/

&nameos
Expand Down Expand Up @@ -162,7 +165,6 @@
nn_aei_ijk_t = 21,
ln_ldfeiv_dia = .true.,
nn_ldfeiv_shape = 2,

/

&namdyn_adv
Expand Down
48 changes: 35 additions & 13 deletions cfgs/GLOBAL_QCO/eORCA025/run_nemo1326_96x_26n.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
# time units used here for restart frequency and simulaion length
TIME_UNITS=0 # 0=years ; 1=days ; 2=hours
# Restart/resubmission frequency (in TIME_UNITS)
FREQRST=1
FREQRST=1
# job-step initial time step (0: infer from time.step)
# IT000 != 0 -> auto-resubmission is switched OFF
IT000=1
IT000=0
#
# Simulation original starting time step (unchanged for LENGTHxTIME_UNITS)
ITBEGIN=1
# Simulation length (in TIME_UNITS)
LENGTH=1
LENGTH=3
# Name of this script (to resubmit)
SCRIPTNAME=run_nemo1326_96x_26n.slurm
# If conducting the repeat and reset T and S spinup set SPIN to 1, else set to 0
SPIN=0
#
# Use of nn_stocklist to trigger end-of-year restarts regardless of leap- or non-leap-
# years, means job-steps have to be limited to no more than 10 years. Force this if
Expand All @@ -34,8 +36,9 @@ if [ "$TIME_UNITS" -eq 0 ] ; then
fi
# ========================================================
## modules load

module purge
module load NEMO/prg-env
module load libfabric/1.18.0-GCCcore-12.3.0

# ========================================================
# Define useful functions
Expand Down Expand Up @@ -136,6 +139,21 @@ if [ "$IT000" -gt 1 ]; then
RST_FILE=$RST_DIR/${OCERST_IN}_0000.nc
fi
read -r RST_YR START_MTH START_DAY START_YR <<< "$(date_from_restart $RST_FILE )"

if [ $SPIN = 1 ] ; then
START_YR=$RST_YR
edit_var ln_reset_ts ".true." ./namelist_cfg
edit_var nn_rstctl "0" ./namelist_cfg
elif [ $SPIN = 0 ] ; then
edit_var ln_reset_ts ".false." ./namelist_cfg
edit_var nn_rstctl "2" ./namelist_cfg
else
echo "Error: it is unclear whether this is a spinup with T and S reset, or a normal simulation"
exit 1
fi

echo "Start year is: " $START_YR

else
# Start from rest
edit_var ln_rstart ".false." ./namelist_cfg
Expand Down Expand Up @@ -170,12 +188,16 @@ if [ "$TIME_UNITS" -eq 0 ]; then
EXP_LENGTH=$(greg_length $EXP_START_YR )
LT=$(( LENGTH - 1 ))
if [ "$LT" -gt 0 ] ; then
for y in `seq 1 1 $LT`
do
EXP_START_YR=$(( EXP_START_YR + 1 ))
YL=$( greg_length $EXP_START_YR )
EXP_LENGTH=$(( EXP_LENGTH + YL ))
done
if [ $SPIN = 1 ] ; then
EXP_LENGTH=$(( EXP_LENGTH * LENGTH ))
else
for y in `seq 1 1 $LT`
do
EXP_START_YR=$(( EXP_START_YR + 1 ))
YL=$( greg_length $EXP_START_YR )
EXP_LENGTH=$(( EXP_LENGTH + YL ))
done
fi
fi
# convert from days to hours
EXP_LENGTH=$(( EXP_LENGTH * 24 ))
Expand All @@ -190,15 +212,15 @@ if [ "$TIME_UNITS" -eq 0 ]; then
LT=$(( FREQRST - 1 ))
if [ "$LT" -gt 0 ] ; then
for y in `seq 1 1 $LT`
do
do
START_YR=$(( START_YR + 1 ))
YL=$( greg_length $START_YR )
NEXT_STOCK="$(( NEXT_STOCK + YL * 24 * 60 * 60 / DT ))"
# stocklist is limited to length 10
if [ "$y" -lt 10 ] ; then
STOCK_LIST="${STOCK_LIST},${NEXT_STOCK}"
fi
done
done
fi
ITEND=$NEXT_STOCK
edit_var nn_stocklist "$STOCK_LIST" ./namelist_cfg
Expand Down Expand Up @@ -232,7 +254,7 @@ mkdir -p {RESTARTS,OUTPUT}
# Link nemo
ln -fs ../BLD/bin/nemo.exe nemo

export XIO_HOME=/home/acc/xios3-trunk-head
export XIO_HOME=/dssgfs01/working/atb299/XIOS3
#
export OMP_NUM_THREADS=1
export I_MPI_SHM=off
Expand Down
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/INPUT
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/axis_def_nemo.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/bfr_coef.nc
46 changes: 46 additions & 0 deletions cfgs/GLOBAL_QCO/eORCA1/context_nemo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
==============================================================================================
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 -->


<!-- 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 -->

<!-- Axis definition -->
<axis_definition src="./axis_def_nemo.xml"/>

<!-- Domain definition -->
<domain_definition src="./domain_def_nemo.xml"/>

<!-- Grids definition -->
<grid_definition src="./grid_def_nemo.xml"/>


</context>
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/domain_def_nemo.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/eddy_viscosity_3D.nc
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/field_def_nemo-ice.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/field_def_nemo-oce.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-ice_1m_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-ice_1y_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-ice_5d_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-oce_1d_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-oce_1m_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-oce_1y_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/file_def_nemo-oce_5d_C6.xml
1 change: 1 addition & 0 deletions cfgs/GLOBAL_QCO/eORCA1/grid_def_nemo.xml
Loading

0 comments on commit 2b1660c

Please sign in to comment.