3. Run BENGUELA_LR test case¶
3.1. Installation¶
To install CROCO with ABL1d developments, get the dev_2022_ABL1d branch from INRIA’s gitlab server :
git clone https://gitlab.inria.fr/croco-ocean/croco.git
git checkout -b dev_2022_ABL1d origin/dev_2022_ABL1d
3.2. Prepare 3d atmospheric forcing fields for ABL1d¶
3.2.1. Get the preprocessing tools for ABL1d¶
Get the preprocessing tools for ABL1d model with :
git clone https://github.com/JorisPianezze/preprocessing_for_abl1d.git
This repository contains the tool to pre-process atmospheric fields for the ABL1d model. This tool can read atmospheric fields from ECMWF products (IFS oper, ERA5, ERAI, …). It allows to compute geostrophic pressure gradients, to interpolate the fields from the IFS vertical grid to the ABL1D vertical grid (which is defined in namelist) and to fill in the field values over land by extrapolating the values over sea.
This repository contains the following directories :
src: contains the Makefile and the source codes in Fortran 90 ;
ktest: contains the files necessary to launch the tool and prepare the ABL1d forcing for CROCO BENGUELA_LR case study.
3.2.2. Compilation¶
Go to src/ directory, modify the Makefile
according to your configuration and compile the code :
make
To clean the directory, you can use make clean.
At the end of the compilation, 4 executables have been created :
get_atm_LSfrc.exe
: calculate pressure gradients ;vinterp_atm_frc.exe
: vertically interpolate the IFS fields to the ABL1D; it is in this program that the vertical grid of the ABL1d is defined ;drown_atm_frc.exe
: fill in the values on land by extrapolating the values on sea (avoid strong gradients near the coast) ;slp_smoothing.exe
: test different methods of smoothing the surface pressure (Gibbs effect). Using this program is not necessary if you only want to create the forcing for the ABL1D.
All theses programs read a namelist called namelist_abl_tools
.
3.2.3. Download ERA5 data¶
Go to ktest/benguela_ifs_era5/0_input_data directory and launch the python script using CDSAPI :
python extract_era5_for_abl1d.py
At the end of the extraction you need to convert grib files into netcdf using the script :
./convert_grib_to_netcdf.sh
Final netcdf file use for the preprocessing tool is called : era5_for_preprocessing_tools.nc
.
3.2.4. Run preprocessing tool¶
Go to ktest/benguela_ifs_era5/1_run_preprocessing_tool_N_abl_50 to run preprocessing tools :
./run_preprocessing_tools.sh
3.2.5. Convert netcdf file into a format readable by CROCO¶
Go to ktest/benguela_ifs_era5/2_convert_to_croco to run conversion scripts :
create_croco_abl_from_ifs_era5.py
is used to create 3d atmospheric forcing field for ABL1d/CROCO (OFFLINE interpolation)create_croco_blk_from_ifs_era5.py
is used to create 2d atmospheric forcing field for classical bulk parametrization.
3.3. Compilation and simulation for BULK_FLUX test case¶
Modification in cppdefs.h
:
# define MPI
# define BULK_FLUX
# undef CLIMATOLOGY
./jobcomp
mpirun -np 4 ./croco
3.4. Compilation and simulation for ABL1d test case¶
Modification in cppdefs.h
:
# define MPI
# define ABL1D
# undef CLIMATOLOGY
./jobcomp
mpirun -np 4 ./croco