11. Running with interannual forcing¶
11.1. Run after classical interannual pre-processing¶
Before running you should prepare your interannual inputs files following the Interannual Preprocessing tutorial.
To run a plurimonth simulation, we provide the following scripts in ~/croco/croco/SCRIPTS/Plurimonths_scripts
:
run_croco.bash
: Plurimonth run with climatological forcing
run_croco_inter.bash
: Plurimonth run with interannual forcing
These scripts:
get the grid, the forcing, the initial and the boundary files
run the model for 1 month
store the output files in a specific form: e.g.
croco_avg_Y????M?.nc
replace the initial file by the restart file (
croco_rst.nc
) which has been generated at the end of the monthre-launch the model for next month
A dedicated namelist input file is also requested and provided ~/croco/croco/OCEAN/croco_inter.in
All these files are already copied to your configuration directory if you have used create_config.bash
. Otherwise, copy them from the source directory to your configuration directory.
- Edit
run_croco_inter.bash
: Paths should already be correct.
Number of MPI CPUs and command for running:
# number of processors for MPI run NBPROCS=4 # command for running the mode : ./ for sequential job, mpirun -np NBPROCS for mpi run RUNCMD="mpirun -np $NBPROCS"
Type of forcings:
# Define which type of inputs are used # BULK_FILES=1 FORCING_FILES=0 CLIMATOLOGY_FILES=0 BOUNDARY_FILES=1 RUNOFF_FILES=0
Names of forcings:
# Atmospheric surface forcing dataset used for the bulk formula (NCEP) # ATMOS_BULK=CFSR # # Atmospheric surface forcing dataset used for the wind stress (NCEP, QSCAT) # ATMOS_FRC=CFSR # # Oceanic boundary and initial dataset (SODA, ECCO,...) # OGCM=SODA
Time stepping and outputs settings:
# Model time step [seconds] # DT=3600 # # Output frequency [days] # average ND_AVG=3 # history (if = -1 set equal to NUMTIMES) ND_HIS=-1 # restart (if = -1 set equal to NUMTIMES) ND_RST=-1 # # Number of barotropic time steps within one baroclinic time step [number], NDTFAST in croco.in # NFAST=60 #
Dates settings (according to
crocotools_param.m
):NY_START=2005 NY_END=2005 NM_START=1 NM_END=3
- Edit
- Launch the simulation
Copy the adequate job script:
cp ~/croco/croco/SCRIPTS/example_job_run_croco_inter.pbs .
Check the MPI settings and launch the job:
qsub example_job_run_croco_inter.pbs
- Check at your outputs:
You should have:
croco_his_Y2000M1.nc croco_his_Y2000M2.nc croco_his_Y2000M3.nc croco_avg_Y2000M1.nc croco_avg_Y2000M2.nc croco_avg_Y2000M3.nc croco_rst.nc
Warning
If you have an error while you run did not BLOW UP, maybe it is because you have
define LOGFILE
in yourcppdefs.h
. For usingrun_croco_inter.in
it should beundef
.
11.2. Alternative method: online interpolation of atmospheric bulk forcing¶
Instead of pre-processing your atmospheric bulk forcing, you can use online interpolation of atmospheric bulk forcing.
To do so:
- Your atmospheric files need to be in a format readable by CROCO:
At the moment the following forcing are implemented for online interpolation:
CFSR data pre-formatted using the script
Process_CFSR_files_for_CROCO.sh
available incroco_tools
ERAI data pre-formatted using
reformat_ECMWF.m
(used inmake_ECMWF.m
in thecroco_tools
)AROME data formatted in Meteo France framework
Warning
we need to make the pre-formatting scripts available somewhere in croco_tools
- Edit
cppdefs.h
In
Surface forcing
section:# define ONLINE # ifdef ONLINE # undef AROME # undef ERA_ECMWF # endif
Note
for
ONLINE
interpolation, default is CFSR format.AROME
andERA_ECMWF
are also available by defining the cpp-keys.
- Edit
- Re-compile the model
First copy your old executable to keep it, then re-compile:
cp croco croco.bck ./jobcomp > jobcomp.log.online
- Link or copy the CFSR files to your
DATA
directory mkdir DATA/CFSR_Benguela_LR/ #ln -s ~/DATA/METEOROLOGICAL_FORCINGS/CFSR/BENGUELA/CROCO_format/*2005*.nc DATA/CFSR_Benguela_LR/. cp ~/DATA/METEOROLOGICAL_FORCINGS/CFSR/BENGUELA/CROCO_format/*2005*.nc DATA/CFSR_Benguela_LR/.
- Link or copy the CFSR files to your
- Check and eventually edit
croco_inter.in
last section online: byear bmonth recordsperday byearend bmonthend / data path NYONLINE NMONLINE 4 2011 3 ../DATA/CFSR_Benguela_LR/
- Check and eventually edit
- Re-run the model
qsub example_job_run_croco_inter.sh
Note
In case of errors while using ONLINE, it is probably associated to time issues: check the time in your CFSR input files, and check your time origin Yorig.