CROCOTOOLS User’s GuidePierrick Penven, Gildas Cambon, Patrick Marchesiello and Laurent Debreu Institut de Recherche pour le Développement (IRD) 44 Boulevard de Dunkerque, CS 90009 13572 Marseille cedex 02 France
Table of contents
- 1 CROCOTOOLS User’s Guide
- 1.1 Introduction
- 1.2 Installation
- 1.3 Getting the files
- 1.4 Definition of the different directories
- 1.5 Tutorial : the Southern Benguela example
- 1.5.1 Getting started : Processing input files
- 1.5.2 Building the grid
- 1.5.3 Getting the wind and other surface fluxes
- 1.5.4 Getting the initial and the lateral boundary conditions
- 1.5.5 Getting the runoff forcing
- 1.5.6 Compiling the model
- 1.5.7 Running the model
- 1.5.8 Getting the results
- 1.5.9 Diagnostics
- 1.5.10 Tides
- 1.6 Biogeochemistry
- 1.7 Inter-Annual simulations
- 1.8 Nesting
- 1.9 Oceanic Forecast : Forecast_tools
- 1.10 Bibliography
IntroductionThe Regional Ocean Modeling System (CROCO) is a new generation ocean circulation model (Shchepetkin and McWilliams, 2005) that has been specially designed for accurate simulations of regional oceanic systems. The reader is referred to Shchepetkin and McWilliams (2003) and to Shchepetkin and McWilliams (2005) for a complete description of the model. CROCO has been applied for the regional simulation of a variety of different regions of the world oceans (e.g. Marchesiello et al., 2003; Penven et al., 2001; MacCready et al., 2002; Haidvogel et al., 2000; Di Lorenzo et al., 2003; Blanke et al., 2002). To perform a regional simulation using CROCO, the modeler needs to provide several data files in a specific format: horizontal grid, bottom topography, surface forcing, lateral boundary conditions… He also needs to analyze the model outputs. The tools which are described here have been designed to perform these tasks. The goal is to be able to build a standard regional model configuration in a minimum time.
System requirementThis toolbox has been designed for Matlab. It needs at least 2 Gbites of disk space. It has been tested on several Matlab versions ranging from Matlab6 to Matlab2012. It has been mostly tested on Linux workstations, but it could be used on any platform if a NetCDF and a LoadDAP Matlab Mex files are provided. The NetCDF Matlab Mex file is needed to read and write into NetCDF files and it can be found at the web location: http://mexcdf.sourceforge.net/. The LoadDAP Matlab Mex file is used to download data from OpenDAP servers for inter-annual and forecast simulations. It can be found at the web location: http://www.opendap.org/download/ml-structs.html. The Matlab LoadDAP Mex file provides a way to read any OpenDAP-accessible data into Matlab. Note that the LibDAP library must be installed on your system before installing LoadDAP. Details can be found at the web location: http://www.opendap.org. MexCDF and LoadDAP mex files are provided for Linux (system FEDORA 32bits: mexcdf and Opendap_tools/FEDORA ; system CENTOS or FEDORA 64bits: mexnc and Opendap_tools/FEDORA_X64), but they are not working on all the plateforms. All the other necessary Matlab toolboxes (i.e. air-sea, mask, netcdf or m_map…) are included in the CROCOTOOLS package. also included.
Getting the filesAll the necessary compressed tar files (XXX.tar.gz) containing the Matlab programs, several datasets and other toolboxes and softwares needed by CROCOTOOLS are located at https://www.croco-ocean.org in the download section.You will need i) the CROCOTOOLS package, ii) the global datasets and iii) some additional external Matlab packages as m_map, air-sea, mask, netcdf etc …). All of them are available in the Download section.
- The Matlab CROCOTOOLS package are available in the DOWNLOAD/CROCO project/Tools section.
- The global datasets, such as topography (Smith and Sandwell, 1997), hydrography (Conkright et al., 2002) or surface fluxes (Da Silva et al., 1994), are available in the DOWNLOAD/Datasets section
- The additional utilities and external Matlab packages are available in Download/UTILITIES section
Definition of the different directories
- Aforc_NCEP : Scripts for the recovery of surface forcing data (based on CFSR reanalysis) for inter-annual simulations.
- Aforc_QuikSCAT : Scripts for the recovery of wind stress from satellite scatterometer data (QuickSCAT).
- Diagnostic_tools : A few Matlab scripts for animations and basic statistical analysis.
- Forecast_tools : Scripts for the generation of an operational oceanic forecast system
- Nesting_tools : Preprocessing tools used to prepare nested models.
- Oforc_OGCM : Scripts for the recovery of initial and lateral boundary conditions from global OGCMs (SODA (Carton et al., 2005) or ECCO (Stammer et al., 1999)) for inter-annual simulations.
- Opendap_tools : LoadDAP mexcdf and several scripts to automatically download data over the Internet.
- Preprocessing_tools : Preprocessing Matlab scripts (make_grid.m, make_forcing, etc…).
- Rivers : Scripts to prepare time-varying runoff forcing file and compute the runoff location.
- SST_pathfinder : SST global monthly climatology at a finer resolution (9.28 km) than COADS05, computed from AVHRR-Pathfinder observations from 1985 to 1997 .(Casey and Cornillon, 1999)
- Tides : Matlab routines to prepare CROCO tidal simulations. Tidal data are derived from the Oregon State University global models of ocean tides TPXO6 and TPXO7 (Egbert and Erofeeva, 2002): http://www.oce.orst.edu/research/po/research/tide/global.html.
- Visualization_tools : Matlab scripts for the CROCO visualization graphic user interface.
- CARS2009 : CSIRO Atlas of Regional Seas database. Annual, seasonal and monthly climatology for temperature, salinity, nitrate, phosphate and oxygen
- COADS05 : Directory of the surface fluxes global monthly climatology at resolution (Da Silva et al., 1994).
- SeaWifs : surface chlorophyll-a climatology based on SeaWifs observations.
- Topo : Location of the global topography dataset at 2° resolution (Smith and Sandwell, 1997). Original data can be found at: http://topex.ucsd.edu/cgi-bin/get_data.cgi
- TPX07 : Directory of the global model of ocean tides TPXO7 (Egbert and Erofeeva, 2002).
- WOA2009 : World Ocean Atlas 2009 global datase. References list: http://www.nodc.noaa.gov/OC5/WOA09/pubwoa09.html
- WOAPISCES : A global dataset for biogeochemical PISCES data (annual and seasonal climatology). References are :
- Fe and DOC : Aumont et Bopp, 2006
- Si, O2, NO3, PO4 from WOA2005,
- DIC and Alkalinity come from Goyet et al.
- mask : Land mask edition toolbox developed by A.Y. Shcherbina.
- mex60 : Matlab NetCDF interface for 32 & 64 bits Linux architectures and old matlab version : 6 and before.
- mexcdf/mexnc : Matlab NetCDF interface for 32 & 64 bits Linux architectures, MatlabR14sp1 until R2008a (http://mexcdf.sourceforge.net/downloads/mexcdf-R2008a.r2691.zip). For next releases of Matlab, R2008b, R2009a, it is more simpler, either use the native NetCDF toobox of matlab or use the last release of mexcf at the same url for version after R2008a.(http://mexcdf.sourceforge.net/downloads/mexcdf.r2802.zip)
- mexcdf/netcdf_toolbox : The Matlab NetCDF toolbox available in the same mexcdf package.
- m_map : The Matlab mapping toolbox (http://www2.ocgy.ubc.ca/rich/map.html).
- netcdf_x86_64 : The NetCDF Fortran library for Linux, compiled with ifort on a 64 bits architecture.
Tutorial : the Southern Benguela exampleThis section presents the essential steps for preparing and running a regional CROCO simulation. This is done following the example of a model of the Southern Benguela at low resolution and using climatological forcing at surface and boundaries.
Getting started : Processing input filesOnce the installation has been successful, launch a Matlab session in the directory: ~/croco/Run. Run the start.m script to set the Matlab paths for this session. In this step of this installation, you have to know a few things concerning your matlab setup and tour computer environment:
- What is the architecture of my machine 32 or 64 bits ? For that do uname -a.
- What are the native matlab installation library that I have ?
- If I have already native netcdf routines and library with my Matlab version, I don’t need to use the netcdf library provided by Roms_tools, so remove it from start.m file.
- If I have already native m_map routines with my Matlab version, I don’t need to use the netcdf library provided by Roms_tools, so remove it from start.m file.
- For these questions, it can be useful to edit your matlab path with the matlab command path in a matlab session.
- mex60 : matlab12 (old), 32 and 64 bits architecture
- mexcdf/mexnc : matlab7, matlab2008, matlab2009, 32 and 64 bits architecture
- Opendap_tools/FEDORA : LibDAP and LoadDAP bin and library for Fedora Linux distribution, 32 bits architecture
- Opendap_tools/FEDORA_X64 : Same for 64 bits architecture.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 1 - Configuration parameters % used by make_grid.m (and others..) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % CROCO title names and directories % CROCO_title = 'Benguela Model'; CROCO_config = 'Benguela_LR'; % % Grid dimensions: % lonmin = 8; % Minimum longitude [degree east] lonmax = 22; % Maximum longitude [degree east] latmin = -38; % Minimum latitudeF [degree north] latmax = -26; % Maximum latitude [degree north] % % Grid resolution [degree] % dl = 1/3; % % Number of vertical Levels (! should be the same in param.h !) % N = 32; % % Vertical grid parameters (! should be the same in croco.in !) % theta_s = 7.; theta_b = 2.; hc = 200.; vtransform = 2.; % s-coordinate type (1: old- ; 2: new- coordinates) % % Minimum depth at the shore [m] (depends on the resolution, % rule of thumb: dl=1, hmin=300, dl=1/4, hmin=150, ...) % This affect the filtering since it works on grad(h)/h. % hmin = 75; % % Maximum depth at the shore [m] (to prevent the generation % of too big walls along the coast) % hmax_coast = 500; % % Maximum depth [m] (cut the topography to prevent % extrapolations below WOA data) % hmax = 5000; % % Topography netcdf file name (ETOPO 2 or any other netcdf file % in the same format) % TOPODIR = '../'; topofile = [TOPODIR,'Topo/etopo2.nc']; % % Slope parameter (r=grad(h)/h) maximum value for topography smoothing % rtarget = 0.25; % % Number of pass of a selective filter to reduce the isolated % seamounts on the deep ocean. % n_filter_deep_topo=4; % % Number of pass of a single hanning filter at the end of the % smooting procedure to ensure that there is no 2DX noise in the % topography. % n_filter_final=2; % % GSHSS user defined coastline (see m_map) % XXX_f.mat Full resolution data % XXX_h.mat High resolution data % XXX_i.mat Intermediate resolution data % XXX_l.mat Low resolution data % XXX_c.mat Crude resolution data % coastfileplot = 'coastline_l.mat'; coastfilemask = 'coastline_l_mask.mat'; % % Objective analysis decorrelation scale [m] % (if Roa=0: nearest extrapolation method; crude but much cheaper) % %Roa=300e3; Roa=0; % interp_method = 'linear'; % Interpolation method: 'linear' or 'cubic' % makeplot = 1; % 1: create a few graphics after each preprocessing step %Variables description:
- CROCO_title=’Benguela Test Model’ : General title. You can give any name you want for your configuration.
- CROCO_config = ‘Benguela_LR’ : Name of the configuration. This is used for the storage of NCEP or OGCM data for a specific configuration.
- lonmin = 8 : Western limit of the grid in longitude [-360°, 360°]. The grid is rectangular in latitude/longitude.
- lonmax = 22 : Eastern limit [-360°, 360°]. Should be superior to lonmin.
- latmin = -38 : Southern limit of the grid in latitude [-90°, 90°].
- latmax = -26 : Northern limit [-90°, 90°]. Should be superior to latmin.
- dl = 1/3 : Grid longitude resolution in degrees. The latitude spacing is deduced to obtain an isotropic grid using the relation: dΦ =dl cos (Φ)
- N = 32 : Number of vertical levels. Warning! N has to be also defined in the file : ~/croco/Run/param.h before compiling the model.
- theta_s = 7. : Vertical S-coordinate surface stretching parameter. When building the climatology and initial CROCO files, we have to define the vertical grid. Warning! The different vertical grid parameters should be identical in this file and in the CROCO input file (i.e. ~/Roms_tools/Run/croco.in). This is a serious cause of bug. The effects of theta_s, theta_b, hc, and N can be tested using the Matlab script : ~/croco_tools/Preprocessing_tools/test_vgrid.m.
- theta_b = 2. : Vertical S-coordinate bottom stretching parameter.
- vtransform = 2. : S-coordinate type (1: old- ; 2: new- coordinates). It is associated to #NEW_S_COORD cpp-keys in CROCO_AGRIF source code.
- hc = 200. : Vertical S-coordinate Hc parameter. It gives approximately the transition depth between the horizontal surface levels and the bottom terrain following levels. (Note it should be inferior to hmin in case of Vtransform =1).
- hmin = 75 : Minimum depth in meters. The model depth is cut a this level to prevent, for example, the occurrence of model grid cells without water. This does not influence the masking routines. At lower resolution, hmin should be quite large (for example 150m for dl=1/2). Otherwise, since topography smoothing is based on , the bottom slopes can be totally eroded.
- hmax_coast = 500 : Maximum depth under the mask. It prevents selected isobaths (here 500 m) to go under the mask. If this is the case, this could be a source of problems for western boundary currents (for example).
- hmax = 5000;
- TOPODIR = ‘../’;
- topofile = [TOPODIR,’Topo/etopo2.nc’]; Default topography file. We are using here etopo2 (Smith and Sandwell, 1997).
- rtarget = 0.25 : This variable control the maximum value of the -parameter that measures the slope of the sigma layers (Beckmann and Haidvogel, 1993): To prevent horizontal pressure gradients errors, well known in terrain-following coordinate models (Haney, 1991), realistic topography requires some smoothing. Empirical results have shown that reliable model results are obtained if does not exceed 0.2.
- n_filter_deep_topo=4 : Number of pass of a Hanning filter to prevent the occurrence of noise and isolated seamounts on deep regions.
- n_filter_final=2 : Number of pass of a Hanning filter at the end of the smoothing process to be sure that no noise is present in the topography.
- coastfileplot = ‘coastline_l.mat’ : Binary GSHSS coastal file used by m_map for graphical pruposes. The letter before “.mat” selects the coastline resolution. f: Full resolution, h: High resolution, i: Intermediate resolution, l: Low resolution c: Crude resolution.
- coastfilemask = ‘coastline_l_mask.mat’ : Binary file used for the coastline in the masking toolbox.
- Roa=0 : Decorrelation length scale in meters for the objective analysis (300 km is a reasonable value for the employed datasets). If Roa=0, the “nearest” Matlab extrapolation method is used instead of an objective analysis. This is much less costly, but the results might be at a lower quality.
- interp_method = ‘cubic’ : Horizontal interpolation method used after the objective analysis. It can be linear or cubic.
- makeplot = 1 : Select to generate images after each step of the preprocessing.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 2 - Generic file and directory names % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % CROCOTOOLS directory % CROCOTOOLS_dir = '../'; % % Run directory % RUN_dir=[pwd,'/']; % % CROCO input netcdf files directory % CROCO_files_dir=[RUN_dir,'CROCO_FILES/']; % % Global data directory (etopo, coads, datasets download from ftp, etc..) % DATADIR=CROCOTOOLS_dir; % % Forcing data directory (ncep, quikscat, datasets download with opendap, etc..) % FORC_DATA_DIR = [RUN_dir,'DATA/']; % eval(['!mkdir ',CROCO_files_dir]) % % CROCO file names (grid, forcing, bulk, climatology, initial) % grdname = [CROCO_files_dir,'croco_grd.nc']; frcname = [CROCO_files_dir,'croco_frc.nc']; blkname = [CROCO_files_dir,'croco_blk.nc']; clmname = [CROCO_files_dir,'croco_clm.nc']; bryname = [CROCO_files_dir,'croco_bry.nc']; ininame = [CROCO_files_dir,'croco_ini.nc']; bioname = [CROCO_files_dir,'croco_frcbio.nc']; % Iron Dust forcing for PISCES rivname = [CROCO_files_dir,'croco_runoff.nc']; % % intermediate z-level data files (not used in simulations) % oaname = [CROCO_files_dir,'croco_oa.nc']; % for climatology data processing Zbryname = [CROCO_files_dir,'croco_bry_Z.nc']; % for boundary data processing % % Generic forcing file root names for interannual simulations (NCEP/GFS) % frc_prefix=[CROCO_files_dir,'croco_frc']; % forcing file name blk_prefix=[CROCO_files_dir,'croco_blk']; % bulk file name %
- CROCOTOOLS_dir = ‘../’ : “croco_tools” directory.
- RUN_dir=[CROCOTOOLS_dir,’Run/’] : Roms_tools/Run directory. This is where all the work is done.
- CROCO_files_dir=[RUN_dir,’CROCO_FILES/’] : croco_tools/Run/CROCO_FILES/ directory. This is where CROCO input NetCDF files are stored.
- CROCO_files_dir=[RUN_dir,’CROCO_FILES/’] :
- DATADIR=CROCOTOOLS_dir; : Global data directory (ETOPO, COADS, datasets download from ftp, etc..)
- FORC_DATA_DIR = [RUN_dir,’DATA/’] : Forcing data directory (NCEP, QUIKSCAT, datasets downloaded with opendap, etc..)
- grdname=[CROCO_files_dir,’croco_grd.nc’] : Name of the CROCO input NetCDF grid file. This is where the horizontal grid parameters are stored. In general, we follow the style : XXX_grd.nc.
- frcname=[CROCO_files_dir,’croco_frc.nc’] : : Name of the CROCO input NetCDF forcing file. This is where the surface forcing variables (such as wind stress) are stored. In general, we follow the style : XXX_frc.nc.
- blkname=[CROCO_files_dir,’croco_blk.nc’] : Name of the CROCO input NetCDF bulk file. This is where the atmospheric variables used for the bulk parametrization (such as air temperature) are stored. In general, we follow the style : XXX_blk.nc.
- clmname=[CROCO_files_dir,’croco_clm.nc’] : Name of the CROCO input NetCDF climatology file. This is where CROCO prognostic variables (u,v, temp, salt, ubar, vbar, zeta) for lateral boundary and interior nudging are stored. This file can be large because variables are stored for all the CROCO grid interior points. It is called “a climatology file” because this was the file used in the past for the restoring of the CROCO solution towards an in-situ climatology (such as Levitus for example). In general, we follow the style : XXX_clm.nc.
- bryname=[CROCO_files_dir,’croco_bry.nc’] : Name of the CROCO input NetCDF boundary file. This is an alternative of the climatology file. In this case, variables are only stored for the lateral boundaries. In general, we follow the style : XXX_bry.nc.
- ininame=[CROCO_files_dir,’croco_ini.nc’] : Name of the CROCO input NetCDF initial file. This is where CROCO prognostic variables (u,v, temp, salt, ubar, vbar, zeta) are stored for the initial conditions. In general, we follow the style : XXX_ini.nc.
- bioname=[CROCO_files_dir,’croco_frcbio.nc’] : Name of the CROCO input NetCDF Iron dust forcing file for PISCES biogeochemical model.
- rivname = [CROCO_files_dir,’croco_runoff.nc’]; Name of the CROCO input NetCDF run-offs forcing file
- oaname =[CROCO_files_dir,’croco_oa.nc’] : Name of an intermediate file which is not used by CROCO. This is equivalent to the climatology file, but on a z vertical coordinate. Firstly, the variables are horizontally interpolated to create a croco_oa.nc file (a OA file). Then, they are vertically interpolated on the CROCO s-coordinate for the climatology file. In general, we follow the style : XXX_oa.nc.
- Zbryname=[CROCO_files_dir,’croco_bry_Z.nc’] : Intermediate file on a z coordinate for the boundary file. In general, we follow the style : XXX_bry_Z.nc.
- frc_prefix=[CROCO_files_dir,’croco_frc’] : First part of the forcing file names in the case of inter_annual simulations. In this case, a separate file is created for each month. For example, a forcing file based on NCEP for January 2000 is : croco_frc_NCEP_Y2000M1.nc
- blk_prefix=[CROCO_files_dir,’croco_blk’] : First part of the bulk file names in the case of inter_annual simulations. In this case, a separate file is created for each month. For example, a bulk file based on NCEP for January 2000 is : croco_blk_NCEP_Y2000M1.nc
Building the gridSave crocotools_param.m and run make_grid in the Matlab session : >> make_grid
Making the grid: ../Run/CROCO_FILES/croco_grd.nc Title: Benguela Test Model Resolution: 1/3 deg Create the grid file... LLm = 41 MMm = 42 Fill the grid file... Compute the metrics... Min dx=29.1913 km - Max dx=33.3244 km Min dy=29.2434 km - Max dy=33.1967 km Fill the grid file... Add topography... CROCO resolution : 31.3 km Topography data resolution : 3.42 km Topography resolution halved 4 times New topography resolution : 54.6 km Processing coastline_l.mat ... Do you want to use editmask ? y,[n] Apply a filter on the Deep Ocean to remove the isolated seamounts : 4 pass of a selective filter. Apply a selective filter on log(h) to reduce grad(h)/h : 13 iterations - rmax = 0.24381 Smooth the topography a last time to prevent 2DX noise: 2 pass of a hanning smoother. Write it down... Do a plot...You should keep the values of LLm and MMm during the process. They will be necessary for the CROCO parameter file /Roms_tools/Run/param.h. In this test case, LLm0 = 23 and MMm0 = 31. During the grid generation process, the question “Do you want to use editmask ? y,[n]” is asked. The default answer is n (for no). If the answer is y (for yes), editmask, the graphic interface developed by A.Y.Shcherbina, will be launched to manually edit the mask (Note that, for the moment, editmask is not working with matlab7 and mexnc). Otherwise the mask is generated from the unfiltered topography data. A procedure prevents the existence of isolated land (or sea) points. Figure (1.1) presents the bottom topography obtained with make_grid.m for the Southern Benguela example. Note that at this low resolution (1/3), the topography has been strongly smoothed. .
Fig 1.1: Result of make_grid.m for the Benguela example
Getting the wind and other surface fluxesThe next step is to create the file containing the different surface fluxes. The part of the file crocotools_param.m that you should edit is :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 3 - Surface forcing parameters % used by make_forcing.m and by make_bulk.m % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % COADS directory (for climatology runs) % coads_dir=[DATADIR,'COADS05/']; % % COADS time (for climatology runs) % coads_time=(15:30:345); % days: middle of each month coads_cycle=360; % repetition of a typical year of 360 days % %coads_time=(15.2188:30.4375:350.0313); % year of 365.25 days in the case %coads_cycle=365.25; % of QSCAT experiments with % climatological heat flux. % % Pathfinder SST data used by pathfinder_sst.m % pathfinder_sst_name=[DATADIR,... 'SST_pathfinder/climato_pathfinder.nc']; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Variables description:
- coads_dir=[CROCOTOOLS_dir,’COADS05/’] : Directory where the global atlas of surface marine data at 1/2° resolution (Da Silva et al., 1994) is located.
- coads_time=(15:30:345) : Time in days for the monthly climatology. It corresponds to the middle of each month. CROCO uses this time to interpolate linearly the forcing variables in time.
- coads_cycle=360 : Duration on which the forcing variables are cycled. Here, for the sake of simplicity, we are running the model on a repeating climatological year of 360 days.
- pathfinder_sst_name=[CROCOTOOLS_dir,SST_pathfinder/climato_pathfinder.nc’] : Directory of the monthly climatology of sea surface temperature from Pathfinder satellite observations (Casey and Cornillon, 1999). This can be used has an alternative of Da Silva et al. (1994) SST.
Benguela Test Model Read in the grid... Create the forcing file... Getting taux for time index 1 Getting tauy for time index 1 ... Make a few plots...This program can take a relatively long time to process all the forcing variables. Figure (1.2) presents the wind stress vectors and wind stress norm obtained from the global atlas of surface marine data at 1/2° resolution (Da Silva et al., 1994) at 4 different periods of the year. Da Silva et al. (1994) sea surface temperature (SST) is used for the restoring term (dQdSST) in the heat flux calculation. To improve the model solution it is possible to use a SST climatology at a finer resolution (9.28 km) (Casey and Cornillon, 1999). To do so, you can run pathfinder_sst.m in the Matlab session : >> pathfinder_sst You should obtain :
... Month index: 1 ... Month index: 2 ...For the surface forcing, instead of directly prescribing the fluxes, it is possible to use a bulk formula to generate the surface fluxes from atmospheric variables during the model run. In this case, CROCO needs to be recompiled with the BULK_FLUX cpp key defined. To generate the bulk forcing file, you need to run make_bulk in the Matlab session : >> make_bulk You should obtain :
Benguela Test Model Read in the grid... Create the bulk forcing file... Getting sat for time index 1 Getting sat for time index 2 ... Make a few plots...
Fig. 1.2: Wind stress[N.m²] obtained using make_forcing.m for the Benguela example.
Getting the initial and the lateral boundary conditionsThe last preprocessing step consists in generating the files containing the necessary informations for the CROCO initial and lateral open boundaries conditions. This script generates two files : the climatology file (XXX_clm.nc) which gives the lateral boundary conditions, and the initial conditions file (XXX_ini.nc). The part which should be edited by the user in the file crocotools_param.m is. The part which should be edited by the user in the file crocotools_param.m is:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 4 - Open boundaries and initial conditions parameters % used by make_clim.m, make_biol.m, make_bry.m % make_OGCM.m and make_OGCM_frcst.m % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Open boundaries switches (! should be consistent with cppdefs.h !) % obc = [1 1 1 1]; % open boundaries (1=open , [S E N W]) % % Level of reference for geostrophy calculation % zref = -1000; % % initial/boundary data options (1 = process) % (used in make_clim, make_biol, make_bry, % make_OGCM.m and make_OGCM_frcst.m) % makeini = 1; % initial data makeclim = 1; % climatological data (for boundaries and nudging layers) makebry = 1; % lateral boundary data makenpzd = 0; % initial and boundary data for NChlPZD and N2ChlPZD2 models makebioebus= 0; % initial and boundary data for BioEBUS model makepisces = 0; % initial and boundary data for PISCES model % % makeoa = 1; % oa data (intermediate file) makeZbry = 1; % boundary data in Z coordinate (intermediate file) insitu2pot = 1; % transform in-situ temperature to potential temperature % psource_ts = 0; % tracer runoff concentration % % Day of initialisation for climatology experiments (=0 : 1st january 0h) % tini=0; % % World Ocean Atlas directory (WOA2009) % (temp, salt and biological variables) woa_dir=[DATADIR,'WOA2009/']; % % CARS2009 climatology directory (CARS2009) % (temp, salt and biological variables) cars2009_dir=[DATADIR,'CARS2009/']; % % Pisces biogeochemical seasonal climatology % woapisces_dir=[DATADIR,'WOAPISCES/']; % % Climatological data dir (t, s and biological variables) % climato_dir=cars2009_dir; % % Surface chlorophyll seasonal climatology (WOA2001 or SeaWifs) % chla_dir=[DATADIR,'SeaWifs/']; % % Runoff monthly seasonal climatology (Dai and Trenberth) global_clim_riverdir=[DATADIR,'RUNOFF_DAI/']; global_clim_rivername=[global_clim_riverdir,'Dai_Trenberth_runoff_global_clim.nc']; % % Set times and cycles for the boundary conditions: % monthly climatology % woa_time=(15:30:345); % days: middle of each month woa_cycle=360; % repetition of a typical year of 360 days % %woa_time=(15.2188:30.4375:350.0313); % year of 365.25 days in the case %woa_cycle=365.25; % of QSCAT experiments with % climatological boundary conditions %Variables description:
- obc=[1 1 1 1] : Switches to open (1=open) or close (0=wall) the lateral boundaries [South East North West]. This is used for the application of mass enforcement. Be aware, this should be compatible with the open boundary CPP-switches in the file /Roms_tools/Run/cppdefs.h.
- zref=-1000 : Depth [meters] of the level of no motion for the geostrophic velocities calculation.
- makeini=1 : Switch to define if the initial file (croco_ini.nc) is generated. Should be 1.
- makeclim=1 : Switch to define if the climatology (lateral boundary conditions) file (croco_clm.nc) is generated. Should be 1.
- makebry=1 : Switch to define if the boundary file (croco_bry.nc) is generated. Used only with make_bry.
- makenpzd=0 : Switch to process initial and boundary data for NChlPZD or N2ChlPZD2 biogeochemical model
- makebioebus=0 : Switch to process initial and boundary data for BioEBUS biogeochemical model
- makepisces=0 : Switch to process initial and boundary data for PISCES biogeochemical model
- makeoa=1 : Switch to define if the OA (objective analysis; croco_oa.nc) file is generated. This should be 1. The OA files are intermediate files where hydrographic data are stored on a CROCO horizontal grid but on a z vertical grid. The transformation into S-coordinate is done later. This file is not used by CROCO.
- makeZbry=1 : Switch to define if the boundary intermediate file on a z coordinate (croco_bry_Z.nc) is generated. Used only with make_bry.
- insitu2pot=1 : Switch defined if it is in-situ temperature that is provided. In this case, in-situ temperature is converted into potential temperature.
- tini=0 : Day of initialization in climatology experiments (15 = January 15).
- woa_dir=[CROCOTOOLS_dir,’WOA2009/’] : Directory where the World Ocean Atlas 2009 climatology (Conkright et al., 2002) is located.
- cars2009_dir=[DATADIR,’CARS2009/’];Directory where the CARS 2009 climatology (Dunn et al, 2009) is located.
- chla_dir=[CROCOTOOLS_dir,’SeaWifs/’] : Directory of the surface chlorophyll seasonal climatology.
- woa_time=(15:30:345) : Time in days for the World Ocean Atlas monthly climatology. It corresponds to the middle of each month. CROCO uses this variable to interpolate linearly the climatology variables in time.
- woa_cycle=360 : Duration on which the climatology variables are cycled. Here, for the sake of simplicity, we are running the model on a repeating climatological year of 360 days.
- qbar_time=[15:30:365] : Time in days for the Dai and Trenberth runoff monthly climatology.
- qbar_cycle=360 : Duration on which the climatology variables are cycled.
- psource_ts=0 : Switch to define or not tracer (t, s and biogechemical) concentrations. It is associated in the source code to the cpp key #PSOURCE_NCFILE_TS
Making the clim: ../Run/CROCO_FILES/croco_clm.nc Title: Benguela Test Model Read in the grid... Create the climatology file... Creating the file : ../Run/CROCO_FILES/croco_clm.nc ... Make a few plots...This program can also take quite a long time to run. Figure (1.3) presents 4 different sections of temperature for the initial condition file for the Benguela example. The sections are in the X-direction (East-West), the first section is for the Southern part of the domain and the last one is for the Northern part of the domain.
Fig. 1.3: Result of make_clim.m for the Benguela example
Making the file: ../Run/CROCO_FILES/croco_bry.nc Title: Benguela Test Model Read in the grid... ...
Getting the runoff forcing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 4 - Open boundaries and initial conditions parameters % used by make_clim.m, make_biol.m, make_bry.m % make_OGCM.m and make_OGCM_frcst.m % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ... ... ... ... ... .. ...% Set times and cycles for runoff conditions: % monthly climatology qbar_time=[15:30:365]; qbar_cycle=360; psource_ts=0; if psource_ts % Define mannually the tracer (t, s, and eventually biogeochemical tracer % concentration temp_src0=[11 9 9 12 20 20 24 25 21 18 13 12]; temp_src(:,:)=[temp_src0;temp_src0+2;temp_src0+2.8]; % salt_src0=[2 3 5 1 5 3 2 1 4 2 1 2]; salt_src(:,:)=[salt_src0;salt_src0;salt_src0]; % no3_src0=[0 0 0 0 0 0 0 0 0 0 0 0]; no3_src(:,:)=[no3_src0;no3_src0+2;no3_src0+2.8]; % temp_src_time=[15:30:365]; temp_src_cycle=360; salt_src_time=[15:30:365]; salt_src_cycle=360; else temp_src_time=; temp_src_cycle=; salt_src_time=; salt_src_cycle=; end % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %>> make_runoff You should obtain :
Create runoff forcing from Dai and Trenberth's global monthly climatological run-off dataset River in the domain : Number of river= 2 Domain contains river= - Orange (Senqu) flowing in ocean ATL - Doring flowing in ocean ATL First guess: ============ - Process river #1: Orange (Senqu) Position is approximetly J=36 and I=27 lon src in grid (rho point) ~16.6667 lat src in grid (rho point) ~-28.2677 - Process river #2: Doring Position is approximetly J=21 and I=36 lon src in grid (rho point) ~19.6667 lat src in grid (rho point) ~-32.5713 Do you want to use river (Yes, No) ? Orange (Senqu) ... ... ... ... ... ... ... ... ... ... ... ... Write in runoff file ... river positions ... discharges Line to enter in the croco.in file in the psource_ncfile section : ----------------------------------------------------------------- psource_ncfile: Nsrc Isrc Jsrc Dsrc qbardir Lsrc Tsrc runoff file name CROCO_FILES/croco_runoff.nc 2 24 35 0 -1 30*T 5.0 0.0 35 13 1 -1 30*T 5.0 0.0 -----------------------------------------------------------------
Compiling the modelOnce all the netcdf data files are ready (i.e. XXX_grd.nc, XXX_frc.nc, XXX_ini.nc, and XXX_clm.nc), we can prepare CROCO for compilation. All is done in the ~/Roms_tools/Run/ directory.
Parameters of the configuration: param.hEdit the file ~/Roms_tools/Run/param.h. The line which needs to be changed is: # elif defined BENGUELA_LR parameter (LLm0=41, MMm0=42, N=32) ! Southern Benguela Test Case # else These are the values of the model grid size: LLm0 points in the X direction, MMm0 points in the Y direction and N vertical levels. LLm0 and MMm0 are given by running make_grid.m, and N is defined in crocotools_param.m. The param.h parameters are described in detail in section 2.4
Numerical and physical options: cppdefs.hThe second file to edit is ~/Roms_tools/Run/cppdefs.h. This file defines the CPP keys that are used by the the C-preprocessor when compiling CROCO. The C-preprocessor selects the different parts of the Fortran code which needs to be compiled depending on the defined CPP options. These options are separated in two parts (the basic option keys and the advanced options keys) in cppdefs.h. All the keys and their organization are described in Roms_Agrif user’s Guide.
Compilation script : jobcompCROCO can be compiled by running the UNIX bash script ~/Roms_tools/Run/jobcomp. Jobcomp should be able to recognize your system. It has been tested on Linux, IBM, Sun and Compaq systems. On Linux PCs, the default compiler is the GNU g77, but it is possible to uncomment specific lines in jobcomp to use g95 or ifort. The latter is mandatory when using AGRIF and/or OPEN_MP. When changing the compiler you should provide a corresponding NetCDF library. Once the compilation is done, you should obtain a new executable (croco) in the /Roms_tools/Run directory. CROCO should be recompiled each time param.h or cppdefs.h are changed. If you compile using MPI parallelization, the jobcomp scrip detect it and set the compiler to OpenMPI, so you need to have it installed (http://www.open-mpi.org)
Running the modelEdit the input parameter file: ~/Roms_tools/Run/croco.in. The vertical grid parameters (THETA_S, THETA_B, HC) should be identical to the ones in crocotools_param.m. Otherwise, the other default values should not be changed. The definition of all the input variables is given at the start of each CROCO simulation. To run the model, type in directory ~/Roms_tools/Run/ : ./croco croco.in. If you use paralelle computation, some more specific command are needed : in the case of OpenMP parallelization, set the environment variable OMP_NUM_THREADS to number_of_cpu_used (for example export OMP_NUM_THREADS=4 for 4 cpu parallel run) then ./croco croco.in. In the case of MPI parallelization, use the following command : mpirun -np number_of_processus_used ./croco croco.in. The description of the namelist croco.in is descibed in details in section 2.6. On the screen, you should check the Cu_max parameter: if it is greater than 1 you are violating the CFL criterion. In this case, you should reduce the time step. Example of model run: ./croco croco.in You should obtain :
BENGUELA TEST MODEL 720 ntimes Total number of timesteps for 3D equations. 3600.00 dt Timestep [sec] for 3D equations 60 ndtfast Number of 2D timesteps within each 3D step. 1 ninfo Number of timesteps between runtime diagnostics. 6.000E+00 theta_s S-coordinate surface control parameter. 0.000E+00 theta_b S-coordinate bottom control parameter. 1.500E+02 Tcline S-coordinate surface/bottom layer width used in vertical coordinate stretching, meters. Grid File: CROCO_FILES/croco_grd.nc WARNING: Unrecognized keyword: forcing --> DISREGARDED. Bulk Data File: CROCO_FILES/croco_blk.nc WARNING: Unrecognized keyword: climatology --> DISREGARDED. Boundary File: CROCO_FILES/croco_bry.nc Initial State File: CROCO_FILES/croco_ini.nc Record: 1 Restart File: CROCO_FILES/croco_rst.nc nrst = 720 rec/file: -1 History File: CROCO_FILES/croco_his.nc Create new: T nwrt = 72 rec/file = 0 1 ntsavg Starting timestep for the accumulation of output time-averaged data. 72 navg Number of timesteps between writing of time-averaged data into averages file. Averages File: CROCO_FILES/croco_avg.nc rec/file = 0 Fields to be saved in history file: (T/F) T write zeta free-surface. T write UBAR 2D U-momentum component. T write VBAR 2D V-momentum component. T write U 3D U-momentum component. T write V 3D V-momentum component. T write T( 1) Tracer of index 1. T write T( 2) Tracer of index 2. F write RHO Density anomaly. F write Omega Omega vertical velocity. T write W True vertical velocity. F write Akv Vertical viscosity. T write Akt Vertical diffusivity for temperature. F write Aks Vertical diffusivity for salinity. T write Hbl Depth of KPP-model boundary layer. T write Hbbl Depth of bottom planetary boundary layer. T write shflx_rlw [W/m2] Long Wave heat flux. T write shflx_lat [W/m2] Latent heat flux. T write shflx_sen [W/m2] Sensible heat flux T write Bostr Bottom Stress. T write Wstress Wind Stress. T write U-Wstress comp. U-Wind Stress. T write V-Wstress comp. V-Wind Stress. T write Shflx [W/m2] Surface net heat flux T write Swflx [cm/day] Surface freshwater flux (E-P) T write Shflx_rsw [W/m2] Short-wave surface radiation T write Visc3d Horizontal diffusivity. WARNING: Unrecognized keyword: gls_history_fields --> DISREGARDED. Fields to be saved in averages file: (T/F) T write zeta free-surface. T write UBAR 2D U-momentum component. T write VBAR 2D V-momentum component. T write U 3D U-momentum component. T write V 3D V-momentum component. T write T( 1) Tracer of index 1. T write T( 2) Tracer of index 2. F write RHO Density anomaly T write Omega Omega vertical velocity. T write W True vertical velocity. F write Akv Vertical viscosity T write Akt Vertical diffusivity for temperature. F write Aks Vertical diffusivity for salinity. T write Hbl Depth of KPP-model boundary layer T write Hbbl Depth of the bottom planetary boundary layer T write shflx_rlw [W/m2] Long Wave heat flux. T write shflx_lat[W/m2] Latente heat flux. T write shflx_sen [W/m2] Sensible heat flux. T write Bostr Bottom Stress. T write Wstr Wind Stress. T write U-Wstress comp. U-Wind Stress. T write V-Wstress comp. V-Wind Stress. T write Shflx [W/m2] Surface net heat flux. T write Swflx [cm/day] Surface freshwater flux (E-P) T write Shflx_rsw [W/m2] Short-wave surface radiation. T write diff3d Horizontal diffusivity WARNING: Unrecognized keyword: gls_averages --> DISREGARDED. 1025.0000 rho0 Boussinesq approximation mean density, kg/m3. 0.000E+00 visc2 Horizontal Laplacian mixing coefficient [m2/s] for momentum. WARNING: Unrecognized keyword: lateral_visc --> DISREGARDED. 0.000E+00 tnu2( 1) Horizontal Laplacian mixing coefficient (m2/s) for tracer 1. 0.000E+00 tnu2( 2) Horizontal Laplacian mixing coefficient (m2/s) for tracer 2. 0.000E+00 tnu4( 1) Horizontal biharmonic mixing coefficient [m4/s] for tracer 1. 0.000E+00 tnu4( 2) Horizontal biharmonic mixing coefficient [m4/s] for tracer 2. WARNING: Unrecognized keyword: vertical_mixing --> DISREGARDED. 3.000E-04 rdrg Linear bottom drag coefficient (m/si). 0.000E+00 rdrg2 Quadratic bottom drag coefficient. 0.000E+00 Zob Bottom roughness for logarithmic law (m). 1.000E-04 Cdb_min Minimum bottom drag coefficient. 1.000E-01 Cdb_max Maximum bottom drag coefficient. 1.00 gamma2 Slipperiness parameter: free-slip +1, or no-slip -1. SPONGE_GRID is defined: parameters for sponge layers are set generically in set_nudgcof.F routine 1.157E-05 tauT_in Nudging coefficients [sec^-1] 3.215E-08 tauT_out Nudging coefficients [sec^-1] 3.858E-06 tauM_in Nudging coefficients [sec^-1] 3.215E-08 tauM_out Nudging coefficients [sec^-1] Activated C-preprocessing Options: REGIONAL BENGUELA_LR OBC_EAST OBC_WEST OBC_NORTH OBC_SOUTH CURVGRID SPHERICAL MASKING NEW_S_COORD SOLVE3D UV_COR UV_ADV TS_HADV_RSUP3 TS_HADV_C4 TS_DIF4 SPONGE SPONGE_GRID LMD_MIXING LMD_SKPP LMD_SKPP2005 LMD_BKPP LMD_RIMIX LMD_CONVEC LMD_NONLOCAL SALINITY NONLIN_EOS SPLIT_EOS BULK_FLUX BULK_FAIRALL BULK_LW BULK_EP BULK_SMFLUX FRC_BRY Z_FRC_BRY M2_FRC_BRY M3_FRC_BRY T_FRC_BRY ANA_BSFLUX ANA_BTFLUX OBC_M2CHARACT OBC_M3ORLANSKI OBC_TORLANSKI AVERAGES AVERAGES_K TS_MIX_GEO VAR_RHO_2D M2FILTER_POWER UV_VADV_SPLINES TS_MIX_IMP DIF_COEF_3D NTRA_T3DMIX TS_VADV_AKIMA SPONGE_DIF2 SPONGE_VIS2 BULK_SM_UPDATE LIMIT_BSTRESS DBLEPREC Linux QUAD QuadZero GLOBAL_2D_ARRAY GLOBAL_1D_ARRAYXI GLOBAL_1D_ARRAYETA START_2D_ARRAY START_1D_ARRAYXI START_1D_ARRAYETA PRIVATE_1D_SCRATCH_ARRAY PRIVATE_2D_SCRATCH_ARRAY PRIVATE_1DXI_SCRATCH_ARRAY PRIVATE_1DETA_SCRATCH_ARRAY WESTERN_EDGE EASTERN_EDGE SOUTHERN_EDGE NORTHERN_EDGE MYID MPI_master_only ZEROTH_TILE SINGLE_TILE_MODE LF_AM_STEP FIRST_TIME_STEP FIRST_2D_STEP NOT_LAST_2D_STEP PUT_GRID_INTO_RESTART PUT_GRID_INTO_HISTORY PUT_GRID_INTO_AVERAGES NF_FTYPE nf_get_att_FTYPE nf_put_att_FTYPE nf_get_var1_FTYPE nf_put_var1_FTYPE nf_get_vara_FTYPE nf_put_vara_FTYPE nf_put_var_FTYPE NF_FOUT fast_indx_out NUMBER OF THREADS: 1 BLOCKING: 1 x 1. Spherical grid detected. hmin hmax grdmin grdmax Cu_min Cu_max 10.000000 5000.000000 .292173342E+05 .332604524E+05 0.04798441 0.64319922 volume=4.201213988031145500000E+15 open_cross=1.419920165738393211365E+10 lonmin= 8.0000 lonmax= 22.0000latmin=-38.0000 latmax=-25.8968 Vertical S-coordinate System: level S-coord Cs-curve at_hmin over_slope at_hmax 32 0.0000000 0.0000000 0.000 0.000 0.000 31 -0.0312500 -0.0000878 -0.293 -4.629 -4.977 30 -0.0625000 -0.0003544 -0.586 -9.680 -10.822 29 -0.0937500 -0.0008092 -0.879 -15.175 -17.581 28 -0.1250000 -0.0014682 -1.173 -21.151 -25.331 27 -0.1562500 -0.0023546 -1.466 -27.664 -34.185 26 -0.1875000 -0.0034997 -1.760 -34.787 -44.294 25 -0.2187500 -0.0049438 -2.054 -42.615 -55.856 24 -0.2500000 -0.0067379 -2.348 -51.269 -69.116 23 -0.2812500 -0.0089453 -2.642 -60.897 -84.383 22 -0.3125000 -0.0116438 -2.937 -71.683 -102.033 21 -0.3437500 -0.0149284 -3.232 -83.852 -122.529 20 -0.3750000 -0.0189152 -3.527 -97.677 -146.433 19 -0.4062500 -0.0237445 -3.823 -113.489 -174.427 18 -0.4375000 -0.0295867 -4.120 -131.690 -207.338 17 -0.4687500 -0.0366477 -4.417 -152.766 -246.166 16 -0.5000000 -0.0451767 -4.716 -177.303 -292.120 15 -0.5312500 -0.0554741 -5.015 -206.012 -346.658 14 -0.5625000 -0.0679033 -5.316 -239.748 -411.545 13 -0.5937500 -0.0829023 -5.618 -279.546 -488.907 12 -0.6250000 -0.1010001 -5.923 -326.651 -581.311 11 -0.6562500 -0.1228348 -6.229 -382.570 -691.856 10 -0.6875000 -0.1491762 -6.539 -449.118 -824.277 9 -0.7187500 -0.1809531 -6.851 -528.486 -983.085 8 -0.7500000 -0.2192860 -7.168 -623.316 -1173.718 7 -0.7812500 -0.2655264 -7.490 -736.796 -1402.737 6 -0.8125000 -0.3213048 -7.818 -872.771 -1678.057 5 -0.8437500 -0.3885879 -8.153 -1035.879 -2009.225 4 -0.8750000 -0.4697479 -8.497 -1231.717 -2407.757 3 -0.9062500 -0.5676467 -8.851 -1467.032 -2887.545 2 -0.9375000 -0.6857360 -9.218 -1749.967 -3465.345 1 -0.9687500 -0.8281796 -9.600 -2090.341 -4161.370 0 -1.0000000 -1.0000000 -10.000 -2500.000 -5000.000 Time splitting: ndtfast = 60 nfast = 82 Maximum grid stiffness ratios: rx0 =0.2416875293 rx1 = 6.6361334581 GET_INITIAL -- Processing data for time = 0.000 record = 1 GET_BRY -- Read all boundary data for time = 345.0 GET_BRY -- Read all boundary data for time = 15.00 GET_BULK -- Read fields for bulk formula for time = 345.0 GET_BULK -- Read fields for bulk formula for time = 15.00 DEF_HIS/AVG - Created new netCDF file 'CROCO_FILES/croco_his.nc'. WRT_GRID -- wrote grid data into file 'CROCO_FILES/croco_his.nc'. WRT_HIS -- wrote history fields into time record = 1 / 1 MAIN: started time-steping. STEP time[DAYS] KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME trd 0 0.00000 0.000000000E+00 4.9898475E+01 4.9898475E+01 4.2012140E+15 0 1 0.04167 4.767498268E-05 4.9899041E+01 4.9899088E+01 4.2011342E+15 0 2 0.08333 1.071058885E-04 4.9899251E+01 4.9899359E+01 4.2010607E+15 0 3 0.12500 1.985077371E-04 4.9899779E+01 4.9899978E+01 4.2010509E+15 0 4 0.16667 3.163545086E-04 4.9900321E+01 4.9900638E+01 4.2010600E+15 0 5 0.20833 4.379761019E-04 4.9901032E+01 4.9901470E+01 4.2010823E+15 0 6 0.25000 5.677909136E-04 4.9901841E+01 4.9902409E+01 4.2010898E+15 0 7 0.29167 6.835404559E-04 4.9902494E+01 4.9903177E+01 4.2010729E+15 0 ... ... ...
Long simulationsIn many studies, there is a need for long simulations: to reach the spin-up of the solution and/or to obtain statistical equilibriums. For regional models, 10 years appears to be a reasonable model simulation length. In this case, to prevent the generation of large output files, the strategy is to relaunch the model every simulated month. This is done by the UNIX csh script: run_croco.csh . Warning! the CROCO input file use for long simulations is croco_inter.in. It should be edited accordingly.
- It gets the grid, the forcing, the initial and the boundary files.
- It runs the model for 1 month.
- It stores the output files in a specific form: croco_avg_Y4M3.nc (for the CROCO averaged output of March of year 4).
- It replaces the initial file by the restart file (croco_rst.nc) which as been generated at the end of the month.
- It relaunch the model for next month.
set MODEL=croco set SCRATCHDIR=`pwd`/SCRATCH set INPUTDIR=`pwd` set MSSDIR=`pwd`/CROCO_FILES set MSSOUT=`pwd`/CROCO_FILES set CODFILE=croco set AGRIF_FILE=AGRIF_FixedGrids.in # # Model time step [seconds] # set DT=5400 # # Number of days per month # set NDAYS = 30 # # number total of grid levels # set NLEVEL=1 # # Time Schedule - TIME_SCHED=0 - yearly files # TIME_SCHED=1 - monthly files # set TIME_SCHED=1 # set NY_START=1 set NY_END=10 set NM_START=1 set NM_END=12Variables definitions:
- MODEL=croco : Name used for the input files. For example croco_grd.nc.
- SCRATCHDIR=`pwd`/SCRATCH : Scratch directory where the model is run
- INPUTDIR=`pwd` : Input directory where the croco_inter.in input file is.
- MSSDIR=`pwd`/CROCO_FILES : Directory where the croco input NetCDF files (croco_grd.nc, croco_frc.nc, …) are stored.
- MSSOUT=`pwd`/CROCO_FILES : Directory where the croco output NetCDF files (croco_his.nc, croco_avg.nc, …) are stored.
- CODFILE=croco : CROCO executable.
- AGRIF_FILE=AGRIF_FixedGrids.in : AGRIF input file which defines the position of child grids when using embedding.
- DT=5400 : Model time step in seconds.
- NDAYS = 30 : Number of days in 1 month.
- NLEVEL=1 : Total number of model grids (no AGRIF: NLEVEL=1).
- NY_START=1 : Starting year.
- NY_END=10 : Ending Year.
- NM_START=1 : Starting month.
- NM_END=12 : Ending month.
Getting the resultsOnce the model has run, or during the simulation, it is possible to visualize the model outputs using a Matlab graphic user interface : croco_gui. Launch croco_gui in the Matlab session (in the ~/Roms_tools/Run/ directory): >> croco_gui A window pops up, asking for a CROCO history NetCDF file (Figure 1.4). You should select croco_his.nc (history file) or croco_avg.nc (average file) and click “open”.
Fig. 1.4: Entrance window of croco_gui
Fig 1.5: croco_gui
- Ke : Horizontal slice of kinetic energy: .
- Rho : Horizontal slice of density using the non-linear equation of state for seawater of Jackett and McDougall (1995).
- Pot_Rho : Horizontal slice of the potential density.
- Bvf : Horizontal slice of the Brunt-Väisäla frequency:
- Vort : Horizontal slice of vorticity: .
- Pot_vort : Horizontal slice of the vertical component of Ertel’s potential vorticity: . In our case, λ=ρ.
- Psi : Horizontal slice of stream function: . This routine might be costly since it inverses the Laplacian of the vorticity (using a successive over relaxation solver).
- Speed : Horizontal slice of the ocean currents velocity : .
- Transport : Horizontal slice of the transport stream function : .
- Okubo : Horizontal slice of the Okubo-Weiss parameter : .
- Chla : Compute a chlorophyll-a from Large and Small phytoplankton concentrations.
- z_SST_1C : Depth of 1°C below SST.
- z_rho_1.25 : Depth of 1.25 kg.m3 below surface density.
- z_max_bvf : Depth of the maximum of the Brunt-Väisäla frequency.
- z_max_dtdz : Depth of the maximum vertical temperature gradient.
- z_20C : Depth of the 20°C isotherm.
- z_15C : Depth of the 15°C isotherm.
- z_sig27 : Depth of the 1027 kg.m3 density layer.
- r_factor :
DiagnosticsTo analyze the long simulations, a few scripts have been added in the directory: ~/Roms_tools/Diagnostic_tools:
- croco_diags.m : Get volume and surface averaged quantities from a CROCO simulation.
- plot_diags.m : Plot the averaged quantities computed by croco_diags.m.
- get_Mmean.m : Get the monthly mean climatology.
- get_Smean.m : Get the seasonal and annual mean climatology from the outputs of get_Mmean.m.
- get_Meddy.m : Get the monthly variance climatology (if the variable nonseannal = 1, the non-seasonal variance is computed; i.e., the seasonal variation are filtered). It needs that get_Mmean.m and get_Smean.m are run before.
- get_Seddy.m : Get the seasonal and annual RMS from the results of get_Meddy.m.
- croco_anim.m : Create an animation from the monthly history or average files.
- log in as root
- go to the directory where the file is saved.
- type : rpm -Uvh ppm2fli-2.1-1.i386.rpm
- type : rpm -Uvh xanim-2.80.1-12.i386.rpm
- log out
TidesUsing the method described by Flather (1976), CROCO is able to propagate the different tidal constituents from its lateral boundaries. To do so, define the cpp keys TIDES, SSH_TIDES and UV_TIDES and recompile the model using jobcomp. To work correctly, the model should use the Flather (1976) open boundary radiation scheme (cpp key OBC_M2FLATHER defined). The tidal components are added to the forcing file (XXX_frc.nc) by the Matlab program make_tides.m. Edit the file : ~/Roms_tools/Run/crocotools_param.m. The part of the file that you should change is :
%%%%%%%%%%%%%%%%%%%%% % % 5-Parameters for tidal forcing % %%%%%%%%%%%%%%%%%%%%% % % TPXO file name (TPXO7) % tidename=[CROCOTOOLS_dir,'TPXO7/TPXO7.nc']; % % Number of tides component to process % Ntides=10; % % Chose order from the rank in the TPXO file : % "M2 S2 N2 K2 K1 O1 P1 Q1 Mf Mm" % " 1 2 3 4 5 6 7 8 9 10" % tidalrank=[1 2 3 4 5 6 7 8 9 10]; % % Compare with tidegauge observations % lon0=18.37; lat0=-33.91; % Cape Town location Z0=1; % Mean depth of the tidegauge in Cape TownVariables definitions :
- tidename=[CROCOTOOLS_dir,’TPXO7/TPXO7.nc’] : Location of the netcdf tidal dataset. This file is derived from the Oregon State University global model of ocean tides TPXO.7 (Egbert and Erofeeva, 2002). Data sources can be found at http://www.oce.orst.edu/po/research/tide/global.html. It is also possible to use TPXO7.
- Ntides=10 : Number of tidal components to process. Warning! This value should be identical to the value of the parameter Ntides in param.h: “parameter (Ntides=10)”.
- tidalrank=[1 2 3 4 5 6 7 8 9 10] : Order to select the different tidal components.
- lon0=18.37;lat0=-33.91;Z0=1 : Location of a tidal gauge to compare the interpolated values with observations.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 6-Temporal parameters (used for make_tides, make_CFSR, make_NCEP, make_OGCM) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Yorig = 1900; % reference time for vector time % in croco initial and forcing files % Ymin = 2000; % first forcing year Ymax = 2000; % last forcing year Mmin = 1; % first forcing month Mmax = 3; % last forcing month % Dmin = 1; % Day of initialization Hmin = 0; % Hour of initialization Min_min = 0; % Minute of initialization Smin = 0; % Second of initialization % SPIN_Long = 0; % SPIN-UP duration in YearsThe origin of time (Yorig: 1 january of year Yorig) should be kept the same for all the preprocessing and postprocessing steps. Save crocotools_param.m and run make_tides in the Matlab session: >> make_tides You should obtain :
Start date for nodal correction : 1-Jan-2000 Reading CROCO grid parameters ... Tidal components : M2 S2 N2 K2 K1 O1 P1 Q1 Mf Mm Processing tide : 1 of 10 ...
BiogeochemistryThe cpp keys related to the biogeochemistry models available in CROCO_AGRIF are :
- BIO_NChlPZD : 5 components (Nitrate, Chlorophyll, Phytoplankton, Zooplankton, Detritus) biogeochemical model.
- BIO_N2ChlPZD2 : 7 components (Nitrate, Ammonium, Chlorophyll, Phytoplankton, Zooplankton, Small Detritus, Large Detritus) biogeochemical model.
- BIO_BioEBUS : 12 components (Nitrate, Nitrite, Ammonium, 2 Phytoplankton, 2 Zooplankton, 2 Detritus, DON, Oxygen and Nitrous Oxyde) biogeochemical model.
- PISCES : 24 components biogeochemical model. This latter is a more complex biogeochemical model, firstly coupled to OPA and now a beta version of the model can be coupled with CROCO_AGRIF. It is described in (Aumont , 2005) provided in the documentation section of CROCO_TOOLS.
- makeini = 1 to process initial data
- make_clm = 1 to process lateral boundary data as 4D (“xyzt”) variables
- make_bry = 1 to process lateral boundary data as 3D (“xzt”) variables
- For NChlPZD and N2ChlPZD2 models, select makenpzd = 1
- For BioEBUS model, select makebioebus = 1
- For PISCES model, select makepisces = 1
Add_no3: creating variables and attributes for the OA file Add_no3: creating variables and attributes for the Climatology file Ext tracers: Roa = 0 km - default value = NaN Ext tracers: horizontal interpolation of the annual data Ext tracers: horizontal interpolation of the seasonal data time index: 1 of total: 4 time index: 2 of total: 4 time index: 3 of total: 4 time index: 4 of total: 4 Vertical interpolations NO3... Time index: 1 of total: 4 Time index: 2 of total: 4 Time index: 3 of total: 4 Time index: 4 of total: 4 CHla... Add_chla: creating variable and attribute ... Make a few plots...
Figs 1.7: Result of make_clim_pisces for the Benguela example : NO3 [mMol P m-3] and PO4 forcing fields [mMol P m-3].
Fig. 1.8: Result of make_clim_pisces for the Benguela example : Iron dust deposition forcing fields [nmol Fe m-3].
Inter-Annual simulationsCROCOTOOLS can help to realize inter-annual simulations. In this context, we rely on Ocean Global Circulations Models (OGCM) for the lateral boundary conditions and a global atmospheric reanalysis for the surface forcing (CFSR or NCEP). To limit the volume of data which needs to be transfered over the Internet, we use Opendap to extract only the necessary subgrids. In section 7 of crocotool_param.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 7 - Parameters for Interannual forcing (SODA, ECCO, CFSR, NCEP, ...) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Download_data = 1; % Get data from OPENDAP sites level = 0; % AGRIF level; 0 = parent grid % NCEP_version = 3; % NCEP version: % [ CFSR up-to-date product are recommandated ] % 1: NCEP/NCAR Reanalysis, 1/1/1948 - present % 2: NCEP-DOE Reanalysis, 1/1/1979 - present % 3: CFSR (Climate Forecast System Reanalysis), % 1/1/1979 - 31/3/2011 % % Option for using local datasets (previously downloaded) % rather than online opendap procedure % Get_My_Data = 0; % 1: use local datasets ... ... ... ... ... ...
- To use the OpenDAP protocol and dextract data over your region directly from the data servers select Download_data=1 and Get_My_Data = 0.
- Otherwise you can use datasets you previously downloaded in local, in this case select Download_data=0 (previously done) and Get_My_Data = 1. [This last option only works for NCEP1 and NCEP2 datasets ]
Getting surface forcing data from CFSR (recommended)
- Select NCEP_version = 3
- Then type make_CFSR
Read in the grid /home/Roms_tools/Run/CROCO_FILES/croco_grd.nc !!!!!!!!!!!!!!!!!!!!! ===================== BEGIN DOWNLOAD STEP ===================== !!!!!!!!!!!!!!!!!!!!! ==================== Download CFSR data with OPENDAP ==================== Get CFSR data from 2000 to 2000 From http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_flxf/ Minimum Longitude: 8 Maximum Longitude: 22 Minimum Latitude: -38 Maximum Latitude: -25.8968 Making output data directory /home/Roms_tools/Run/DATA/CFSR_Benguela_LR/ mkdir: cannot create directory `/home/Roms_tools/Run/DATA/CFSR_Benguela_LR/': File exists ========================== VNAME IS Land_cover_1land_2sea ========================== ------ Get time units and time: Get_My_Data is OFF ------ READDAP: reading time ========================== GET SUBGRID time only k=1 USE VARIABLE: Land_cover_1land_2sea ========================== Get_My_Data =0 READDAP: reading lon READDAP: reading lat GET LAND MASK READDAP: reading Land_cover_1land_2sea Create /home/Roms_tools/Run/DATA/CFSR_Benguela_LR/Land_cover_1land_2sea.nc ========================== VNAME IS Temperature_height_above_ground ========================== ------ Get time units and time: Get_My_Data is OFF ------ READDAP: reading time ========================== Processing year: 2000 ========================== Processing month: 1 Get Temperature_height_above_ground for year 2000 - month 1 Downloading Temperature_height_above_ground for 01-Jan-2000 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 01-Jan-2000 06:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 01-Jan-2000 12:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 01-Jan-2000 18:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 02-Jan-2000 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 02-Jan-2000 06:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 02-Jan-2000 12:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 02-Jan-2000 18:00:00 READDAP: reading Temperature_height_above_ground Downloading Temperature_height_above_ground for 03-Jan-2000 READDAP: reading Temperature_height_above_ground
Getting surface forcing data from NCEP2 reanalysis
- Select NCEP_version = 2
- Then type make_NCEP
Read in the grid CROCO_FILES/croco_grd.nc BEGIN DOWNLOAD STEP Download NCEP data with OPENDAP or my FTP data OPENDAP Procedure Get NCEP data from 2000 to 2000 From http://nomad1.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/ Minimum Longitude: 8 Maximum Longitude: 22 Minimum Latitude: -38 Maximum Latitude: -25.8968 Making output data directory ../Run/DATA/NCEP_Benguela_LR/ VNAME IS landsfc Get time units and time: Get_My_Data is OFF Reading: http://nomad1.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/6hr/flx/flx Constraint: time Server version: dods/3.2 ...If non-opendap procedure (Download_data=0, Get_My_Data=1), you should obtain:
Read in the grid CROCO_FILES/croco_grd.nc Download NCEP data with OPENDAP or my FTP data Direct FTP Procedure Use my own ncep data NCEP Get NCEP data from to From path/NCEP_REA2/ Minimum Longitude: 8 Maximum Longitude: 22 Minimum Latitude: -38 Maximum Latitude: -25.8968 Get_My_Data = 1 Read subgrid from file /data/NCEP_REA2/land.sfc.gauss.nc Get the Land Mask tindex = 1 In case of Get_My_Data ON Get the Land Mask by using extract_NCEP_Mask_Mydata Execute extract_NCEP_Mask_Mydata Get land for year 2000 - month 1 Create /Run/DATA/NCEP_Benguela_LR/land_Y2000M1.nc VNAME IS air Processing year: 2000 ... ...
QuikSCAT monthly climatology dataIf you want to use the QSCAT climatology, computed over 2000 – 2009, based over these previous QSCAT data, in a Matlab session type make_QSCAT_clim
Getting lateral boundary conditionsInitial conditions and lateral boundary conditions can be obtained from several ocean global circulation models (OGCM) such as SODA (Carton et al., 2005) or ECCO (Stammer et al., 1999). The SODA reanalysis is available from 1958 to 2001 and ECCO is available from 1993 until now. The Matlab script make_OGCM.m is used to download data over the Internet, and to perform the interpolations on the model grid. A lateral boundary conditions NetCDF file is generated for each month of your simulation in the directory ~/Roms_tools/Run/CROCOFILES/ . The part of the file crocotools_param.m that you should change is:
%%%%%%%%%%%%%%%%%%% % % Options for make_OGCM % %%%%%%%%%%%%%%%%%%% OGCM = 'SODA'; % Select the OGCM: SODA(1958-2001), ECCO(1993-2005), ... OGCM_dir = [FORC_DATA_DIR,OGCM,'_',CROCO_config,'/']; bry_prefix = [CROCO_files_dir,'croco_bry_',OGCM,'_']; clm_prefix = [CROCO_files_dir,'croco_clm_',OGCM,'_']; ini_prefix = [CROCO_files_dir,'croco_ini_',OGCM,'_']; OGCM_prefix = [OGCM,'_']; rmdepth = 2; %Overlap parameters : before (_a) and after (_p) the months. itolap_a=2; %Overlap parameter at the begining of the months. itolap_p=2; %Overlap parameter at the end of the months. %Variables description :
- OGCM = ‘SODA’ : Name of the OGCM employed (SODA or ECCO).
- OGCM_dir = [FORC_DATA_DIR,OGCM,’_’,CROCO_config,’/’] : OGCM data directory.
- bry_prefix = [CROCO_files_dir,’croco_bry_’,OGCM,’_’] : Left part of the boundary file name.
- clm_prefix = [CROCO_files_dir,’croco_clm_’,OGCM,’_’] : Left part of the climatology file name.
- ini_prefix = [CROCO_files_dir,’croco_ini_’,OGCM,’_’] : Left part of the initial file name.
- OGCM_prefix = [OGCM,’_’] : Left part of the OGCM file name. This is where OGCM data are stored.
- rmdepth = 2 : Number of bottom levels to remove. This is useful when there is no valid data at this level. For example, if the depth in the CROCO domain is shallower than the OGCM depth.
- itolap_a : Overlap parameter at the begining of a month with the next month.
- itolap_p : Overlap parameter at the end of a months with the previous months. Commonly, these two parameters are equal.
Add the paths of the different toolboxes Arch : x86_64 - Matlab version : 2006a Use of mexnc and loaddap in 64 bits. Download data... Get data from Y2000M1 to Y2000M3 Minimum Longitude: 12.3 Maximum Longitude: 20.3 Minimum Latitude: -35.5 Maximum Latitude: -26.3815 Making output data directory ../Run/DATA/SODA_Benguela/ Process the dataset: http://iridl.ldeo.columbia.edu./SOURCES/.CARTON-GIESE/.SODA/.v1p4p3 Processing year: 2000 Processing month: 1 Download SODA for 2000 - 1 ...SSH ...U ...
Running the model for interannual runsCompile the model with jobcomp (and with the cpp keys BULK_FLUX and BULK_EP defined) and edit the input parameter file ~/Roms_tools/Run/croco_inter.in as for the climatology experiments. As for the long simulations, a csh script (run_croco_inter.csh) manages the handling of input and output files. It also changes the number of time steps so each month has the correct length. This script takes care of leap years. For example Y1996M2 (February 1996) is 29 days long. Part to edit in run_croco_inter.csh
# set MODEL=croco set SCRATCHDIR=`pwd`/SCRATCH set INPUTDIR=`pwd` set MSSDIR=`pwd`/CROCO_FILES set MSSOUT=`pwd`/CROCO_FILES set CODFILE=croco set AGRIF_FILE=AGRIF_FixedGrids.in # set BULK_FILES=1 set FORCING_FILES=1 set CLIMATOLOGY_FILES=0 set BOUNDARY_FILES=1 # # Atmospheric surface forcing dataset (NCEP, GFS,...) # set ATMOS=NCEP # # Oceanic boundary and initial dataset (SODA, ECCO,...) # set OGCM=SODA # # Model time step [seconds] # set DT=5400 # # number total of grid levels (1: No child grid) # set NLEVEL=1 # set NY_START=2000 set NY_END=2000 set NM_START=1 set NM_END=3 # # Restart file - RSTFLAG=0 -> No Restart # RSTFLAG=1 - Restart # set RSTFLAG=0 # # Time Schedule - TIME_SCHED=0 -> yearly files # TIME_SCHED=1 -> monthly files # set TIME_SCHED=1 #Variables definitions:
- MODEL=croco : Name used for the input files. For example croco_grd.nc.
- SCRATCHDIR=`pwd`/SCRATCH : Scratch directory where the model is run.
- INPUTDIR=`pwd` : Input directory where the croco_inter.in input file is located.
- MSSDIR=`pwd`/CROCO_FILES : Directory where the croco input NetCDF files (croco_grd.nc, croco_frc.nc, …) are stored.
- MSSOUT=`pwd`/CROCO_FILES : Directory where the croco output NetCDF files (croco_his.nc, croco_avg.nc, …) are stored.
- CODFILE=croco : CROCO executable.
- AGRIF_FILE=AGRIF_FixedGrids.in : AGRIF input file which defines the position of child grids when using embedding.
- BULK_FILES=1 : 1 if using bulk NetCDF files (should be 1 for NCEP).
- FORCING_FILES=1 : 1 if using forcing NetCDF files (should be 1 for NCEP).
- CLIMATOLOGY_FILES=0 : 1 if using XXX_clm.nc files. Using a climatology file for each month can take a lot of disc space. It is less costly to use boundary files (XXX_bry.nc).
- BOUNDARY_FILES=1 : 1 if using XXX_bry.nc files.
- ATMOS=NCEP : name of the atmospheric reanalysis. For the moment it is only NCEP.
- OGCM=SODA : name of the OGCM for the boundary conditions. SODA or ECCO.
- DT=5400 : Model time step in seconds.
- NDAYS = 30 : Number of days in 1 month.
- NLEVEL=1 : Total number of model grids (no embedding: NLEVEL=1).
- NY_START=2000 : Starting year.
- NY_END=2000 : Ending Year.
- NM_START=1 : Starting month.
- NM_END=3 : Ending month.
- RSTFLAG=0 : 1 if restarting a simulation
- TIME_SCHED=1 : (obsolete) 0 if using yearly files, 1 if using monthly files. Since make_NCEP and make_OGCM are creating only monthly files, it should be always 1.
Preparation of nested gridsTo run a nested (or embedded) model, the user must provide the grid, the surface forcing and the initial conditions. To name the different files, AGRIF employs a specific strategy: if the parent file names are of the form: XXX.nc, the first child names will be of the form: XXX.nc.1, the second: XXX.nc.2, etc… This convention is also applied for the “croco.in” input files. A graphic user interface (NestGUI) facilitates the generation of the different NetCDF files. Launch nestgui in the Matlab session (in the ~/Roms_tools/Run/ directory): >> nestgui A window pops up, asking for a “PARENT GRID” NetCDF file (Figure 1.9). In our Benguela test case, you should select ~/Roms_tools/Run/CROCOFILES/croco_grd.nc (grid file) and click “open”. The main window appears (Figure 1.10).
Fig 1.9: Entrance window of NestGUI
Fig. 1.10: The NestGUI main window
- To define the child domain, click “Define child” and create the child domain on the main window. The size of the grid child (Lchild and Mchild) is now visible. This operation can be redone until you are satisfied with the size and the position of the child domain. The child domain can be finely tuned using the imin, imax, jmin and jmax boxes. Be aware that the mask interpolation from the parent grid to the child grid is not optimal close to corners. Parent/Child boundaries should be placed where the mask is showing a straight coastline. A warning will be given during the interpolation procedure if this is not the case.
- “Interp child” : It generates the child grid file. Before, you should select if you are using a new topography (“New child topo” button) for the child grid or if you are just interpolating the parent topography on the child grid. In the first case, you should defines what topography file will be used (e.g. ~/Roms_tools/Topo/etopo2.nc or another dataset). You should also define if you want the volume of the child grid to match the volume of the parent close to the parent/child boundaries (“Match volume” button, it should be “on” by default). You should also define the ‘r’ factor (Beckmann and Haidvogel, 1993) for topography smoothing (“r-factor”, 0.25 is safe) and the number of points to connect the child topography to the parent topography (“n-band”, it follows the relation hnew = α. hnew + (1 – α ).hparent , where α is going from 0 to 1 in “n-band” points from the parent/child boundaries). You should also select the child minimum depth (“Hmin”, it should be lower or equal to the parent minimum depth), the maximum depth at the coast (“Hmax coast”), the number of selective hanning filter passes for the deep regions (“n filter deep”) and the number of final hanning filter passes (“n filter final”).
- “Interp forcing”: It interpolates the parent surface forcing on the child grid. Select the parent forcing file to be interpolated (e.g. /Roms_tools/Run/CROCOFILES/croco_frc.nc). The child forcing file croco_frc.nc.1 will be created. The parent surface fluxes are interpolated on the child grid. You can use “Interp bulk” if you are using a bulk formula. In this case, the parent bulk file (e.g. /Roms_tools/Run/CROCOFILES/croco_blk.nc) will be interpolated on the child grid.
- “Interp initial”: It interpolates parent initial conditions on the child grid. Select the parent initial file (e.g. /Roms_tools/Run/CROCOFILES/croco_ini.nc). The child initial file (e.g. ~/Roms_tools/Run/CROCOFILES/croco_ini.nc.1) will be created. If the topographies are different between the parent and the child grids, the child initial conditions are vertically re-interpolated. In this case you should check if the options “vertical corrections” and “extrapolations” are selected. It is preferable to always use these options. If there are parent biological fields in the initial files, they can be processed automatically, we have to define the type of biological models: either NChlPZD or N2ChlPZD2, then click on the ‘Biol‘ button, either BioEBUS, then click on the ‘Bioebus‘ , either PISCES biogeochemical model, then click on the ‘Pisces’ button. The fields needed for the initialization of these biological model will be processed. For information, in the case of NPZD-type ( NChlPZD or N2ChlPZD2) model, there are 5 additional fields, in the case of BIOEBUS, there are 8 additional fields and in the case of PISCES biogeochemical model, there is 8 more fields.
- “Interp dust”: It interpolates parent Iron dust forcing file conditions on the child grid. This is needed only in case of PISCES biogeochemical experiments. Select the parent initial file (e.g. /Roms_tools/Run/CROCOFILES/croco_frcbio.nc). The child initial file (e.g. ~/Roms_tools/Run/CROCOFILES/croco_frcbio.nc.1) will be created.
- “Interp restart” generates a child restart file from a parent restart file (e.g. ~/Roms_tools/Run/CROCOFILES/croco_rst.nc). This can be done to “hot start” a child model after the spin-up of the parent model. As in the case of initial files generation, there is the possibility to compute ans write in the nested restart file either the biological fields from NPZD-type biological model, either the PISCES biogeochemical fields. For this purpose, click either on the ‘Biol‘ button, either on the the ‘Pisces‘ button.
- You can click on “Create croco.in.*” to generate a child input file (croco.in.1) from the parent input file and click on “Create AGRIF_FixedGrids.in” to generate a AGRIF_FixedGrids.in file (the file which defines the child grid position in the parent grid).
- “River” can be used to locate the river on the coast.
- “Interp clim” can be useful to generate boundary conditions to test the child model alone. As in the case of restart an initial nested files generation, during the eventual phase of creation of a nested clim file, the fields related to the NPZD-type biological models or the PISCES one can be computed and written in the nested clim file. As usual, click either on the ‘Biol‘ button or on the ‘Pisces‘ button.
Compiling and running the modelThe CROCO nesting procedure needs a Fortran 95 compiler. For Linux PCs, the Intel Fortran Compiler (ifort) is available at http://www.intel.com/software/products/compilers/flin/noncom.htm. To be able to compile CROCO with ifort, you should change the corresponding comments in jobcomp. To activate the AGRIF nesting procedure, define AGRIF in ~/Roms_tools/Run/cppdefs.h. Moreover, to activate the AGRIF nesting with the 2-way capability, define AGRIF and AGRIF_2WAY. It is possible to edit the file AGRIF_FixedGrids.in. This file contains the child grid positions (i.e. imin,imax,jmin,jmax) and coefficients of refinement. A first line gives the number of children grids per parent (if AGRIF_STORE_BAROT_CHILD is defined, only one child grid can be defined per parent grid). A second line gives the relative position of each grid and the coefficient of refinement for each dimension. Edit the input files croco.in.1, croco.in.2 , etc… to define correctly the file names and the time steps. To run the model, simply type at the prompt: croco croco.in. To visualize the CROCO model outputs for different grid levels, change the value in the “child models” box in croco_gui.
Oceanic Forecast : Forecast_toolsOperational oceanography has become one of the highlights of modern oceanography. Forecast_tools is a subset of CROCOTOOLS that allows running real-time simulations based on a downscaling strategy. It relies on operational global ocean circulation models for the initial conditions and lateral forcing and operational global atmospheric models (introduced through bulk formulations) for surface forcing. A detailed description of the forecast system can be found here. In order to limit the volume of data transferred over the internet, we use the Open-source Project for a Network Data Access Protocol (OPeNDAP) and extract only the necessary subgrid.This method reduces by a great amount the band width needed for data download.This point is critical for small operational centers that do not have access to high-performance Internet connection. Another critical point of the same kind is the availability of data. U.S. data bases are generally more available than European ones, but Mercator Ocean has made an effort to provide its quarter-degree resolution forecast product through an OPeNDAP server. If large-scale ocean dynamics are slow compared with coastal dynamics (this might be incorrect near rapidly changing large-scale systems such as western boundary currents), the lateral boundary data can be interpolated from a coarse-resolution operational model. The global model resolution issue becomes more sensitive when considering the initialization problem. In a regional domain with low intrinsic variability and where the circulation is directly forced by surface fluxes (for example in the nearshore zone of coastal upwelling regions; or in offshore regions away from fronts and eddies), initialization is of lower importance (a restart file created at a given forecast cycle can be used for the next cycle). In this case, ocean circulation predictability is relying on that of the forcing fields.Those are generated using extracted data from the half-degree, 6-hourly Global Forecast System ( GFS), freely available via OPeNDAP by the U.S. National Center for Environmental Prediction (NCEP/NOAA). The problem becomes more complicated if oceanic intrinsic variability is dominant. In this case, mesoscale eddies are formed and evolve at time-scales of the order of the month with low predictability.The model may well provide a statistically reliable solution but eddies at any given time are usually not correlated with real-time events. An initialization method is therefore required to adjust/synchronize these structures to real-time events. This adjustment is done through data assimilation. We have opted for a simple form of data assimilation, which makes use of Mercator’s quarter-degree resolution hindcast/forecast product. The global product in this case assimilates for us real-time mesoscale eddies from satellite altimetry and in-situ data. Then, a Newtonian nudging is used to adjust Mercator data to CROCO dynamics. Nudging is performed during the nowcast step and released during forecast. The strategy for a nowcast/forecast cycle is as follows. The hindcast is run for 5 days (from t0-5 to t0, t0 being the present time) using interpolated Mercator data for lateral forcing and GFS data for surface forcing. A CROCO restart file (from a previous forecast) is used for initialization at time t0-5, while nudging assimilates the Mercator global ocean data (with a nudging time-scale of 15 days). This provides a nowcast at t0, which is the initial condition of the 6-day forecast run on the following week. A Shell script (run_croco_forecast.bash) manages the whole procedure: download and pre-processing, hindcast and forecast simulations, post-processing, data storage and preparation of the next nowcast/forecast cycle. A UNIX Shell script ( /Roms_tools/Run/run_croco_forecast.bash) manages data downloading, the hindcast and forecast simulations and data storage. The script run_croco_forecast.bash starts Matlab in batch mode to download using OPENDAP the lateral forcing data from Mercator and surface forcing data from GFS. It interpolates the data on CROCO grid and launches the hindcast and the forecast runs. CROCO input files /Roms_tools/Run/croco_hindcast.in and /Roms_tools/Run/croco_forecast.in should also be edited to change the time step and number of time steps required for the simulations. The CROCO input file croco_hindcast.in should be defined to set the hindcast run duration to 5 days (default value in crocotools_param.h) and a restart file is generated at the end of the hindcast run. To use the Forecast_tools, some specific cppkeys must be defined in the CROCO code. The cppkeys BULK_FLUX and ROBUST_DIAG must be defined as :
# define BULK_FLUX # ifdef BULK_FLUX #define BULK_FAIRALL #define BULK_LW #define BULK_EP #define BULK_SMFLUX #undef SST_SKIN #undef ANA_DIURNAL_SW #undef ONLINE # else ...
#define ZNUDGING #define M2NUDGING #define M3NUDGING #define TNUDGING #define ROBUST_DIAG # endifThe script run_croco_forecast.bash should be edited to change the directory pathways (HOME, RUNDIR, PATH, LD_LIBRARY_PATH, MATLAB,…). The script run_croco_forecast.csh can be relaunched everyday in batch mode using crontab.
- Aumont, O. 2005. PISCES biogeochemical model description. Internal report, 36 pages
- Aumont, O., and L. Bopp, 2006 : Globalizing results from ocean in situ iron fertilization studies, Global Biogeochem. Cycles, 20, GB2017, doi: 10.1029/2005GB002591.
- Beckmann, A., Haidvogel, D.B., 1993. Numerical simulation of flow around a tall isolated seamount. Part I: Problem formulation and model accuracy. Journal of Physical Oceanography 23, 1736-1753.
- Blanke, B., Roy, C., Penven, P., Speich, S., McWilliams, J.C., Nelson, G., 2002. Linking wind and upwelling interannual variability in a regional model of the southern Benguela, Geophysical Research Letters 29, 2188-2191.
- Blayo, E., Debreu, L., 1999. Adaptive mesh refinement for finite-difference ocean models: First experiments. Journal of Physical Oceanography 29, 1239-1250.
- Blayo, E., Debreu, L., 1999. Adaptive mesh refinement for finite-difference ocean models: First experiments. Journal of Physical Oceanography 29, 1239-1250.
- Carton, J.A., Giese, B.S., Grodsky, S.A., 2005. Sea level rise and the warming of the oceans in the Simple Ocean Data Assimilation (SODA) ocean reanalysis. Journal of Geophysical Research 110, C09006, doi:10.1029/2004JC002817.
- Casey, K.S., Cornillon, P., 1999. A comparison of satellite and in situ based sea surface temperature climatologies. Journal of Climate 12, 1848-1863.
- Conkright, M.E., R.A. Locarnini, H.E. Garcia, T.D. O Brien, T.P. Boyer, C. Stephens, J.I. Antonov, 2002. World Ocean Atlas 2001: Objective Analyses, Data Statistics, and Figures, CD-ROM Documentation. National Oceanographic Data Center, Silver Spring, MD, 17 pp.
- Da Silva, A.M., Young, C.C., Levitus, S. 1994. Atlas of surface marine data 1994, Vol. 1, algorithms and procedures, NOAA Atlas NESDIS 6, U. S. Department of Commerce, NOAA, NESDIS, USA, 74 pp.
- Debreu, L., 2000. Raffinement adaptatif de maillage et méthodes de zoom – application aux modèles d’océan, 2000, Ph.D. thesis, Université Joseph Fourier, Grenoble.
- Debreu, L., Blayo, E., 2003. AGRIF: Adaptive Grid Refinement In Fortran. submitted to ACM Transactions on Mathematical Software – TOMS.
- Debreu, L., Vouland, C., 2003. AGRIF: Adaptive Grid Refinement In Fortran. [Available online http://www-lmc.imag.fr/IDOPT/AGRIF/index.html].
- Debreu, L., Blayo, E., 2008. Special Issue on Multi-Scale Modelling: Nested Grid and Unstructured Mesh Approaches. Ocean Dynamics 58, 415-428. doi 10.1007/s10236-008-0150-9
- Debreu, L., Marchesiello, P., Penven, P. 2010. Two ways embedding algorithms for a split-explicit free surface model. Ocean Modelling, submitted
- Di Lorenzo, E., Miller, A.J., Neilson, D.J., Cornuelle, B.D., Moisan, J.R., 2003. Modeling observed California Current mesoscale eddies and the ecosystem response . International Journal of Remote Sensing, in press.
- Egbert, G., Erofeeva, S., 2002. Efficient inverse modeling of barotropic ocean tides, Journal of Atmospheric and Oceanic Technology 19, 183-204.
- Fairall, C.W., E.F. Bradley, E.F., Rogers D.P., Edson J.B., Young G.S. 1996. Bulk parameterization of air-sea fluxes for topical ocean-global atmosphere Coupled-Ocean Atmosphere Response Experiment, JGR, 101, 3747-3764
- Flather, R.A., 1976. A tidal model of the northwest European continental shelf. Mémoires de la Société Royale des Sciences de Liège, 10, 141-164.
- Haidvogel, D.B., Arango, H.G., Hedstrom, K. , Beckmann, A., Malanotte-Rizzoli, P., Shchepetkin, A.F., 2000. Model Evaluation Experiments in the North Atlantic Basin: Simulations in Nonlinear Terrain-Following Coordinates. Dynamics of Atmospheres and Oceans 32 , 239-281.
- Haney, R.L., 1991. On the pressure force over steep topography in sigma coordinate ocean models. Journal of Physical Oceanography 21, 610-619.
- Hedstrom, K. S., 1997. SCRUM Manuel, Institute of Marine and Coastal Sciences, Rutgers University, USA
- Hedstroem, K. S., 2009. DRAFT Technical Manual for a Coupled Sea-Ice/Ocean Circulation Model (Version 3), U.S Department of the Interior, Mineral Management Service, Anchorage, Alaska, Arctic Region Supercomputing Center, University of Alaska Fairbanks, Contract M07PC13368
- Jackett, D.R., McDougall, T.J., 1995. Minimal Adjustment of Hydrostatic Profiles to Achieve Static Stability. Journal of Atmospheric and Oceanic Technology 12, 381-389.
- Large, W.G., McWilliams, J.C., Doney, S.C., 1994. Oceanic vertical mixing: a review and a model with a nonlocal boundary layer parameterization. Reviews in Geophysics 32, 363-403.
- MacCready, P. M., R. D. Hetland, W. R. Geyer, Long-Term Isohaline Salt Balance in an Estuary. Continental Shelf Research, 22, 1591-1601.
- Marchesiello, P., Debreu, L., Couvelard, X. 2009. Spurious diapycnal mixing in terrain-following coordinate models: The problem and a solution. Ocean Modelling 26, 156-169.
- Marchesiello, P., McWilliams, J.C., Shchepetkin, A., 2001. Open boundary condition for long-term integration of regional oceanic models. Ocean Modelling 3, 1-21.
- Marchesiello, P., McWilliams, J.C., Shchepetkin, A., 2003. Equilibrium structure and dynamics of the California Current System. Journal of Physical Oceanography 33, 753-783.
- Penven, P., Roy C., Lutjeharms, J.R.E., Colin de verdière, A., Johnson, A., Shillington, F., Fréon, P., Brundrit, G., 2001. A regional hydrodynamic model of the Southern Benguela. South African Journal of Science 97, 472-476.
- Penven, P., Debreu, L., Marchesiello, P., McWilliams, J.C., 2006. Application of the CROCO embedding procedure for the Central California Upwelling System. Ocean Modelling 12, 157-187.
- Penven, P., Marchesiello, P., Debreu, L., Lefèvre, J., 2007. Software tools for pre- and post-processing of oceanic regional simulations. Environmental Modelling and Software, in press.
- Reynolds, R.W., Smith, T.M., 1994. Improved global sea surface temperature analyses using optimum interpolation. Journal of Climate. 7, 929-948.
- Shchepetkin, A.F., McWilliams, J.C., 1998. Quasi-monotone advection schemes based on explicit locally adaptive dissipation. Monthly Weather Review 126, 1541-1580.
- Shchepetkin, A.F., McWilliams, J.C., 2005. Regional Ocean Model System: a split-explicit ocean model with a free-surface and topography-following vertical coordinate. Ocean Modelling 9, 347-404.
- Smith, W.H.F., Sandwell, D.T., 1997. Global seafloor topography from satellite altimetry and ship depth soundings. Science 277, 1957-1962.
- Stammer, D., Davis, R., Fu, L.L., Fukumori, I., Giering, R., Lee, T., Marotzke, J., Marshall, J., Menemenlis, D., Niiler, P.,
- Wunsch, C., Zlotnicki., V., 1999. The consortium for estimating the circulation and climate of the ocean (ECCO) – Science goals and task plan – Report N°1. Techical report, Jet Propulsion Laboratory – Massachusetts Institute of Technology – Scripps Institution of Oceanography.