Quellcode durchsuchen

Adapted lemaitre3 and zenobe templates to iscpl.

Charles Pelletier vor 4 Jahren
Ursprung
Commit
0567e4b09e

+ 2 - 1
templates/genius/programs.cfg

@@ -25,5 +25,6 @@ xio_numproc=4
 fetish_src_dir=${nemo_src_dir}/EXTERNAL/isfcpl_scripts
 fetish_call="matlab -nodesktop -nojvm -r fETISh_Coupling_NEMO > toto"
 pp_fetish_call="python pp_fetish_toclust_nomovfront.py"
+pp_nemo_to_fetish_call="python pp_nemo_to_fetish_cluster.py"
 fetish_modules="matlab/R2019a"
-pp_fetish_modules="mlpy; module load CDO"
+pp_fetish_modules="mlpy; module load CDO"

+ 16 - 4
templates/lemaitre3/experiment.cfg

@@ -1,16 +1,28 @@
 # Experience name
-exp_name=EXMP
+exp_name=EXPMP
 
 # Simulation start and end date. Use any (reasonable) syntax you want.
 run_start_date="1958-01-01"
-run_duration="58 year"
+run_duration="4 years"
+leap_years=1
 
 # Restart frequency. Use any (reasonable) number and time unit you want.
 # For runs without restart, leave this variable empty or set to 0
 rst_freq="1 year"
 
 # Number of restart legs to be run in one go
-run_num_legs=20
+run_num_legs=4
+# Including (1) ice shelf coupling or not (0)
+isfcpl=1
+# Ice shelf coupling is performed every n_res_isfcpl NEMO restart legs
+n_res_perisfcpl=1
+
+# Number of restart legs to be run in one go
+run_num_legs=4
+# Including (1) ice shelf coupling or not (0)
+isfcpl=1
+# Ice shelf coupling is performed every n_res_isfcpl NEMO restart legs
+n_res_perisfcpl=1
 
 # Special restart
 special_restart=false
@@ -29,4 +41,4 @@ info_file="nemo.info"
 # Paths
 start_dir=${SLURM_SUBMIT_DIR-$PWD}
 run_dir="/scratch/ucl/elic/$USER/nemo/run/${exp_name}"
-archive_dir="/scratch/ucl/elic/$USER/nemo/archive/${exp_name}"
+archive_dir="/scratch/ucl/elic/$USER/nemo/archive/${exp_name}"

+ 13 - 1
templates/lemaitre3/namelists/build_namelist_cfg.sh

@@ -31,6 +31,10 @@ cat << EOF
    cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
    nn_stock      =  0             !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_iscpl = ${iscpl_nm}
+   ln_clobber = .true.
+   nn_istate = 0
+   nn_leapy  = ${leap_years}
 /
 !-----------------------------------------------------------------------
 &namcfg        !   parameters of the configuration
@@ -56,7 +60,7 @@ cat << EOF
 !-----------------------------------------------------------------------
 &namdom        !   space and time domain (bathymetry, mesh, timestep)
 !-----------------------------------------------------------------------
-   nn_msh      =    0                  !  create (=1) a mesh file or not (=0)
+   nn_msh      =    ${isfcpl}                  !  create (=1) a mesh file or not (=0)
    rn_hmin     =    20.                !  min depth of the ocean (>0) or min number of ocean level (<0)
    rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
    ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -79,6 +83,7 @@ cat << EOF
 !-----------------------------------------------------------------------
 &namsplit      !   time splitting parameters  ("key_dynspg_ts")
 !-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namcrs        !   Grid coarsening for dynamics output and/or
                !   passive tracer coarsened online simulations
@@ -189,6 +194,13 @@ cat << EOF
    sn_depmin_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmin_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
 /
 !-----------------------------------------------------------------------
+&namsbc_iscpl  !   land ice / ocean coupling option
+!-----------------------------------------------------------------------
+   nn_drown  = 100       ! number of iteration of the extrapolation loop (fill the new wet cells)
+   ln_hsb    = .false.  ! activate conservation module (conservation exact after a time of rn_fiscpl)
+   nn_fiscpl = 43800    ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency)
+/
+!-----------------------------------------------------------------------
 &namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
 !-----------------------------------------------------------------------
 /

+ 10 - 0
templates/lemaitre3/programs.cfg

@@ -17,3 +17,13 @@ nem_numproc=140
 xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-1.0/bin/xios_server.exe
 xio_numproc=4
 
