Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nemo/nemo
  • sparonuz/nemo
  • hatfield/nemo
  • extdevs/nemo
4 results
Show changes
Showing
with 24 additions and 1414 deletions
../../../cfgs/SHARED/field_def_nemo-oce.xml
\ No newline at end of file
<?xml version="1.0"?>
<!--
============================================================================================================
= output files definition =
= Define your own files =
= put the variables you want... =
============================================================================================================
-->
<file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
<file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
<file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files -->
<file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files -->
<file_group id="3h" output_freq="3h" output_level="10" enabled=".TRUE."/> <!-- 3h files -->
<file_group id="4h" output_freq="4h" output_level="10" enabled=".TRUE."/> <!-- 4h files -->
<file_group id="6h" output_freq="6h" output_level="10" enabled=".TRUE."/> <!-- 6h files -->
<file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."/> <!-- 1d files -->
<file_group id="3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files -->
<file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files -->
<file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
<file id="file1" output_freq="1mo" name_suffix="_grid_T" description="ocean T grid variables" >
<field field_ref="toce" name="votemper" />
<field field_ref="soce" name="vosaline" />
<field field_ref="ssh" name="sossheig" />
<!-- variable for ice shelf -->
<field field_ref="fwfisf_cav" name="sowflisf" />
<field field_ref="isfgammat" name="sogammat" />
<field field_ref="isfgammas" name="sogammas" />
</file>
<file id="file2" output_freq="1mo" name_suffix="_grid_U" description="ocean U grid variables" >
<field field_ref="uoce" name="vozocrtx" />
</file>
<file id="file3" output_freq="1mo" name_suffix="_grid_V" description="ocean V grid variables" >
<field field_ref="voce" name="vomecrty" />
</file>
</file_group>
<file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
<file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
<file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
<file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
<file_group id="1y" output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
<file_group id="2y" output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
<file_group id="5y" output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
<file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
</file_definition>
../../../cfgs/SHARED/grid_def_nemo.xml
\ No newline at end of file
<?xml version="1.0"?>
<simulation>
<!-- ============================================================================================ -->
<!-- XIOS context -->
<!-- ============================================================================================ -->
<context id="xios" >
<variable_definition>
<variable id="info_level" type="int">10</variable>
<variable id="using_server" type="bool">false</variable>
<variable id="using_oasis" type="bool">false</variable>
<variable id="oasis_codes_id" type="string" >oceanx</variable>
</variable_definition>
</context>
<!-- ============================================================================================ -->
<!-- NEMO CONTEXT add and suppress the components you need -->
<!-- ============================================================================================ -->
<context id="nemo" src="./context_nemo.xml"/> <!-- NEMO -->
</simulation>
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! NEMO/OCE Configuration namelist : overwrite default values defined in SHARED/namelist_ref
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! ISOMIP configuration !!
!!======================================================================
!! *** Domain & Run management namelists *** !!
!! !!
!! namrun parameters of the run
!! namdom space and time domain
!! namcfg parameters of the configuration (default: user defined GYRE)
!! namwad Wetting and drying (default: OFF)
!! namtsd data: temperature & salinity (default: OFF)
!! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T)
!! namc1d 1D configuration options (ln_c1d =T)
!! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T)
!! namc1d_uvd 1D data (currents) (ln_c1d =T)
!!======================================================================
!
!-----------------------------------------------------------------------
&namrun ! parameters of the run
!-----------------------------------------------------------------------
cn_exp = "ISOMIP" ! experience name
nn_it000 = 1 ! first time step
nn_itend = 525600 ! last time step
nn_leapy = 0 ! Leap year calendar (1) or not (0)
ln_clobber = .true. ! clobber (overwrite) an existing file
nn_istate = 0 ! output the initial state (1) or not (0)
nn_stock = 99999999 ! frequency of creation of a restart file (modulo referenced to 1)
nn_write = 48 ! frequency of write in the output file (modulo referenced to nn_it000)
nn_istate = 0 ! output the initial state (1) or not (0)
/
!-----------------------------------------------------------------------
&namusr_def ! ISOMIP user defined namelist
!-----------------------------------------------------------------------
ln_zps = .true. ! z-partial-step coordinate
ln_zco = .false. ! z-full-step coordinate
ln_sco = .false. ! s-coordinate
rn_e1deg = 0.3 ! zonal grid-spacing (degrees)
rn_e2deg = 0.1 ! meridional grid-spacing (degrees)
rn_e3 = 30. ! vertical resolution
/
!-----------------------------------------------------------------------
&namdom ! time and space domain
!-----------------------------------------------------------------------
ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time
rn_Dt = 1800. ! time step for the dynamics (and tracer if nn_acc=0)
/
!-----------------------------------------------------------------------
&namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtile ! parameters of the tiling
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtsd ! Temperature & Salinity Data (init/dmp) (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namwad ! Wetting and Drying (WaD) (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namcrs ! coarsened grid (for outputs and/or TOP) (ln_crs =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d ! 1D configuration options (ln_c1d =T default: PAPA station)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF)
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Surface Boundary Condition namelists *** !!
!! !!
!! namsbc surface boundary condition manager (default: NO selection)
!! namsbc_flx flux formulation (ln_flx =T)
!! namsbc_blk Bulk formulae formulation (ln_blk =T)
!! namsbc_cpl CouPLed formulation ("key_oasis3" )
!! namsbc_sas Stand-Alone Surface module (SAS_SRC only)
!! namsbc_iif Ice-IF: use observed ice cover (nn_ice = 1 )
!! namtra_qsr penetrative solar radiation (ln_traqsr =T)
!! namsbc_ssr sea surface restoring term (for T and/or S) (ln_ssr =T)
!! namsbc_rnf river runoffs (ln_rnf =T)
!! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T)
!! namsbc_wave external fields from wave model (ln_wave =T)
!! namberg iceberg floats (ln_icebergs=T)
!!======================================================================
!
!-----------------------------------------------------------------------
&namsbc ! Surface Boundary Condition manager (default: NO selection)
!-----------------------------------------------------------------------
nn_fsbc = 1 ! frequency of SBC module call
! ! (control sea-ice & iceberg model call)
ln_usr = .true. ! user defined formulation (T => check usrdef_sbc)
/
!-----------------------------------------------------------------------
&namsbc_flx ! surface boundary condition : flux formulation (ln_flx =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_cpl ! coupled ocean/atmosphere model ("key_oasis3")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_sas ! Stand-Alone Surface module: ocean data (SAS_SRC only)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_iif ! Ice-IF : use observed ice cover (nn_ice = 1)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtra_qsr ! penetrative solar radiation (ln_traqsr =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_ssr ! surface boundary condition : sea surface restoring (ln_ssr =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_rnf ! runoffs (ln_rnf =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_apr ! Atmospheric pressure used as ocean forcing (ln_apr_dyn =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namisf ! Top boundary layer (ISF) (default: OFF)
!-----------------------------------------------------------------------
!
! ---------------- ice shelf load -------------------------------
!
!
! ---------------- ice shelf melt formulation -------------------------------
!
ln_isf = .true. ! activate ice shelf module
cn_isfdir = './' ! directory for all ice shelf input file
!
! ---------------- cavities opened -------------------------------
!
ln_isfcav_mlt = .true. ! ice shelf melting into the cavity (need ln_isfcav = .true. in domain_cfg.nc)
cn_isfcav_mlt = '2eq' ! ice shelf melting formulation (spe/2eq/3eq/oasis)
! ! spe = fwfisf is read from a forcing field
! ! 2eq = ISOMIP like: 2 equations formulation (Hunter et al., 2006)
! ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015)
! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf
! ! cn_isfcav_mlt = 2eq or 3eq cases:
cn_gammablk = 'spe' ! scheme to compute gammat/s (spe,ad15,hj99)
! ! ad15 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010)
! ! hj99 = velocity and stability dependent Gamma (Holland et al. 1999)
rn_gammat0 = 1.e-4 ! gammat coefficient used in blk formula
rn_gammas0 = 1.e-4 ! gammas coefficient used in blk formula
!
rn_htbl = 30. ! thickness of the top boundary layer (Losh et al. 2008)
! ! 0 => thickness of the tbl = thickness of the first wet cell
!
/
!-----------------------------------------------------------------------
&namsbc_wave ! External fields from wave model (ln_wave=T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namberg ! iceberg parameters (default: OFF)
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Lateral boundary condition *** !!
!! !!
!! namlbc lateral momentum boundary condition (default: NO selection)
!! namagrif agrif nested grid (read by child model only) ("key_agrif")
!! nam_tide Tidal forcing (default: OFF)
!! nambdy Unstructured open boundaries (default: OFF)
!! nambdy_dta Unstructured open boundaries - external data (see nambdy)
!! nambdy_tide tidal forcing at open boundaries (default: OFF)
!!======================================================================
!
!-----------------------------------------------------------------------
&namlbc ! lateral momentum boundary condition (default: NO selection)
!-----------------------------------------------------------------------
rn_shlat = 0. ! free slip
/
!-----------------------------------------------------------------------
&namagrif ! AGRIF zoom ("key_agrif")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_tide ! tide parameters (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy ! unstructured open boundaries (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy_dta ! open boundaries - external data (see nam_bdy)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy_tide ! tidal forcing at open boundaries (default: OFF)
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Top/Bottom boundary condition *** !!
!! !!
!! namdrg top/bottom drag coefficient (default: NO selection)
!! namdrg_top top friction (ln_drg_OFF=F & ln_isfcav=T)
!! namdrg_bot bottom friction (ln_drg_OFF=F)
!! nambbc bottom temperature boundary condition (default: OFF)
!! nambbl bottom boundary layer scheme (default: OFF)
!!======================================================================
!
!-----------------------------------------------------------------------
&namdrg ! top/bottom drag coefficient (default: NO selection)
!-----------------------------------------------------------------------
ln_drg_OFF = .false. ! free-slip : Cd = 0 (F => fill namdrg_bot
ln_lin = .false. ! linear drag: Cd = Cd0 Uc0 & namdrg_top)
ln_non_lin = .true. ! non-linear drag: Cd = Cd0 |U|
ln_loglayer = .false. ! logarithmic drag: Cd = vkarmn/log(z/z0) |U|
!
ln_drgimp = .false. ! implicit top/bottom friction flag
/
!-----------------------------------------------------------------------
&namdrg_top ! TOP friction (ln_drg_OFF =F & ln_isfcav=T)
!-----------------------------------------------------------------------
rn_Cd0 = 2.5e-3 ! drag coefficient [-]
rn_Uc0 = 0.16 ! ref. velocity [m/s] (linear drag=Cd0*Uc0)
rn_Cdmax = 0.1 ! drag value maximum [-] (logarithmic drag)
rn_ke0 = 0.0e-0 ! background kinetic energy [m2/s2] (non-linear cases)
rn_z0 = 3.0e-3 ! roughness [m] (ln_loglayer=T)
ln_boost = .false. ! =T regional boost of Cd0 ; =F constant
rn_boost = 50. ! local boost factor [-]
/
!-----------------------------------------------------------------------
&namdrg_bot ! BOTTOM friction (ln_drg_OFF =F)
!-----------------------------------------------------------------------
rn_Cd0 = 1.e-3 ! drag coefficient [-]
rn_Uc0 = 0.4 ! ref. velocity [m/s] (linear drag=Cd0*Uc0)
rn_Cdmax = 0.1 ! drag value maximum [-] (logarithmic drag)
rn_ke0 = 2.5e-3 ! background kinetic energy [m2/s2] (non-linear cases)
rn_z0 = 3.e-3 ! roughness [m] (ln_loglayer=T)
ln_boost = .false. ! =T regional boost of Cd0 ; =F constant
rn_boost = 50. ! local boost factor [-]
/
!-----------------------------------------------------------------------
&nambbc ! bottom temperature boundary condition (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambbl ! bottom boundary layer scheme (default: OFF)
!-----------------------------------------------------------------------
/
!!======================================================================
!! Tracer (T-S) namelists !!
!! !!
!! nameos equation of state (default: NO selection)
!! namtra_adv advection scheme (default: NO selection)
!! namtra_ldf lateral diffusion scheme (default: NO selection)
!! namtra_mle mixed layer eddy param. (Fox-Kemper param.) (default: OFF)
!! namtra_eiv eddy induced velocity param. (default: OFF)
!! namtra_dmp T & S newtonian damping (default: OFF)
!!======================================================================
!
!-----------------------------------------------------------------------
&nameos ! ocean Equation Of Seawater (default: NO selection)
!-----------------------------------------------------------------------
ln_eos80 = .true. ! = Use EOS80 equation of state
/
!-----------------------------------------------------------------------
&namtra_adv ! advection scheme for tracer (default: NO selection)
!-----------------------------------------------------------------------
ln_traadv_fct = .true. ! FCT scheme
nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order
nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order
/
!-----------------------------------------------------------------------
&namtra_ldf ! lateral diffusion scheme for tracers (default: NO selection)
!-----------------------------------------------------------------------
ln_traldf_lap = .true. ! laplacian operator
ln_traldf_hor = .true. ! horizontal (geopotential)
! ! Coefficients:
nn_aht_ijk_t = 0 ! = 0 constant = 1/2 Ud*Ld (lap case)
rn_Ud = 0.02 ! lateral diffusive velocity [m/s]
rn_Ld = 10.e+3 ! lateral diffusive length [m]
/
!-----------------------------------------------------------------------
&namtra_mle ! mixed layer eddy parametrisation (Fox-Kemper) (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtra_eiv ! eddy induced velocity param. (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtra_dmp ! tracer: T & S newtonian damping (default: OFF)
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Dynamics namelists *** !!
!! !!
!! nam_vvl vertical coordinate options (default: z-star)
!! namdyn_adv formulation of the momentum advection (default: NO selection)
!! namdyn_vor advection scheme (default: NO selection)
!! namdyn_hpg hydrostatic pressure gradient (default: NO selection)
!! namdyn_spg surface pressure gradient (default: NO selection)
!! namdyn_ldf lateral diffusion scheme (default: NO selection)
!! namdta_dyn offline TOP: dynamics read in files (OFF_SRC only)
!!======================================================================
!
!-----------------------------------------------------------------------
&nam_vvl ! vertical coordinate options (default: z-star)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdyn_adv ! formulation of the momentum advection (default: NO selection)
!-----------------------------------------------------------------------
ln_dynadv_vec = .true. ! vector form (T) or flux form (F)
nn_dynkeg = 0 ! scheme for grad(KE): =0 C2 ; =1 Hollingsworth correction
/
!-----------------------------------------------------------------------
&namdyn_vor ! Vorticity / Coriolis scheme (default: NO selection)
!-----------------------------------------------------------------------
ln_dynvor_ene = .true. ! energy conserving scheme
/
!-----------------------------------------------------------------------
&namdyn_hpg ! Hydrostatic pressure gradient option (default: NO selection)
!-----------------------------------------------------------------------
ln_hpg_isf = .true. ! s-coordinate adapted for isf (standard jacobian formulation)
/
!-----------------------------------------------------------------------
&namdyn_spg ! surface pressure gradient (default: NO selection)
!-----------------------------------------------------------------------
ln_dynspg_ts = .true. ! split-explicit free surface
/
!-----------------------------------------------------------------------
&namdyn_ldf ! lateral diffusion on momentum (default: NO selection)
!-----------------------------------------------------------------------
ln_dynldf_lap = .true. ! laplacian operator
ln_dynldf_lev = .true. ! iso-level
nn_ahm_ijk_t = 0 ! = 0 constant = 1/2 Uv*Lv (lap case)
rn_Uv = 0.12 ! lateral viscous velocity [m/s]
rn_Lv = 10.e+3 ! lateral viscous length [m]
/
!-----------------------------------------------------------------------
&namdta_dyn ! offline ocean input files (OFF_SRC only)
!-----------------------------------------------------------------------
/
!!======================================================================
!! vertical physics namelists !!
!! !!
!! namzdf vertical physics manager (default: NO selection)
!! namzdf_ric richardson number vertical mixing (ln_zdfric=T)
!! namzdf_tke TKE vertical mixing (ln_zdftke=T)
!! namzdf_gls GLS vertical mixing (ln_zdfgls=T)
!! namzdf_osm OSM vertical diffusion (ln_zdfosm=T)
!! namzdf_iwm tidal mixing parameterization (ln_zdfiwm=T)
!!======================================================================
!
!-----------------------------------------------------------------------
&namzdf ! vertical physics manager (default: NO selection)
!-----------------------------------------------------------------------
! ! type of vertical closure (required)
ln_zdfcst = .true. ! constant mixing
!
! ! convection
ln_zdfevd = .true. ! enhanced vertical diffusion
rn_evd = 0.1 ! mixing coefficient [m2/s]
!
! ! coefficients
rn_avm0 = 1.e-3 ! vertical eddy viscosity [m2/s] (background Kz if ln_zdfcst)
rn_avt0 = 5.e-5 ! vertical eddy diffusivity [m2/s] (background Kz if ln_zdfcst)
/
!-----------------------------------------------------------------------
&namzdf_ric ! richardson number dependent vertical diffusion (ln_zdfric =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_tke ! turbulent eddy kinetic dependent vertical diffusion (ln_zdftke =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_gls ! GLS vertical diffusion (ln_zdfgls =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_osm ! OSM vertical diffusion (ln_zdfosm =T)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_iwm ! internal wave-driven mixing parameterization (ln_zdfiwm =T)
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Diagnostics namelists *** !!
!! !!
!! namtrd dynamics and/or tracer trends (default: OFF)
!! namhsb Heat and salt budgets (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namflo float parameters (default: OFF)
!! nam_diadct transports through some sections (default: OFF)
!! nam_dia25h 25h Mean Output (default: OFF)
!! namnc4 netcdf4 chunking and compression settings ("key_netcdf4")
!!======================================================================
!
!-----------------------------------------------------------------------
&namtrd ! trend diagnostics (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namhsb ! Heat and salt budgets (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdiu ! Cool skin and warm layer models (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namflo ! float parameters ("key_float")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_diaharm ! Harmonic analysis of tidal constituents ("key_diaharm")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdct ! transports through some sections ("key_diadct")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_diatmb ! Top Middle Bottom Output (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_dia25h ! 25h Mean Output (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namnc4 ! netcdf4 chunking and compression settings ("key_netcdf4")
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Observation & Assimilation *** !!
!! !!
!! namobs observation and model comparison (default: OFF)
!! nam_asminc assimilation increments ('key_asminc')
!!======================================================================
!
!-----------------------------------------------------------------------
&namobs ! observation usage switch (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_asminc ! assimilation increments ('key_asminc')
!-----------------------------------------------------------------------
/
!!======================================================================
!! *** Miscellaneous namelists *** !!
!! !!
!! nammpp Massively Parallel Processing
!! namctl Control prints (default: OFF)
!! namsto Stochastic parametrization of EOS (default: OFF)
!!======================================================================
!
!-----------------------------------------------------------------------
&nammpp ! Massively Parallel Processing
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namctl ! Control prints (default: OFF)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsto ! Stochastic parametrization of EOS (default: OFF)
!-----------------------------------------------------------------------
/
../../../cfgs/SHARED/namelist_ref
\ No newline at end of file
from netCDF4 import Dataset
import numpy as np
from numpy import ma
import argparse
import matplotlib.pyplot as plt
import matplotlib
parser = argparse.ArgumentParser()
parser.add_argument("-f" , metavar='file_name' , help="names of input files" , type=str , nargs="+", required=True )
parser.add_argument("-v" , metavar='var_name' , help="variable list" , type=str , nargs=1 , required=True )
args = parser.parse_args()
# read mesh_mask
ncid = Dataset('mesh_mask.nc')
lat2d = ncid.variables['gphit' ][ :,:].squeeze()
lon2d = ncid.variables['glamt' ][ :,:].squeeze()
msk = ncid.variables['tmaskutil'][0,:,:].squeeze()
ncid.close()
plt.figure(figsize=np.array([210,210]) / 25.4)
# read psi.nc
ncid = Dataset(args.f[0])
var2d = ncid.variables[args.v[0]][-1,:,:].squeeze()
var2dm = ma.masked_where(msk==0.0,var2d)
# convert in m/y
var2dm = var2dm * 86400 * 365 / 1e3
ncid.close()
# define colorbar
vlevel=np.arange(-1.6,1.8,0.2)
pcol = plt.contourf(lon2d,lat2d,var2dm,levels=vlevel,extend='both')
vlevel=np.arange(-1.6,1.8,0.4)
matplotlib.rcParams['contour.negative_linestyle'] = 'solid'
plt.contour(lon2d,lat2d,var2dm,levels=vlevel,colors='k')
plt.grid()
plt.title('melt rate ISOMIP (m/y)')
plt.ylabel('Latitude',fontsize=14)
plt.xlabel('Longitude',fontsize=14)
cbar = plt.colorbar(pcol, ticks=vlevel)
cbar.ax.tick_params(labelsize=14)
# save figure
plt.savefig('mlt.png', format='png', dpi=300)
plt.show()
from netCDF4 import Dataset
import numpy as np
import argparse
import matplotlib.pyplot as plt
# read argument
parser = argparse.ArgumentParser()
parser.add_argument("-f" , metavar='file_name' , help="names of input files" , type=str , nargs=1 , required=True )
parser.add_argument("-v" , metavar='var_name' , help="variable list" , type=str , nargs=1 , required=True )
args = parser.parse_args()
# read mesh mask
ncid = Dataset('mesh_mask.nc')
vx2d = ncid.variables['gphit' ][0,:,0].squeeze()
vx2dv = ncid.variables['gphiv' ][0,:,0].squeeze()
y2d = ncid.variables['gdepw_0'][0,:,:,1].squeeze()*-1
y2dt = ncid.variables['gdept_0'][0,:,:,1].squeeze()*-1
msk = ncid.variables['tmask' ][0,:,:,1].squeeze()
ncid.close()
# build x 2d array
x2d=y2d*0.0
x2dv=y2d*0.0
for jk in range(0,y2d.shape[0]):
x2d[jk,:]=vx2d[:]
x2dv[jk,:]=vx2d[:]
plt.figure(figsize=np.array([210,210]) / 25.4)
# read data and mask it
ncid = Dataset(args.f[0])
var2d = ncid.variables[args.v[0]][-1,:,:,:].squeeze()
var2dm = var2d[:,:]
var2dm[msk==0] = -1
ncid.close()
# define colorbar
vlevel=np.arange(0,0.13,0.01)
pcol = plt.contourf(x2d,y2d,var2dm,levels=vlevel)
plt.clf()
# plot contour
ax = plt.subplot(1, 1, 1)
ax.contour(x2dv,y2dt,var2dm,levels=vlevel)
ax.grid()
ax.set_title('MOC ISOMIP (Sv)')
ax.set_ylabel('Depth (m)',fontsize=14)
ax.set_xlabel('Latitude',fontsize=14)
# plot colorbar
plt.subplots_adjust(left=0.1,right=0.89, bottom=0.1, top=0.89, wspace=0.1, hspace=0.1)
cax = plt.axes([0.91, 0.1, 0.02, 0.79])
cbar= plt.colorbar(pcol, ticks=vlevel, cax=cax)
cbar.ax.tick_params(labelsize=14)
# save figure
plt.savefig('moc.png', format='png', dpi=300)
plt.show()
from netCDF4 import Dataset
import numpy as np
from numpy import ma
import argparse
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser()
parser.add_argument("-f" , metavar='file_name' , help="names of input files" , type=str , nargs="+", required=True )
parser.add_argument("-v" , metavar='var_name' , help="variable list" , type=str , nargs=1 , required=True )
args = parser.parse_args()
# read mesh_mask
ncid = Dataset('mesh_mask.nc')
lat2d = ncid.variables['gphit' ][ :,:].squeeze()
lon2d = ncid.variables['glamt' ][ :,:].squeeze()
msk = ncid.variables['tmaskutil'][0,:,:].squeeze()
ncid.close()
plt.figure(figsize=np.array([210,210]) / 25.4)
# read psi.nc
ncid = Dataset(args.f[0])
var2d = ncid.variables[args.v[0]][-1,:,:].squeeze()
var2dm = ma.masked_where(msk==0.0,var2d)
# convert in Sv
var2dm = var2dm / 1e6
ncid.close()
# define colorbar
vlevel=np.arange(0.00,0.36,0.02)
pcol = plt.contourf(lon2d,lat2d,var2dm,levels=vlevel)
plt.clf()
# plot contour
ax = plt.subplot(1, 1, 1)
ax.contour(lon2d,lat2d,var2dm,levels=vlevel)
ax.grid()
ax.set_title('PSI ISOMIP (Sv)')
ax.set_ylabel('Latitude',fontsize=14)
ax.set_xlabel('Longitude',fontsize=14)
# plot colorbar
plt.subplots_adjust(left=0.1,right=0.89, bottom=0.1, top=0.89, wspace=0.1, hspace=0.1)
cax = plt.axes([0.91, 0.1, 0.02, 0.79])
cbar= plt.colorbar(pcol, ticks=vlevel, cax=cax)
cbar.ax.tick_params(labelsize=14)
# save figure
plt.savefig('psi.png', format='png', dpi=300)
plt.show()
MODULE usrdef_hgr
!!======================================================================
!! *** MODULE usrdef_hgr ***
!!
!! === LOCK_EXCHANGE configuration ===
!!
!! User defined : mesh and Coriolis parameter of a user configuration
!!======================================================================
!! History : NEMO ! 2016-08 (S. Flavoni, G. Madec) Original code
!! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_hgr : initialize the horizontal mesh for ISOMIP configuration
!!----------------------------------------------------------------------
USE dom_oce
USE par_oce ! ocean space and time domain
USE phycst ! physical constants
USE usrdef_nam, ONLY: rn_e1deg, rn_e2deg ! horizontal resolution in meters
!
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
IMPLICIT NONE
PRIVATE
PUBLIC usr_def_hgr ! called by domhgr.F90
!! * Substitutions
# include "do_loop_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_hgr.F90 14223 2020-12-19 10:22:45Z smasson $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usr_def_hgr( plamt , plamu , plamv , plamf , & ! geographic position (required)
& pphit , pphiu , pphiv , pphif , & !
& kff , pff_f , pff_t , & ! Coriolis parameter (if domain not on the sphere)
& pe1t , pe1u , pe1v , pe1f , & ! scale factors (required)
& pe2t , pe2u , pe2v , pe2f , & !
& ke1e2u_v , pe1e2u , pe1e2v ) ! u- & v-surfaces (if gridsize reduction is used in strait(s))
!!----------------------------------------------------------------------
!! *** ROUTINE usr_def_hgr ***
!!
!! ** Purpose : user defined mesh and Coriolis parameter
!!
!! ** Method : set all intent(out) argument to a proper value
!! ISOMIP configuration
!!
!! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees)
!! - define i- & j-scale factors at t-, u-, v- and f-points (in meters)
!! - define u- & v-surfaces (in m2)
!!----------------------------------------------------------------------
REAL(wp), DIMENSION(:,:), INTENT(out) :: plamt, plamu, plamv, plamf ! longitude outputs [degrees]
REAL(wp), DIMENSION(:,:), INTENT(out) :: pphit, pphiu, pphiv, pphif ! latitude outputs [degrees]
INTEGER , INTENT(out) :: kff ! =1 Coriolis parameter computed here, =0 otherwise
REAL(wp), DIMENSION(:,:), INTENT(out) :: pff_f, pff_t ! Coriolis factor at f-point [1/s]
REAL(wp), DIMENSION(:,:), INTENT(out) :: pe1t, pe1u, pe1v, pe1f ! i-scale factors [m]
REAL(wp), DIMENSION(:,:), INTENT(out) :: pe2t, pe2u, pe2v, pe2f ! j-scale factors [m]
INTEGER , INTENT(out) :: ke1e2u_v ! =1 u- & v-surfaces computed here, =0 otherwise
REAL(wp), DIMENSION(:,:), INTENT(out) :: pe1e2u, pe1e2v ! u- & v-surfaces (if reduction in strait) [m2]
!
INTEGER :: ji, jj ! dummy loop indices
REAL(wp) :: zfact, zti, zui, zvi, zfi, ztj, zuj, zvj, zfj ! local scalars
!!-------------------------------------------------------------------------------
!
IF(lwp) THEN
WRITE(numout,*)
WRITE(numout,*) 'usr_def_hgr : ISOMIP configuration'
WRITE(numout,*) '~~~~~~~~~~~'
WRITE(numout,*)
WRITE(numout,*) ' ===>> geographical mesh on the sphere with regular grid-spacing'
WRITE(numout,*) ' given by rn_e1deg and rn_e2deg'
ENDIF
!
! !== grid point position ==! (in degrees)
DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
! ! longitude (west coast at lon=0°)
plamt(ji,jj) = rn_e1deg * ( - 0.5 + REAL( mig0(ji)-1 , wp ) )
plamu(ji,jj) = rn_e1deg * ( REAL( mig0(ji)-1 , wp ) )
plamv(ji,jj) = plamt(ji,jj)
plamf(ji,jj) = plamu(ji,jj)
! ! latitude (south coast at lat=-80°)
pphit(ji,jj) = rn_e2deg * ( - 0.5 + REAL( mjg0(jj)-1 , wp ) ) - 80._wp
pphiu(ji,jj) = pphit(ji,jj)
pphiv(ji,jj) = rn_e2deg * ( REAL( mjg0(jj)-1 , wp ) ) - 80._wp
pphif(ji,jj) = pphiv(ji,jj)
END_2D
!
! !== Horizontal scale factors ==! (in meters)
DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
! ! e1 (zonal)
pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg
pe1u(ji,jj) = ra * rad * COS( rad * pphiu(ji,jj) ) * rn_e1deg
pe1v(ji,jj) = ra * rad * COS( rad * pphiv(ji,jj) ) * rn_e1deg
pe1f(ji,jj) = ra * rad * COS( rad * pphif(ji,jj) ) * rn_e1deg
! ! e2 (meridional)
pe2t(ji,jj) = ra * rad * rn_e2deg
pe2u(ji,jj) = ra * rad * rn_e2deg
pe2v(ji,jj) = ra * rad * rn_e2deg
pe2f(ji,jj) = ra * rad * rn_e2deg
END_2D
! ! NO reduction of grid size in some straits
ke1e2u_v = 0 ! ==>> u_ & v_surfaces will be computed in dom_ghr routine
pe1e2u(:,:) = 0._wp ! CAUTION: set to zero to avoid error with some compilers that
pe1e2v(:,:) = 0._wp ! require an initialization of INTENT(out) arguments
!
!
! !== Coriolis parameter ==!
kff = 0 ! Coriolis parameter calculated on the sphere
pff_f(:,:) = 0._wp ! CAUTION: set to zero to avoid error with some compilers that
pff_t(:,:) = 0._wp ! require an initialization of INTENT(out) arguments
!
END SUBROUTINE usr_def_hgr
!!======================================================================
END MODULE usrdef_hgr
MODULE usrdef_istate
!!======================================================================
!! *** MODULE usrdef_istate ***
!!
!! === ISOMIP configuration ===
!!
!! User defined : set the initial state of a user configuration
!!======================================================================
!! History : NEMO ! 2016-11 (S. Flavoni) Original code
!! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case
!! ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_istate : initial state in Temperature and salinity
!!----------------------------------------------------------------------
USE par_oce ! ocean space and time domain
USE dom_oce , ONLY : glamt
USE phycst ! physical constants
!
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
IMPLICIT NONE
PRIVATE
PUBLIC usr_def_istate ! called by istate.F90
PUBLIC usr_def_istate_ssh ! called by domqco.F90
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_istate.F90 14053 2020-12-03 13:48:38Z techene $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv )
!!----------------------------------------------------------------------
!! *** ROUTINE usr_def_istate ***
!!
!! ** Purpose : Initialization of the dynamics and tracers
!! Here ISOMIP configuration
!!
!! ** Method : - set temperature field
!! - set salinity field
!!----------------------------------------------------------------------
REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pdept ! depth of t-point [m]
REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m]
REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pts ! T & S fields [Celsius ; g/kg]
REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pu ! i-component of the velocity [m/s]
REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pv ! j-component of the velocity [m/s]
!!----------------------------------------------------------------------
!
IF(lwp) WRITE(numout,*)
IF(lwp) WRITE(numout,*) 'usr_def_istate : ISOMIP configuration, analytical definition of initial state'
IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ Ocean at rest, with a constant salinity and temperature. '
pu (:,:,:) = 0._wp ! ocean at rest
pv (:,:,:) = 0._wp
! ! T & S profiles
pts(:,:,:,jp_tem) = - 1.9 * ptmask(:,:,:) ! ISOMIP configuration : start from constant T+S fields
pts(:,:,:,jp_sal) = 34.4 * ptmask(:,:,:)
!
END SUBROUTINE usr_def_istate
SUBROUTINE usr_def_istate_ssh( ptmask, pssh )
!!----------------------------------------------------------------------
!! *** ROUTINE usr_def_istate_ssh ***
!!
!! ** Purpose : Initialization of ssh
!! Here ISOMIP configuration
!!
!! ** Method : set ssh to 0
!!----------------------------------------------------------------------
REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m]
REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height [m]
!!----------------------------------------------------------------------
!
IF(lwp) WRITE(numout,*)
IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : ISOMIP configuration, analytical definition of initial state'
!
pssh(:,:) = 0._wp
!
END SUBROUTINE usr_def_istate_ssh
!!======================================================================
END MODULE usrdef_istate
MODULE usrdef_nam
!!======================================================================
!! *** MODULE usrdef_nam ***
!!
!! === ISOMIP configuration ===
!!
!! User defined : set the domain characteristics of a user configuration
!!======================================================================
!! History : NEMO ! 2016-03 (S. Flavoni, G. Madec) Original code
!! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_nam : read user defined namelist and set global domain size
!! usr_def_hgr : initialize the horizontal mesh
!!----------------------------------------------------------------------
USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate
USE par_oce ! ocean space and time domain
USE phycst ! physical constants
!
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
USE timing ! Timing
IMPLICIT NONE
PRIVATE
PUBLIC usr_def_nam ! called by nemogcm.F90
! !!* namusr_def namelist *!!
REAL(wp), PUBLIC :: rn_e1deg, rn_e2deg !: horizontal resolution [degrees]
REAL(wp), PUBLIC :: rn_e3 !: vertical resolution [m]
REAL(wp), PARAMETER, PUBLIC :: rbathy = 900._wp !: depth of the seafloor [m]
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_nam.F90 14433 2021-02-11 08:06:49Z smasson $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
!!----------------------------------------------------------------------
!! *** ROUTINE dom_nam ***
!!
!! ** Purpose : read user defined namelist and define the domain size
!!
!! ** Method : read in namusr_def containing all the user specific namelist parameter
!!
!! Here ISOMIP configuration
!!
!! ** input : - namusr_def namelist found in namelist_cfg
!!----------------------------------------------------------------------
CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name
INTEGER , INTENT(out) :: kk_cfg ! configuration resolution
INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes
LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity
LOGICAL , INTENT(out) :: ldNFold ! North pole folding
CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F
!
INTEGER :: ios ! Local integer
!!
NAMELIST/namusr_def/ ln_zco, ln_zps, ln_sco, rn_e1deg, rn_e2deg, rn_e3
!!----------------------------------------------------------------------
!
READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
!
IF(lwm) WRITE( numond, namusr_def )
!
cd_cfg = 'ISOMIP' ! name & resolution (not used)
kk_cfg = INT( rn_e3 )
!
! Global Domain size: ISOMIP domain is 15° x 10° x 900 m
kpi = INT( 15.0 / rn_e1deg ) + 2 ! add 2 for t-point in the east & west coasts
kpj = INT( 10.0 / rn_e2deg ) + 2 ! - - north & south -
kpk = INT( rbathy / rn_e3 ) + 1 ! add 1 for t-point in the seafloor
!
! ! Set the lateral boundary condition of the global domain
ldIperio = .FALSE. ; ldJperio = .FALSE. ! ISOMIP configuration : closed domain
ldNFold = .FALSE. ; cdNFtype = '-'
!
! ! control print
IF(lwp) THEN
WRITE(numout,*) ' '
WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg'
WRITE(numout,*) '~~~~~~~~~~~ '
WRITE(numout,*) ' Namelist namusr_def : ISOMIP test case'
WRITE(numout,*) ' type of vertical coordinate : '
WRITE(numout,*) ' z-coordinate flag ln_zco = ', ln_zco
WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps
WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco
WRITE(numout,*) ' resolution'
WRITE(numout,*) ' zonal resolution rn_e1deg = ', rn_e1deg, ' degrees'
WRITE(numout,*) ' meridional resolution rn_e1deg = ', rn_e1deg, ' degrees'
WRITE(numout,*) ' vertical resolution rn_e3 = ', rn_e3 , ' meters'
WRITE(numout,*) ' ISOMIP domain = 15° x 10° x 900 m'
WRITE(numout,*) ' resulting global domain size : Ni0glo = ', kpi
WRITE(numout,*) ' Nj0glo = ', kpj
WRITE(numout,*) ' jpkglo = ', kpk
WRITE(numout,*) ' '
ENDIF
!
END SUBROUTINE usr_def_nam
!!======================================================================
END MODULE usrdef_nam
MODULE usrdef_sbc
!!======================================================================
!! *** MODULE usrdef_sbc ***
!!
!! === ISOMIP configuration ===
!!
!! User defined : surface forcing of a user configuration
!!======================================================================
!! History : 4.0 ! 2016-03 (S. Flavoni, G. Madec) user defined interface
!! ! 2017-02 (P. Mathiot, S. Flavoni) adapt code to ISOMIP case
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_sbc : user defined surface bounday conditions in ISOMIP case
!!----------------------------------------------------------------------
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE sbc_oce ! Surface boundary condition: ocean fields
USE sbc_ice ! Surface boundary condition: ice fields
USE phycst ! physical constants
!
USE in_out_manager ! I/O manager
USE lib_mpp ! distribued memory computing library
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
IMPLICIT NONE
PRIVATE
PUBLIC usrdef_sbc_oce ! routine called in sbcmod module
PUBLIC usrdef_sbc_ice_tau ! routine called by icestp.F90 for ice dynamics
PUBLIC usrdef_sbc_ice_flx ! routine called by icestp.F90 for ice thermo
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_sbc.F90 12377 2020-02-12 14:39:06Z acc $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usrdef_sbc_oce( kt, Kbb )
!!---------------------------------------------------------------------
!! *** ROUTINE usr_def_sbc ***
!!
!! ** Purpose : provide at each time-step the surface boundary
!! condition, i.e. the momentum, heat and freshwater fluxes.
!!
!! ** Method : all 0 fields, for ISOMIP case
!! CAUTION : never mask the surface stress field !
!!
!! ** Action : - set to ZERO all the ocean surface boundary condition, i.e.
!! utau, vtau, taum, wndm, qns, qsr, emp, sfx
!!
!!----------------------------------------------------------------------
INTEGER, INTENT(in) :: kt ! ocean time step
INTEGER, INTENT(in) :: Kbb ! ocean time index
!!---------------------------------------------------------------------
!
IF( kt == nit000 ) THEN
!
IF(lwp) WRITE(numout,*)' usr_sbc : ISOMIP case: NO surface forcing'
IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~ utau = vtau = taum = wndm = qns = qsr = emp = sfx = 0'
!
utau(:,:) = 0._wp
vtau(:,:) = 0._wp
taum(:,:) = 0._wp
wndm(:,:) = 0._wp
!
emp (:,:) = 0._wp
sfx (:,:) = 0._wp
qns (:,:) = 0._wp
qsr (:,:) = 0._wp
!
ENDIF
!
END SUBROUTINE usrdef_sbc_oce
SUBROUTINE usrdef_sbc_ice_tau( kt )
INTEGER, INTENT(in) :: kt ! ocean time step
END SUBROUTINE usrdef_sbc_ice_tau
SUBROUTINE usrdef_sbc_ice_flx( kt, phs, phi )
INTEGER, INTENT(in) :: kt ! ocean time step
REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phs ! snow thickness
REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phi ! ice thickness
END SUBROUTINE usrdef_sbc_ice_flx
!!======================================================================
END MODULE usrdef_sbc
MODULE usrdef_zgr
!!======================================================================
!! *** MODULE usrdef_zgr ***
!!
!! === ISOMIP case ===
!!
!! user defined : vertical coordinate system of a user configuration
!!======================================================================
!! History : 4.0 ! 2016-08 (G. Madec, S. Flavoni) Original code
!! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_zgr : user defined vertical coordinate system (required)
!! zgr_z1d : reference 1D z-coordinate
!!---------------------------------------------------------------------
USE oce ! ocean variables
USE dom_oce , ONLY: mj0 , mj1 ! ocean space and time domain
USE dom_oce , ONLY: glamt , gphit ! ocean space and time domain
USE usrdef_nam ! User defined : namelist variables
!
USE in_out_manager ! I/O manager
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE lib_mpp ! distributed memory computing library
USE timing ! Timing
IMPLICIT NONE
PRIVATE
PUBLIC usr_def_zgr ! called by domzgr.F90
!! * Substitutions
# include "do_loop_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_zgr.F90 13295 2020-07-10 18:24:21Z acc $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usr_def_zgr( ld_zco , ld_zps , ld_sco , ld_isfcav, & ! type of vertical coordinate
& pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d , & ! 1D reference vertical coordinate
& pdept , pdepw , & ! 3D t & w-points depth
& pe3t , pe3u , pe3v , pe3f , & ! vertical scale factors
& pe3w , pe3uw , pe3vw, & ! - - -
& k_top , k_bot ) ! top & bottom ocean level
!!---------------------------------------------------------------------
!! *** ROUTINE usr_def_zgr ***
!!
!! ** Purpose : User defined the vertical coordinates
!!
!!----------------------------------------------------------------------
LOGICAL , INTENT(in ) :: ld_zco, ld_zps, ld_sco ! vertical coordinate flags ( read in namusr_def )
LOGICAL , INTENT( out) :: ld_isfcav ! under iceshelf cavity flag
REAL(wp), DIMENSION(:) , INTENT( out) :: pdept_1d, pdepw_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:) , INTENT( out) :: pe3t_1d , pe3w_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), INTENT( out) :: pdept, pdepw ! grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), INTENT( out) :: pe3t , pe3u , pe3v , pe3f ! vertical scale factors [m]
REAL(wp), DIMENSION(:,:,:), INTENT( out) :: pe3w , pe3uw, pe3vw ! i-scale factors
INTEGER , DIMENSION(:,:) , INTENT( out) :: k_top, k_bot ! first & last ocean level
!
INTEGER :: ji , jj, jk ! dummy indices
INTEGER :: ij0, ij1 ! dummy indices
INTEGER :: ik ! local integers
REAL(wp) :: zfact, z1_jpkm1 ! local scalar
REAL(wp) :: ze3min, zdepth ! local scalar
REAL(wp), DIMENSION(jpi,jpj) :: zht , zhu ! bottom depth
REAL(wp), DIMENSION(jpi,jpj) :: zhisf, zhisfu ! top depth
!!----------------------------------------------------------------------
!
IF(lwp) WRITE(numout,*)
IF(lwp) WRITE(numout,*) 'usr_def_zgr : ISOMIP configuration (z(ps)- or s-coordinate closed box ocean without cavities)'
IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
!
!
! type of vertical coordinate
! ---------------------------
! set in usrdef_nam.F90 by reading the namusr_def namelist except for ISF
ld_isfcav = .TRUE. ! ISF Ice Shelves Flag
!
!
! Build the vertical coordinate system
! ------------------------------------
!
! !== isfdraft ==!
!
zht (:,:) = rbathy
zhisf(:,:) = 200._wp
ij0 = 1 ; ij1 = 40+nn_hls
DO jj = mj0(ij0), mj1(ij1)
zhisf(:,jj)=700.0_wp-(gphit(:,jj)+80.0_wp)*125.0_wp
END DO
!
CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d ) ! Reference z-coordinate system
!
! !== top masked level bathymetry ==! (all coordinates)
!
IF ( ld_zps ) THEN !== zps-coordinate ==! (partial bottom-steps)
!
ze3min = 0.1_wp * rn_e3
IF(lwp) WRITE(numout,*) ' minimum thickness of the partial cells = 10 % of e3 = ', ze3min
!
! !* bottom ocean compute from the depth of grid-points
k_bot(:,:) = jpkm1
DO jk = jpkm1, 1, -1
WHERE( zht(:,:) < pdepw_1d(jk) + ze3min ) k_bot(:,:) = jk-1
END DO
! !* top ocean compute from the depth of grid-points
k_top(:,:) = 1 !
DO jk = 2, jpkm1
zdepth = pdepw_1d(jk+1) - ze3min
WHERE( zhisf(:,:) > 0.0 .AND. zhisf(:,:) >= zdepth ) k_top(:,:) = (jk + 1)
END DO
!
! !* vertical coordinate system
DO jk = 1, jpk ! initialization to the reference z-coordinate
pdept(:,:,jk) = pdept_1d(jk)
pdepw(:,:,jk) = pdepw_1d(jk)
pe3t (:,:,jk) = pe3t_1d (jk)
pe3u (:,:,jk) = pe3t_1d (jk)
pe3v (:,:,jk) = pe3t_1d (jk)
pe3f (:,:,jk) = pe3t_1d (jk)
pe3w (:,:,jk) = pe3w_1d (jk)
pe3uw(:,:,jk) = pe3w_1d (jk)
pe3vw(:,:,jk) = pe3w_1d (jk)
END DO
! top scale factors and depth at T- and W-points
DO_2D( 1, 1, 1, 1 )
ik = k_top(ji,jj)
IF ( ik > 2 ) THEN
! pdeptw at the interface
pdepw(ji,jj,ik ) = MAX( zhisf(ji,jj) , pdepw(ji,jj,ik) )
! e3t in both side of the interface
pe3t (ji,jj,ik ) = pdepw(ji,jj,ik+1) - pdepw(ji,jj,ik)
! pdept in both side of the interface (from previous e3t)
pdept(ji,jj,ik ) = pdepw(ji,jj,ik ) + pe3t (ji,jj,ik ) * 0.5_wp
pdept(ji,jj,ik-1) = pdepw(ji,jj,ik ) - pe3t (ji,jj,ik ) * 0.5_wp
! pe3w on both side of the interface
pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik )
pe3w (ji,jj,ik ) = pdept(ji,jj,ik ) - pdept(ji,jj,ik-1)
! e3t into the ice shelf
pe3t (ji,jj,ik-1) = pdepw(ji,jj,ik ) - pdepw(ji,jj,ik-1)
pe3w (ji,jj,ik-1) = pdept(ji,jj,ik-1) - pdept(ji,jj,ik-2)
END IF
END_2D
! bottom scale factors and depth at T- and W-points
DO_2D( 1, 1, 1, 1 )
ik = k_bot(ji,jj)
pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
pe3t (ji,jj,ik ) = pdepw(ji,jj,ik+1) - pdepw(ji,jj,ik)
pe3t (ji,jj,ik+1) = pe3t (ji,jj,ik )
!
pdept(ji,jj,ik ) = pdepw(ji,jj,ik ) + pe3t (ji,jj,ik ) * 0.5_wp
pdept(ji,jj,ik+1) = pdepw(ji,jj,ik+1) + pe3t (ji,jj,ik+1) * 0.5_wp
pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik)
END_2D
! ! bottom scale factors and depth at U-, V-, UW and VW-points
pe3u (:,:,:) = pe3t(:,:,:)
pe3uw(:,:,:) = pe3w(:,:,:)
DO_3D( 0, 0, 0, 0, 1, jpk )
! ! Computed as the minimum of neighbooring scale factors
pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) )
pe3vw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji,jj+1,jk) )
pe3f (ji,jj,jk) = pe3v(ji,jj,jk)
END_3D
CALL lbc_lnk( 'usrdef_zgr', pe3v , 'V', 1._wp ) ; CALL lbc_lnk( 'usrdef_zgr', pe3vw, 'V', 1._wp )
CALL lbc_lnk( 'usrdef_zgr', pe3f , 'F', 1._wp )
DO jk = 1, jpk
! set to z-scale factor if zero (i.e. along closed boundaries) because of lbclnk
WHERE( pe3u (:,:,jk) == 0._wp ) pe3u (:,:,jk) = pe3t_1d(jk)
WHERE( pe3v (:,:,jk) == 0._wp ) pe3v (:,:,jk) = pe3t_1d(jk)
WHERE( pe3f (:,:,jk) == 0._wp ) pe3f (:,:,jk) = pe3t_1d(jk)
WHERE( pe3uw(:,:,jk) == 0._wp ) pe3uw(:,:,jk) = pe3w_1d(jk)
WHERE( pe3vw(:,:,jk) == 0._wp ) pe3vw(:,:,jk) = pe3w_1d(jk)
END DO
!
ENDIF
!
END SUBROUTINE usr_def_zgr
SUBROUTINE zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d ) ! 1D reference vertical coordinate
!!----------------------------------------------------------------------
!! *** ROUTINE zgr_z1d ***
!!
!! ** Purpose : set the depth of model levels and the resulting
!! vertical scale factors.
!!
!! ** Method : 1D z-coordinate system (use in all type of coordinate)
!! The depth of model levels is set from dep(k), an analytical function:
!! w-level: depw_1d = dep(k)
!! t-level: dept_1d = dep(k+0.5)
!! The scale factors are the discrete derivative of the depth:
!! e3w_1d(jk) = dk[ dept_1d ]
!! e3t_1d(jk) = dk[ depw_1d ]
!!
!! === Here constant vertical resolution ===
!!
!! ** Action : - pdept_1d, pdepw_1d : depth of T- and W-point (m)
!! - pe3t_1d , pe3w_1d : scale factors at T- and W-levels (m)
!!----------------------------------------------------------------------
REAL(wp), DIMENSION(:), INTENT(out) :: pdept_1d, pdepw_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:), INTENT(out) :: pe3t_1d , pe3w_1d ! 1D vertical scale factors [m]
!
INTEGER :: jk ! dummy loop indices
REAL(wp) :: zt, zw ! local scalar
!!----------------------------------------------------------------------
!
IF(lwp) THEN ! Parameter print
WRITE(numout,*)
WRITE(numout,*) ' zgr_z1d : Reference vertical z-coordinates: uniform dz = ', rn_e3
WRITE(numout,*) ' ~~~~~~~'
ENDIF
!
! Reference z-coordinate (depth - scale factor at T- and W-points) ! Madec & Imbard 1996 function
! ----------------------
DO jk = 1, jpk
zw = REAL( jk , wp )
zt = REAL( jk , wp ) + 0.5_wp
pdepw_1d(jk) = rn_e3 * REAL( jk-1 , wp )
pdept_1d(jk) = rn_e3 * ( REAL( jk-1 , wp ) + 0.5_wp )
pe3w_1d (jk) = rn_e3
pe3t_1d (jk) = rn_e3
END DO
!
IF(lwp) THEN ! control print
WRITE(numout,*)
WRITE(numout,*) ' Reference 1D z-coordinate depth and scale factors:'
WRITE(numout, "(9x,' level gdept_1d gdepw_1d e3t_1d e3w_1d ')" )
WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk )
ENDIF
!
END SUBROUTINE zgr_z1d
!!======================================================================
END MODULE usrdef_zgr
bld::tool::fppkeys key_xios
......@@ -75,14 +75,14 @@ CONTAINS
zfact = rn_dx * 1.e-3 ! conversion in km
DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
! ! longitude (west coast at lon=0°)
plamt(ji,jj) = zfact * ( - 0.5 + REAL( mig0(ji)-1 , wp ) )
plamu(ji,jj) = zfact * ( REAL( mig0(ji)-1 , wp ) )
plamt(ji,jj) = zfact * ( - 0.5 + REAL( mig(ji,0)-1 , wp ) )
plamu(ji,jj) = zfact * ( REAL( mig(ji,0)-1 , wp ) )
plamv(ji,jj) = plamt(ji,jj)
plamf(ji,jj) = plamu(ji,jj)
! ! latitude (south coast at lat= 0°)
pphit(ji,jj) = zfact * ( - 0.5 + REAL( mjg0(jj)-1 , wp ) )
pphit(ji,jj) = zfact * ( - 0.5 + REAL( mjg(jj,0)-1 , wp ) )
pphiu(ji,jj) = pphit(ji,jj)
pphiv(ji,jj) = zfact * ( REAL( mjg0(jj)-1 , wp ) )
pphiv(ji,jj) = zfact * ( REAL( mjg(jj,0)-1 , wp ) )
pphif(ji,jj) = pphiv(ji,jj)
END_2D
!
......
......@@ -75,14 +75,14 @@ CONTAINS
zfact = rn_dx * 1.e-3 ! conversion in km
DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
! ! longitude (west coast at lon=0°)
plamt(ji,jj) = zfact * ( - 0.5 + REAL( mig0(ji)-1 , wp ) )
plamu(ji,jj) = zfact * ( REAL( mig0(ji)-1 , wp ) )
plamt(ji,jj) = zfact * ( - 0.5 + REAL( mig(ji,0)-1 , wp ) )
plamu(ji,jj) = zfact * ( REAL( mig(ji,0)-1 , wp ) )
plamv(ji,jj) = plamt(ji,jj)
plamf(ji,jj) = plamu(ji,jj)
! ! latitude (south coast at lat= 0°)
pphit(ji,jj) = zfact * ( - 0.5 + REAL( mjg0(jj)-1 , wp ) )
pphit(ji,jj) = zfact * ( - 0.5 + REAL( mjg(jj,0)-1 , wp ) )
pphiu(ji,jj) = pphit(ji,jj)
pphiv(ji,jj) = zfact * ( REAL( mjg0(jj)-1 , wp ) )
pphiv(ji,jj) = zfact * ( REAL( mjg(jj,0)-1 , wp ) )
pphif(ji,jj) = pphiv(ji,jj)
END_2D
!
......
......@@ -14,8 +14,7 @@ MODULE usrdef_zgr
!! zgr_z1d : reference 1D z-coordinate
!!---------------------------------------------------------------------
USE oce ! ocean variables
USE dom_oce , ONLY: mi0, mi1 ! ocean space and time domain
USE dom_oce , ONLY: glamt ! ocean space and time domain
USE dom_oce ! ocean space and time domain
USE usrdef_nam ! User defined : namelist variables
!
USE in_out_manager ! I/O manager
......@@ -94,10 +93,10 @@ CONTAINS
END_2D
CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1. ) ! boundary condition: this mask the surrouding grid-points
! ! ==>>> set by hand non-zero value on first/last columns & rows
DO ji = mi0(1), mi1(1) ! first row of global domain only
DO ji = mi0(1,nn_hls), mi1(1,nn_hls) ! first row of global domain only
zhu(ji,2) = zht(ji,2)
END DO
DO ji = mi0(jpiglo), mi1(jpiglo) ! last row of global domain only
DO ji = mi0(jpiglo,nn_hls), mi1(jpiglo,nn_hls) ! last row of global domain only
zhu(ji,2) = zht(ji,2)
END DO
zhu(:,1) = zhu(:,2)
......
......@@ -152,13 +152,13 @@ CONTAINS
& sf(jp_slp)%fnow(:,:,1), sf(jp_qlw)%fnow(:,:,1), &
& sf(jp_prec)%fnow(:,:,1), sf(jp_snow)%fnow(:,:,1) )
!
IF( ln_mixcpl ) CALL sbc_cpl_ice_flx( picefr=at_i_b, palbi=alb_ice, psst=sst_m, pist=t_su, phs=h_s, phi=h_i )
IF( ln_mixcpl ) CALL sbc_cpl_ice_flx( kt, picefr=at_i_b, palbi=alb_ice, psst=sst_m, pist=t_su, phs=h_s, phi=h_i )
IF( nn_flxdist /= -1 ) CALL ice_flx_dist ( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_flxdist )
! ! compute conduction flux and surface temperature (as in Jules surface module)
IF( ln_cndflx .AND. .NOT.ln_cndemulate ) &
& CALL blk_ice_qcn ( ln_virtual_itd, t_su, t_bo, h_s, h_i )
CASE ( jp_purecpl ) !--- coupled formulation
CALL sbc_cpl_ice_flx( picefr=at_i_b, palbi=alb_ice, psst=sst_m, pist=t_su, phs=h_s, phi=h_i )
CALL sbc_cpl_ice_flx( kt, picefr=at_i_b, palbi=alb_ice, psst=sst_m, pist=t_su, phs=h_s, phi=h_i )
IF( nn_flxdist /= -1 ) CALL ice_flx_dist ( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_flxdist )
END SELECT
......
......@@ -74,8 +74,8 @@ CONTAINS
IF( nstop > 0 .AND. ngrdstop > -1 ) RETURN ! stpctl was already called by a child grid
!
ll_wrtstp = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend )
ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1
ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm
ll_colruns = sn_cfctl%l_runstat .AND. ll_wrtstp .AND. jpnij > 1
ll_wrtruns = sn_cfctl%l_runstat .AND. ll_wrtstp .AND. lwm
!
IF( kt == nit000 ) THEN
!
......@@ -121,8 +121,8 @@ CONTAINS
!
ll_0oce = .NOT. ANY( llmsk(:,:) ) ! no ocean point in the inner domain?
!
zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module
zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk ) ! max non-solar heat flux
zmax(1) = MAXVAL( taum(:,:) , mask = llmsk(A2D(0)) ) ! max wind stress module
zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk(A2D(0)) ) ! max non-solar heat flux
zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk ) ! max E-P
zmax(jpvar+1) = REAL( nstop, wp ) ! stop indicator
!
......@@ -159,9 +159,9 @@ CONTAINS
! first: close the netcdf file, so we can read it
IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid)
! get global loc on the min/max
CALL mpp_maxloc( 'stpctl', taum(:,:) , llmsk, zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F
CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk, zzz, iloc(1:2,2) )
CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk, zzz, iloc(1:2,3) )
CALL mpp_maxloc( 'stpctl', taum(:,:) , llmsk(A2D(0)), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F
CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk(A2D(0)), zzz, iloc(1:2,2) )
CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk , zzz, iloc(1:2,3) )
! find which subdomain has the max.
iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0
DO ji = 1, jptst
......@@ -174,11 +174,11 @@ CONTAINS
CALL mpp_sum( "stpctl", iareasum ) ! sum over the global domain
ELSE ! find local min and max locations:
! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc
iloc(1:2,1) = MAXLOC( taum(:,:) , mask = llmsk )
iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk )
iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk )
iloc(1:2,1) = MAXLOC( taum(:,:) , mask = llmsk(A2D(0)) )
iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk(A2D(0)) )
iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk )
DO ji = 1, jptst ! local domain indices ==> global domain indices, excluding halos
iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /)
iloc(1:2,ji) = (/ mig(iloc(1,ji),0), mjg(iloc(2,ji),0) /)
END DO
iareamin(:) = narea ; iareamax(:) = narea ; iareasum(:) = 1 ! this is local information
ENDIF
......