+# -----------------------------------------------------------------------------
+# *** fETISh configuration
+# -----------------------------------------------------------------------------
+
+fetish_src_dir=${nemo_src_dir}/EXTERNAL/isfcpl_scripts
+fetish_call="matlab -nodesktop -nojvm -r fETISh_Coupling_NEMO > toto"
+pp_fetish_call="python pp_fetish_toclust_nomovfront.py"
+pp_nemo_to_fetish_call="python pp_nemo_to_fetish_cluster.py"
+fetish_modules="matlab/R2019a"
+pp_fetish_modules="mlpy; module load CDO"

+ 7 - 5
templates/lemaitre3/xios_config/file_def.xml

@@ -31,6 +31,7 @@
       <field field_ref="snowthic_cea"   name="snthic"  />
       <field field_ref="icethic_cea"    name="sithic"  />
       <field field_ref="iceconc"        name="siconc"  />
+      <field field_ref="icevolu"        name="sivol"   />
 
       <field field_ref="uice_ipa"       name="sivelu"  />
       <field field_ref="vice_ipa"       name="sivelv"  />
@@ -117,8 +118,6 @@
       <field field_ref="isnowhc"        name="snheco"  />
 
       <field field_ref="alb_ice"        name="alb_ice" />
-      <field field_ref="iceamp"         name="iceamp" />
-      <field field_ref="icevmp"         name="icevmp" />
       <field field_ref="qt_oce"         name="qt_oce"  />
       <field field_ref="qsr_oce"        name="qsr_oce" />
       <field field_ref="qns_oce"        name="qns_oce" />
@@ -140,7 +139,6 @@
       <field field_ref="vfxsub"         name="vfxsub"  />
       <field field_ref="vfxspr"         name="vfxspr"  />
       <field field_ref="vfxthin"        name="vfxthin" />
-      <field field_ref="vfxpnd"         name="vfxpnd" />
 
       <field field_ref="sfxbri"         name="sfxbri"  />
       <field field_ref="sfxdyn"         name="sfxdyn"  />
@@ -158,10 +156,14 @@
       <field field_ref="iceconc_cat"    name="siconcat" />
       <field field_ref="icethic_cat"    name="sithicat" />
       <field field_ref="snowthic_cat"   name="snthicat" />
-      <field field_ref="iceamp_cat"     name="pndfrcat" />
-      <field field_ref="icevmp_cat"     name="pnddecat" />
     </file>
 
+
+    <file id="file9" name_suffix="_icesheet" >
+      <field field_ref="fwfisf"    name="fwfisf"   />
+    </file>
+
+
   </file_group>
 
   <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->

+ 15 - 4
templates/scripts/skeleton.sh

@@ -46,7 +46,7 @@ function mlpy () {
     elif [[ ${USER} == "vsc"????? ]]; then
 	module purge
 	module load Python
-	PYTHONPATH="/user/leuven/327/vsc32749/.local/bin:${PYTHONPATH}"
+	PYTHONPATH="/user/leuven/327/vsc32749/.local/bin:/user/leuven/327/vsc32749/.local/lib/python3.7/site-packages:${PYTHONPATH}"
     else
 	echo "Nothing detected ${USER}" > ${start_dir}/tmpout
 	exit 0
@@ -404,21 +404,32 @@ do
 	    sed -i "s/.*date_end_isfcpl=.*/date_end_isfcpl=${date_end_isfcpl}/" ${start_dir}/tmp/isfcpl.track
 
 	    cp -f ${start_dir}/tmp/isfcpl.track ${start_dir}/tmp/isfcpl.old
-
 	    ${rebuild_nemo_exe} mesh_mask ${nem_numproc}
-	    mv -f mesh_mask.nc ${archive_dir}/isfcpl/mesh_mask_${date_beg_isfcpl}-${date_end_isfcpl}.nc
 	    
 	    module purge; module load CDO
 	    # Concatenate all icesheet files from all legs contained within this coupling window
+	    tmpfile_eos80="curr_ocean2ice_EOS80.nc"
+	    tmpfile_teos10="curr_ocean2ice_TEOS10.nc"
 	    outfile="${exp_name}_ocean2ice_${date_beg_isfcpl}-${date_end_isfcpl}.nc"
-	    cdo -O copy "${out_stencil::-2}??.nc" ${outfile}
+	    
+	    cdo -O copy "${out_stencil::-2}??.nc" ${tmpfile_teos10}
+
+	    module purge
+	    mlpy
+	    ${pp_nemo_to_fetish_call}
+
+
+	    mv -f ${tmpfile_eos80} ${outfile}
+	    mv -f mesh_mask.nc ${archive_dir}/isfcpl/mesh_mask_${date_beg_isfcpl}-${date_end_isfcpl}.nc
 	    
 	    # CALL FETISH
 	    module purge
 	    cp -f ${start_dir}/tmp/isfcpl.track ${run_dir}
 	    module load ${fetish_modules}
 	    ${fetish_call}
+
 	    mv -f ${exp_name}_fETISh*.mat ${archive_dir}/isfcpl
+	    ln -sf ${archive_dir}/isfcpl/*.mat ./
 	    module purge
 
 	    # mv ocean2ice file to arch dir

+ 8 - 2
templates/zenobe_xios-1.0/experiment.cfg

@@ -4,13 +4,19 @@ exp_name=EXP_REF
 # Simulation start and end date. Use any (reasonable) syntax you want.
 run_start_date="1958-01-01"
 run_duration="4 years"
+leap_years=1
 
 # Restart frequency. Use any (reasonable) number and time unit you want.
 # For runs without restart, leave this variable empty or set to 0
 rst_freq="1 year"
 
 # Number of restart legs to be run in one go
-run_num_legs=2
+run_num_legs=4
+
+# Including (1) ice shelf coupling or not (0)
+isfcpl=1
+# Ice shelf coupling is performed every n_res_isfcpl NEMO restart legs
+n_res_perisfcpl=1
 
 # Special restart
 special_restart=false
@@ -29,4 +35,4 @@ info_file="nemo.info"
 # Paths
 start_dir=${PBS_O_WORKDIR-$PWD}
 run_dir="/SCRATCH/acad/limhr/$USER/nemo/run/${exp_name}"
-archive_dir="/SCRATCH/acad/limhr/$USER/nemo/archive/${exp_name}"
+archive_dir="/SCRATCH/acad/limhr/$USER/nemo/archive/${exp_name}"

+ 12 - 1
templates/zenobe_xios-1.0/namelists/build_namelist_cfg.sh

@@ -31,6 +31,10 @@ cat << EOF
    cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
    nn_stock      =  0             !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_iscpl = ${iscpl_nm}
+   ln_clobber = .true.
+   nn_istate = 0
+   nn_leapy  = ${leap_years}
 /
 !-----------------------------------------------------------------------
 &namcfg        !   parameters of the configuration
@@ -56,7 +60,7 @@ cat << EOF
 !-----------------------------------------------------------------------
 &namdom        !   space and time domain (bathymetry, mesh, timestep)
 !-----------------------------------------------------------------------
-   nn_msh      =    0                  !  create (=1) a mesh file or not (=0)
+   nn_msh      =    ${isfcpl}                  !  create (=1) a mesh file or not (=0)
    rn_hmin     =    20.                !  min depth of the ocean (>0) or min number of ocean level (<0)
    rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
    ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -190,6 +194,13 @@ cat << EOF
    sn_depmin_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmin_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
 /
 !-----------------------------------------------------------------------
+&namsbc_iscpl  !   land ice / ocean coupling option
+!-----------------------------------------------------------------------
+   nn_drown  = 100       ! number of iteration of the extrapolation loop (fill the new wet cells)
+   ln_hsb    = .false.  ! activate conservation module (conservation exact after a time of rn_fiscpl)
+   nn_fiscpl = 43800    ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency)
+/
+!-----------------------------------------------------------------------
 &namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
 !-----------------------------------------------------------------------
 /

+ 10 - 0
templates/zenobe_xios-1.0/programs.cfg

@@ -17,3 +17,13 @@ nem_numproc=260
 xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-1.0/bin/xios_server.exe
 xio_numproc=4
 
+# -----------------------------------------------------------------------------
+# *** fETISh configuration
+# -----------------------------------------------------------------------------
+
+fetish_src_dir=${nemo_src_dir}/EXTERNAL/isfcpl_scripts
+fetish_call="matlab -nodesktop -nojvm -r fETISh_Coupling_NEMO > toto"
+pp_fetish_call="python pp_fetish_toclust_nomovfront.py"
+pp_nemo_to_fetish_call="python pp_nemo_to_fetish_cluster.py"
+fetish_modules="matlab/R2019a"
+pp_fetish_modules="mlpy; module load CDO"

+ 6 - 0
templates/zenobe_xios-1.0/xios_config/file_def.xml

@@ -158,6 +158,12 @@
       <field field_ref="snowthic_cat"   name="snthicat" />
     </file>
 
+
+    <file id="file9" name_suffix="_icesheet" >
+      <field field_ref="fwfisf"    name="fwfisf"   />
+    </file>
+
+
   </file_group>
 
   <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->

+ 6 - 1
templates/zenobe_xios-2.0/experiment.cfg

@@ -10,7 +10,12 @@ run_duration="58 year"
 rst_freq="1 year"
 
 # Number of restart legs to be run in one go
-run_num_legs=29
+run_num_legs=4
+
+# Including (1) ice shelf coupling or not (0)
+isfcpl=1
+# Ice shelf coupling is performed every n_res_isfcpl NEMO restart legs
+n_res_perisfcpl=1
 
 # Special restart
 special_restart=false

+ 15 - 7
templates/zenobe_xios-2.0/namelists/build_namelist_cfg.sh

@@ -1,4 +1,5 @@
-# This configuration namelist will overwrite SHARED/namelist_ref
+# namelist.nemo-ORCA1L75.cfg.sh writes the NEMO namelist for ORCA1L75 in
+# This namelist will overwrite the reference namelist (namelist.nemo.ref.sh). 
 #
 if $leg_is_restart
 then
@@ -30,6 +31,10 @@ cat << EOF
    cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
    nn_stock      =  0             !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_iscpl = ${iscpl_nm}
+   ln_clobber = .true.
+   nn_istate = 0
+   nn_leapy  = ${leap_years}
 /
 !-----------------------------------------------------------------------
 &namcfg        !   parameters of the configuration
@@ -55,7 +60,7 @@ cat << EOF
 !-----------------------------------------------------------------------
 &namdom        !   space and time domain (bathymetry, mesh, timestep)
 !-----------------------------------------------------------------------
-   nn_msh      =    0                  !  create (=1) a mesh file or not (=0)
+   nn_msh      =    ${isfcpl}                  !  create (=1) a mesh file or not (=0)
    rn_hmin     =    20.                !  min depth of the ocean (>0) or min number of ocean level (<0)
    rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
    ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -189,6 +194,13 @@ cat << EOF
    sn_depmin_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmin_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
 /
 !-----------------------------------------------------------------------
+&namsbc_iscpl  !   land ice / ocean coupling option
+!-----------------------------------------------------------------------
+   nn_drown  = 100       ! number of iteration of the extrapolation loop (fill the new wet cells)
+   ln_hsb    = .false.  ! activate conservation module (conservation exact after a time of rn_fiscpl)
+   nn_fiscpl = 43800    ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency)
+/
+!-----------------------------------------------------------------------
 &namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
 !-----------------------------------------------------------------------
 /
@@ -241,8 +253,7 @@ cat << EOF
 &nambfr        !   bottom friction
 !-----------------------------------------------------------------------
    nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
-
-   rn_bfeb2    =    0      !  bottom turbulent kinetic energy background  (m2/s2)
+                           !                              = 2 : nonlinear friction
 /
 !-----------------------------------------------------------------------
 &nambbc        !   bottom temperature boundary condition
@@ -340,9 +351,6 @@ cat << EOF
 !-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
-   jpni        =   20      !  jpni   number of processors following i (set automatically if < 1)
-   jpnj        =   13      !  jpnj   number of processors following j (set automatically if < 1)
-   jpnij       =   260     !  jpnij  number of local domains (set automatically if < 1)
 /
 !-----------------------------------------------------------------------
 &namctl        !   Control prints & Benchmark

+ 10 - 0
templates/zenobe_xios-2.0/programs.cfg

@@ -17,3 +17,13 @@ nem_numproc=260
 xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-2.0/bin/xios_server.exe
 xio_numproc=4
 
+# -----------------------------------------------------------------------------
+# *** fETISh configuration
+# -----------------------------------------------------------------------------
+
+fetish_src_dir=${nemo_src_dir}/EXTERNAL/isfcpl_scripts
+fetish_call="matlab -nodesktop -nojvm -r fETISh_Coupling_NEMO > toto"
+pp_fetish_call="python pp_fetish_toclust_nomovfront.py"
+pp_nemo_to_fetish_call="python pp_nemo_to_fetish_cluster.py"
+fetish_modules="matlab/R2019a"
+pp_fetish_modules="mlpy; module load CDO"