Changeset 7200
- Timestamp:
- 2016-11-06T17:31:33+01:00 (7 years ago)
- Location:
- branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM
- Files:
-
- 1 added
- 54 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r6982 r7200 20 20 &namcfg ! parameters of the configuration 21 21 !----------------------------------------------------------------------- 22 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 23 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 24 ln_write_cfg= .false. ! (=T) create the domain configuration file 25 ! 26 cp_cfg = "amm" ! name of the configuration 27 jp_cfg = 011 ! resolution of the configuration 22 ln_read_cfg = .false. ! (=T) read the domain configuration file 23 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 24 cn_domcfg = "AMM_R12_domcfg" ! domain configuration filename 28 25 / 29 26 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
r7188 r7200 25 25 &namcfg ! parameters of the configuration 26 26 !----------------------------------------------------------------------- 27 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc"file28 !! (=F) user defined configuration ==>>> see usrdef(_...) modules27 ln_read_cfg = .false. ! (=T) read the domain configuration file 28 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 29 29 ln_write_cfg= .false. ! (=T) create the domain configuration file 30 30 ! 31 cp_cfg = "default" ! name of the configuration32 jp_cfg = 0 ! resolution of the configuration33 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present34 ! ! in netcdf input files, as the start j-row for reading35 31 / 36 32 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
r7188 r7200 22 22 &namcfg ! parameters of the configuration 23 23 !----------------------------------------------------------------------- 24 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc"file25 !! (=F) user defined configuration ==>>> see usrdef(_...) modules24 ln_read_cfg = .false. ! (=T) read the domain configuration file 25 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 26 26 ln_write_cfg= .false. ! (=T) create the domain configuration file 27 !28 cp_cfg = "default" ! name of the configuration29 jp_cfg = 0 ! resolution of the configuration30 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present31 ! ! in netcdf input files, as the start j-row for reading32 27 / 33 28 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
r7188 r7200 15 15 &namcfg ! parameters of the configuration 16 16 !----------------------------------------------------------------------- 17 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc"file18 !! (=F) user defined configuration ==>>> see usrdef(_...) modules17 ln_read_cfg = .false. ! (=T) read the domain configuration file 18 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 19 19 ln_write_cfg= .false. ! (=T) create the domain configuration file 20 !21 cp_cfg = "default" ! name of the configuration22 jp_cfg = 0 ! resolution of the configuration23 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present24 ! ! in netcdf input files, as the start j-row for reading25 20 / 26 21 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
r7188 r7200 15 15 &namcfg ! parameters of the configuration 16 16 !----------------------------------------------------------------------- 17 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc"file18 !! (=F) user defined configuration ==>>> see usrdef(_...) modules17 ln_read_cfg = .false. ! (=T) read the domain configuration file 18 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 19 19 ln_write_cfg= .false. ! (=T) create the domain configuration file 20 !21 cp_cfg = "default" ! name of the configuration22 jp_cfg = 0 ! resolution of the configuration23 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present24 ! ! in netcdf input files, as the start j-row for reading25 20 / 26 21 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ISOMIP/EXP00/namelist_cfg
r7112 r7200 20 20 &namcfg ! parameters of the configuration 21 21 !----------------------------------------------------------------------- 22 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 23 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 24 ln_write_cfg= .false. ! (=T) create the domain configuration file 25 ! 26 cp_cfg = "default" ! name of the configuration 27 jp_cfg = 0 ! resolution of the configuration 28 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 29 ! ! in netcdf input files, as the start j-row for reading 22 ln_read_cfg = .true. ! (=T) read the domain configuration file 23 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 24 cn_domcfg = "ISOMIP_domcfg" ! domain configuration filename 30 25 / 31 26 !----------------------------------------------------------------------- … … 33 28 !----------------------------------------------------------------------- 34 29 ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time 35 !ln_isfcav = .true. ! ice shelf cavity30 ln_isfcav = .true. ! ice shelf cavity 36 31 ! 37 32 nn_msh = 0 ! create (>0) a mesh file or not (=0) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/EXP00/namelist_cfg
r6914 r7200 24 24 &namcfg ! parameters of the configuration 25 25 !----------------------------------------------------------------------- 26 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc"file27 !! (=F) user defined configuration ==>>> see usrdef(_...) modules26 ln_read_cfg = .false. ! (=T) read the domain configuration file 27 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 28 28 ln_write_cfg= .false. ! (=T) create the domain configuration file 29 !30 cp_cfg = "lock" ! name of the configuration31 jp_cfg = 0 ! resolution of the configuration32 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present33 ! ! in netcdf input files, as the start j-row for reading34 29 / 35 30 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90
r6923 r7200 38 38 CONTAINS 39 39 40 SUBROUTINE usr_def_nam( ldtxt, ldnam, kpi, kpj, kpk, kperio )40 SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 41 41 !!---------------------------------------------------------------------- 42 42 !! *** ROUTINE dom_nam *** … … 51 51 !!---------------------------------------------------------------------- 52 52 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information 53 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 56 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. … … 66 68 ! 67 69 WRITE( ldnam(:), namusr_def ) 70 ! 71 ! 72 cd_cfg = 'LOCK_EXCHANGE' ! name & resolution (not used) 73 cp_cfg = INT( rn_dx ) 68 74 ! 69 75 ! Global Domain size: LOCK_EXCHANGE domain is 64 km x 3 grid-points x 20 m -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
r6624 r7200 15 15 &namcfg ! parameters of the configuration 16 16 !----------------------------------------------------------------------- 17 cp_cfg = "default" ! name of the configuration 18 jp_cfg = -1 ! resolution of the configuration 17 ln_read_cfg = .true. ! (=T) read the domain configuration file 18 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 19 cn_domcfg = "AGRIF_AGULHAS_domain_cfg" ! domain configuration filename 19 20 / 20 21 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
r6982 r7200 14 14 &namcfg ! parameters of the configuration 15 15 !----------------------------------------------------------------------- 16 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 ln_write_cfg= .false. ! (=T) create the domain configuration file 19 ! 20 cp_cfg = "orca" ! name of the configuration 21 jp_cfg = 2 ! resolution of the configuration 22 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 23 ! ! in netcdf input files, as the start j-row for reading 16 ln_read_cfg = .true. ! (=T) read the domain configuration file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 24 19 / 25 20 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
r6624 r7200 14 14 &namcfg ! parameters of the configuration 15 15 !----------------------------------------------------------------------- 16 cp_cfg = "default" ! name of the configuration 17 jp_cfg = -1 ! resolution of the configuration 16 ln_read_cfg = .true. ! (=T) read the domain configuration file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 cn_domcfg = "AGRIF_AGULHAS_domcfg" ! domain configuration filename 18 19 / 19 20 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
r7110 r7200 14 14 &namcfg ! parameters of the configuration 15 15 !----------------------------------------------------------------------- 16 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 ln_write_cfg= .false. ! (=T) create the domain configuration file 19 ! 20 cp_cfg = "orca" ! name of the configuration 21 jp_cfg = 2 ! resolution of the configuration 22 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 23 ! ! in netcdf input files, as the start j-row for reading 16 ln_read_cfg = .true. ! (=T) read the domain configuration file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 24 19 / 25 20 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
r6624 r7200 17 17 &namcfg ! parameters of the configuration 18 18 !----------------------------------------------------------------------- 19 cp_cfg = "orca" ! name of the configuration 20 jp_cfg = 2 ! resolution of the configuration 19 ln_read_cfg = .true. ! (=T) read the domain configuration file 20 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 21 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 21 22 / 22 23 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
r7005 r7200 14 14 &namcfg ! parameters of the configuration 15 15 !----------------------------------------------------------------------- 16 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 ln_write_cfg= .false. ! (=T) create the domain configuration file 19 ! 20 cp_cfg = "orca" ! name of the configuration 21 jp_cfg = 2 ! resolution of the configuration 22 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 23 ! ! in netcdf input files, as the start j-row for reading 16 ln_read_cfg = .true. ! (=T) read the domain configuration file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 24 19 / 25 20 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
r6979 r7200 13 13 &namcfg ! parameters of the configuration 14 14 !----------------------------------------------------------------------- 15 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 16 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 17 cp_cfg = "orca" ! name of the configuration 18 jp_cfg = 2 ! resolution of the configuration 15 ln_read_cfg = .true. ! (=T) read the domain configuration file 16 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 17 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 19 18 / 20 19 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg
r7000 r7200 14 14 &namcfg ! parameters of the configuration 15 15 !----------------------------------------------------------------------- 16 ln_read_cfg = .true. ! (=T) read the domain configuration in 'domain_cfg.nc" file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 ln_write_cfg= .false. ! (=T) create the domain configuration file 19 ! 20 cp_cfg = "orca" ! name of the configuration 21 jp_cfg = 2 ! resolution of the configuration 22 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 23 ! ! in netcdf input files, as the start j-row for reading 16 ln_read_cfg = .true. ! (=T) read the domain configuration file 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 cn_domcfg = "ORCA_R2_domcfg" ! domain configuration filename 24 19 / 25 20 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/EXP00/namelist_cfg
r6914 r7200 31 31 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 32 32 ln_write_cfg= .false. ! (=T) create the domain configuration file 33 !34 cp_cfg = "overflow" ! name of the configuration35 jp_cfg = 0 ! resolution of the configuration36 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present37 ! ! in netcdf input files, as the start j-row for reading38 33 / 39 34 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_nam.F90
r6923 r7200 39 39 CONTAINS 40 40 41 SUBROUTINE usr_def_nam( ldtxt, ldnam, kpi, kpj, kpk, kperio )41 SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 42 42 !!---------------------------------------------------------------------- 43 43 !! *** ROUTINE dom_nam *** … … 52 52 !!---------------------------------------------------------------------- 53 53 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. … … 67 69 ! 68 70 WRITE( ldnam(:), namusr_def ) 71 ! 72 cd_cfg = 'OVERFLOW' ! name & resolution (not used) 73 kk_cfg = INT( rn_dx ) 69 74 ! 70 75 ! Global Domain size: OVERFLOW domain is 200 km x 3 grid-points x 2000 m -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/SHARED/namelist_ref
r7024 r7200 71 71 &namcfg ! parameters of the configuration 72 72 !----------------------------------------------------------------------- 73 ln_read_cfg = .false. ! (=T) read the domain configuration in 'domain_cfg.nc" file 74 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 73 ln_read_cfg = .false. ! (=T) read the domain configuration file 74 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 75 cn_domcfg = "domain_cfg" ! domain configuration filename 76 ! 75 77 ln_write_cfg= .false. ! (=T) create the domain configuration file 76 ! 77 cp_cfg = "default" ! name of the configuration 78 jp_cfg = 0 ! resolution of the configuration 78 cn_domcfg_out = "domain_cfg_out" ! newly created domain configuration filename 79 ! 79 80 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 80 81 ! ! in netcdf input files, as the start j-row for reading … … 458 459 &namberg ! iceberg parameters (default: No iceberg) 459 460 !----------------------------------------------------------------------- 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 ! 486 ! 487 488 489 461 ln_icebergs = .false. ! iceberg floats or not 462 ln_bergdia = .true. ! Calculate budgets 463 nn_verbose_level = 1 ! Turn on more verbose output if level > 0 464 nn_verbose_write = 15 ! Timesteps between verbose messages 465 nn_sample_rate = 1 ! Timesteps between sampling for trajectory storage 466 ! Initial mass required for an iceberg of each class 467 rn_initial_mass = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11 468 ! Proportion of calving mass to apportion to each class 469 rn_distribution = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02 470 ! Ratio between effective and real iceberg mass (non-dim) 471 ! i.e. number of icebergs represented at a point 472 rn_mass_scaling = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1 473 ! thickness of newly calved bergs (m) 474 rn_initial_thickness = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250. 475 rn_rho_bergs = 850. ! Density of icebergs 476 rn_LoW_ratio = 1.5 ! Initial ratio L/W for newly calved icebergs 477 ln_operator_splitting = .true. ! Use first order operator splitting for thermodynamics 478 rn_bits_erosion_fraction = 0. ! Fraction of erosion melt flux to divert to bergy bits 479 rn_sicn_shift = 0. ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1) 480 ln_passive_mode = .false. ! iceberg - ocean decoupling 481 nn_test_icebergs = 10 ! Create test icebergs of this class (-1 = no) 482 ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2) 483 rn_test_box = 108.0, 116.0, -66.0, -58.0 484 rn_speed_limit = 0. ! CFL speed limit for a berg 485 486 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 487 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename ! 488 sn_icb = 'calving', -1 , 'calvingmask', .true. , .true. , 'yearly' , '' , '' , '' 489 490 cn_dir = './' 490 491 / 491 492 … … 519 520 &nam_tide ! tide parameters ("key_tide") 520 521 !----------------------------------------------------------------------- 521 ln_tide_pot = .true. ! use tidal potential forcing 522 ln_tide_ramp = .false. ! 523 rdttideramp = 0. ! 524 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg 522 ln_tide_pot = .true. ! use tidal potential forcing 523 ln_tide_ramp= .false. ! 524 rdttideramp = 0. ! 525 clname(1) = 'DUMMY' ! name of constituent 526 ! ! all tidal components must be set in namelist_cfg 525 527 / 526 528 !----------------------------------------------------------------------- 527 529 &nambdy ! unstructured open boundaries ("key_bdy") 528 530 !----------------------------------------------------------------------- 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 531 nb_bdy = 0 ! number of open boundary sets 532 ln_coords_file = .true. ! =T : read bdy coordinates from file 533 cn_coords_file = 'coordinates.bdy.nc' ! bdy coordinates files 534 ln_mask_file = .false. ! =T : read mask from file 535 cn_mask_file = '' ! name of mask file (if ln_mask_file=.TRUE.) 536 cn_dyn2d = 'none' ! 537 nn_dyn2d_dta = 0 ! = 0, bdy data are equal to the initial state 538 ! ! = 1, bdy data are read in 'bdydata .nc' files 539 ! ! = 2, use tidal harmonic forcing data from files 540 ! ! = 3, use external data AND tidal harmonic forcing 541 cn_dyn3d = 'none' ! 542 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state 543 ! ! = 1, bdy data are read in 'bdydata .nc' files 544 cn_tra = 'none' ! 545 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state 546 ! ! = 1, bdy data are read in 'bdydata .nc' files 547 cn_ice_lim = 'none' ! 548 nn_ice_lim_dta = 0 ! = 0, bdy data are equal to the initial state 549 ! ! = 1, bdy data are read in 'bdydata .nc' files 550 rn_ice_tem = 270. ! lim3 only: arbitrary temperature of incoming sea ice 551 rn_ice_sal = 10. ! lim3 only: -- salinity -- 552 rn_ice_age = 30. ! lim3 only: -- age -- 553 ! 554 ln_tra_dmp =.false. ! open boudaries conditions for tracers 555 ln_dyn3d_dmp =.false. ! open boundary condition for baroclinic velocities 556 rn_time_dmp = 1. ! Damping time scale in days 557 rn_time_dmp_out = 1. ! Outflow damping time scale 558 nn_rimwidth = 10 ! width of the relaxation zone 559 ln_vol = .false. ! total volume correction (see nn_volctl parameter) 560 nn_volctl = 1 ! = 0, the total water flux across open boundaries is zero 559 561 / 560 562 !----------------------------------------------------------------------- -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
r6596 r7200 479 479 480 480 !! Fram Strait sea-ice transport (sea-ice + snow) (in ORCA2 = 5 points) 481 IF( iom_use('fram_trans') .and. c p_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! ORCA R2 configuration481 IF( iom_use('fram_trans') .and. cn_cfg == "orca" .AND. nn_cfg == 2 ) THEN ! ORCA R2 configuration 482 482 DO jj = mj0(137), mj1(137) ! B grid 483 483 IF( mj0(jj-1) >= nldj ) THEN -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r6717 r7200 1 1 #if defined key_agrif 2 2 !!---------------------------------------------------------------------- 3 !! NEMO/NST 3.7 , NEMO Consortium (201 5)3 !! NEMO/NST 3.7 , NEMO Consortium (2016) 4 4 !! $Id$ 5 5 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 18 18 USE dom_oce 19 19 USE nemogcm 20 ! 20 !! 21 21 IMPLICIT NONE 22 22 !!---------------------------------------------------------------------- … … 60 60 USE tradmp 61 61 USE bdy_par 62 63 IMPLICIT NONE 64 !!---------------------------------------------------------------------- 65 ! 0. Initializations66 !------------------- 67 IF( cp_cfg == 'orca' ) THEN 68 IF ( jp_cfg == 2 .OR. jp_cfg == 025 .OR. jp_cfg == 05 &69 & .OR. jp_cfg == 4 ) THEN70 jp_cfg = -1 ! set special value for jp_cfg on fine grids71 c p_cfg = "default"62 !! 63 IMPLICIT NONE 64 !!---------------------------------------------------------------------- 65 ! 66 !!gm I think this is now useless ... nn_cfg & cn_cfg are set to -999999 and "UNKNOWN" 67 !!gm when reading the AGRIF domain configuration file 68 IF( cn_cfg == 'orca' ) THEN 69 IF ( nn_cfg == 2 .OR. nn_cfg == 025 .OR. nn_cfg == 05 .OR. nn_cfg == 4 ) THEN 70 nn_cfg = -1 ! set special value for nn_cfg on fine grids 71 cn_cfg = "default" 72 72 ENDIF 73 73 ENDIF 74 ! Specific fine grid Initializations 75 ! no tracer damping on fine grids 76 ln_tradmp = .FALSE. 77 ! no open boundary on fine grids 78 lk_bdy = .FALSE. 79 80 81 CALL nemo_init ! Initializations of each fine grid 82 74 !!gm end 75 76 ! !* Specific fine grid Initializations 77 ln_tradmp = .FALSE. ! no tracer damping on fine grids 78 ! 79 lk_bdy = .FALSE. ! no open boundary on fine grids 80 81 CALL nemo_init !* Initializations of each fine grid 82 83 ! !* Agrif initialization 83 84 CALL agrif_nemo_init 84 85 CALL Agrif_InitValues_cont_dom … … 88 89 # if defined key_top 89 90 CALL Agrif_InitValues_cont_top 90 # endif 91 # endif 92 ! 91 93 END SUBROUTINE Agrif_initvalues 92 94 … … 106 108 USE agrif_opa_interp 107 109 USE agrif_opa_sponge 108 ! 109 IMPLICIT NONE 110 ! 111 !!---------------------------------------------------------------------- 112 110 !! 111 IMPLICIT NONE 112 !!---------------------------------------------------------------------- 113 ! 113 114 ! Declaration of the type of variable which have to be interpolated 114 ! ---------------------------------------------------------------------115 ! 115 116 CALL agrif_declare_var_dom 116 117 ! … … 127 128 USE par_oce 128 129 USE oce 130 !! 129 131 IMPLICIT NONE 130 132 !!---------------------------------------------------------------------- … … 174 176 USE agrif_opa_interp 175 177 USE agrif_opa_sponge 176 ! 178 !! 177 179 IMPLICIT NONE 178 180 ! … … 344 346 USE oce 345 347 USE agrif_oce 348 !! 346 349 IMPLICIT NONE 347 350 !!---------------------------------------------------------------------- … … 482 485 USE agrif_lim2_interp 483 486 USE lib_mpp 484 ! 485 IMPLICIT NONE 486 ! 487 !! 488 IMPLICIT NONE 487 489 !!---------------------------------------------------------------------- 488 490 … … 519 521 END SUBROUTINE Agrif_InitValues_cont_lim2 520 522 523 521 524 SUBROUTINE agrif_declare_var_lim2 522 525 !!---------------------------------------------------------------------- … … 527 530 USE agrif_util 528 531 USE ice_2 529 532 !! 530 533 IMPLICIT NONE 531 534 !!---------------------------------------------------------------------- … … 583 586 USE agrif_top_interp 584 587 USE agrif_top_sponge 585 ! 588 !! 586 589 IMPLICIT NONE 587 590 ! … … 682 685 USE dom_oce 683 686 USE trc 684 685 IMPLICIT NONE 687 !! 688 IMPLICIT NONE 689 !!---------------------------------------------------------------------- 686 690 687 691 ! 1. Declaration of the type of variable which have to be interpolated … … 714 718 SUBROUTINE Agrif_detect( kg, ksizex ) 715 719 !!---------------------------------------------------------------------- 716 !! *** ROUTINE Agrif_detect *** 717 !!---------------------------------------------------------------------- 718 ! 720 !! *** ROUTINE Agrif_detect *** 721 !!---------------------------------------------------------------------- 719 722 INTEGER, DIMENSION(2) :: ksizex 720 723 INTEGER, DIMENSION(ksizex(1),ksizex(2)) :: kg … … 734 737 USE in_out_manager 735 738 USE lib_mpp 739 !! 736 740 IMPLICIT NONE 737 741 ! … … 787 791 !!---------------------------------------------------------------------- 788 792 USE dom_oce 793 !! 789 794 IMPLICIT NONE 790 795 ! … … 801 806 END SUBROUTINE Agrif_InvLoc 802 807 808 803 809 SUBROUTINE Agrif_get_proc_info( imin, imax, jmin, jmax ) 804 810 !!---------------------------------------------------------------------- … … 806 812 !!---------------------------------------------------------------------- 807 813 USE par_oce 814 !! 808 815 IMPLICIT NONE 809 816 ! … … 819 826 END SUBROUTINE Agrif_get_proc_info 820 827 828 821 829 SUBROUTINE Agrif_estimate_parallel_cost(imin, imax,jmin, jmax, nbprocs, grid_cost) 822 830 !!---------------------------------------------------------------------- … … 824 832 !!---------------------------------------------------------------------- 825 833 USE par_oce 834 !! 826 835 IMPLICIT NONE 827 836 ! -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r6979 r7200 2 2 !!====================================================================== 3 3 !! *** MODULE nemogcm *** 4 !! O ff-line Ocean : passive tracer evolution, dynamics read in files4 !! OFF-line Ocean : passive tracer evolution, dynamics read in files 5 5 !!====================================================================== 6 6 !! History : 3.3 ! 2010-05 (C. Ethe) Full reorganization of the off-line: phasing with the on-line 7 7 !! 4.0 ! 2011-01 (C. Ethe, A. R. Porter, STFC Daresbury) dynamical allocation 8 !! 4.0 ! 2016-10 (C. Ethe, G. Madec, S. Flavoni) domain configuration / user defined interface 8 9 !!---------------------------------------------------------------------- 9 10 10 11 !!---------------------------------------------------------------------- 11 !! nemo_gcm : off-line: solve ocean tracer only 12 !! nemo_init : initialization of the nemo model 13 !! nemo_ctl : initialisation of algorithm flag 14 !! nemo_closefile : close remaining files 12 !! nemo_gcm : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice 13 !! nemo_init : initialization of the NEMO system 14 !! nemo_ctl : initialisation of the contol print 15 !! nemo_closefile: close remaining open files 16 !! nemo_alloc : dynamical allocation 17 !! nemo_partition: calculate MPP domain decomposition 18 !! factorise : calculate the factors of the no. of MPI processes 19 !! istate_init : ocean variables set to zero 20 !! stp_ctl : step control for OFF-line 15 21 !!---------------------------------------------------------------------- 16 22 USE dom_oce ! ocean space domain variables 17 23 USE oce ! dynamics and tracers variables 18 24 USE c1d ! 1D configuration 19 USE domcfg ! domain configuration (dom_cfg routine)20 25 USE domain ! domain initialization from coordinate & bathymetry (dom_init routine) 21 ! USE domrea ! domain initialization from mesh_mask (dom_init routine) 26 USE usrdef_nam ! user defined configuration 22 27 USE eosbn2 ! equation of state (eos bn2 routine) 23 28 ! ! ocean physics … … 35 40 USE trcstp ! passive tracer time-stepping (trc_stp routine) 36 41 USE dtadyn ! Lecture and interpolation of the dynamical fields 42 ! ! Passive tracers needs 43 USE trc ! passive tracer : variables 44 USE trcnam ! passive tracer : namelist 45 USE trcrst ! passive tracer restart 46 USE diaptr ! Need to initialise this as some variables are used in if statements later 47 USE sbc_oce , ONLY : ln_rnf 48 USE sbcrnf ! surface boundary condition : runoffs 37 49 ! ! I/O & MPP 38 50 USE iom ! I/O library … … 48 60 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 49 61 50 USE trc51 USE trcnam52 USE trcrst53 USE diaptr ! Need to initialise this as some variables are used in if statements later54 USE sbc_oce, ONLY: ln_rnf55 USE sbcrnf56 USE usrdef_nam ! user defined configuration57 58 59 62 IMPLICIT NONE 60 63 PRIVATE … … 65 68 66 69 !!---------------------------------------------------------------------- 67 !! NEMO/OFF 3.3 , NEMO Consortium (2010)70 !! NEMO/OFF 4.0 , NEMO Consortium (2016) 68 71 !! $Id$ 69 72 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 75 78 !! *** ROUTINE nemo_gcm *** 76 79 !! 77 !! ** Purpose : nemosolves the primitive equations on an orthogonal78 !! curvilinear mesh on the sphere.80 !! ** Purpose : NEMO solves the primitive equations on an orthogonal 81 !! curvilinear mesh on the sphere. 79 82 !! 80 83 !! ** Method : - model general initialization … … 85 88 !! Madec, 2008, internal report, IPSL. 86 89 !!---------------------------------------------------------------------- 87 INTEGER :: istp, indic ! time step index 88 !!---------------------------------------------------------------------- 89 90 CALL nemo_init ! Initializations 90 INTEGER :: istp, indic ! time step index 91 !!---------------------------------------------------------------------- 92 93 ! !-----------------------! 94 CALL nemo_init !== Initialisations ==! 95 ! !-----------------------! 91 96 92 97 ! check that all process are still there... If some process have an error, … … 121 126 ! !== finalize the run ==! 122 127 ! !------------------------! 123 IF(lwp) WRITE(numout,cform_aaa) 124 125 IF( nstop /= 0 .AND. lwp ) THEN 128 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 129 ! 130 IF( nstop /= 0 .AND. lwp ) THEN ! error print 126 131 WRITE(numout,cform_err) 127 132 WRITE(numout,*) nstop, ' error have been found' … … 132 137 CALL nemo_closefile 133 138 ! 134 # 135 CALL xios_finalize ! end mpp communications136 # 137 IF( lk_mpp ) CALL mppstop ! end mpp communications138 # 139 #if defined key_iomput 140 CALL xios_finalize ! end mpp communications 141 #else 142 IF( lk_mpp ) CALL mppstop ! end mpp communications 143 #endif 139 144 ! 140 145 END SUBROUTINE nemo_gcm … … 143 148 SUBROUTINE nemo_init 144 149 !!---------------------------------------------------------------------- 145 !! *** ROUTINE nemo_init *** 146 !! 147 !! ** Purpose : initialization of the nemo model in off-line mode 148 !!---------------------------------------------------------------------- 149 INTEGER :: ji ! dummy loop indices 150 INTEGER :: ilocal_comm ! local integer 151 INTEGER :: ios, inum 152 REAL(wp) :: ziglo, zjglo, zkglo, zperio ! local scalars 150 !! *** ROUTINE nemo_init *** 151 !! 152 !! ** Purpose : initialization of NEMO in off-line mode 153 !!---------------------------------------------------------------------- 154 INTEGER :: ji ! dummy loop indices 155 INTEGER :: ilocal_comm ! local integer 156 INTEGER :: ios, inum ! - - 153 157 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 154 ! !155 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &156 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, &158 ! 159 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 160 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 157 161 & nn_timing, nn_diacfl 158 159 NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr160 ! !----------------------------------------------------------------------162 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 163 !!---------------------------------------------------------------------- 164 ! 161 165 cltxt = '' 162 166 cltxt2 = '' … … 168 172 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 169 173 ! 170 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark174 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints 171 175 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 172 176 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 173 174 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark177 ! 178 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 175 179 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 176 180 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 177 178 ! 179 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints & Benchmark 181 ! 182 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints 180 183 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 181 184 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) … … 185 188 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 186 189 187 188 190 ! !--------------------------! 189 191 ! ! Set global domain size ! (control print return in cltxt2) 190 192 ! !--------------------------! 191 IF( ln_read_cfg ) THEN ! Read sizes in configuration "mesh_mask" file 192 CALL iom_open( 'domain_cfg', inum ) 193 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 194 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 195 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 196 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 197 CALL iom_close( inum ) 198 WRITE(cltxt2(1),*) '~~~~~~~~~~ ' 199 WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file : jp(i,j,k)glo = ' 200 WRITE(cltxt2(3),*) ' ', jpiglo, jpjglo, jpkglo 201 WRITE(cltxt2(1),*) '~~~~~~~~~~ lateral boudary type of the global domain jperio= ', jperio 202 ! 193 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 194 CALL domain_cfg ( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 195 ! 203 196 ELSE ! user-defined namelist 204 CALL usr_def_nam( cltxt2, clnam, jpiglo, jpjglo, jpkglo, jperio )197 CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 205 198 ENDIF 206 199 jpk = jpkglo … … 224 217 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 225 218 226 IF(lwm) THEN 227 ! write merged namelists from earlier to output namelist now that the 228 ! file has been opened in call to mynode. nammpp has already been 229 ! written in mynode (if lk_mpp_mpi) 219 IF(lwm) THEN ! write merged namelists from earlier to output namelist 220 ! ! now that the file has been opened in call to mynode. 221 ! ! NB: nammpp has already been written in mynode (if lk_mpp_mpi) 230 222 WRITE( numond, namctl ) 231 223 WRITE( numond, namcfg ) 232 224 IF( .NOT.ln_read_cfg ) THEN 233 225 DO ji = 1, SIZE(clnam) 234 IF( TRIM(clnam (ji)) /= '' ) WRITE(numond, * ) clnam(ji)! namusr_def print226 IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 235 227 END DO 236 228 ENDIF 237 229 ENDIF 238 230 239 ! If dimensions of processor grid weren't specified in the namelist file 231 ! If dimensions of processor grid weren't specified in the namelist file 240 232 ! then we calculate them here now that we have our communicator size 241 IF( (jpni < 1) .OR. (jpnj < 1) )THEN242 #if 243 CALL nemo_partition( mppsize)233 IF( jpni < 1 .OR. jpnj < 1 ) THEN 234 #if defined key_mpp_mpi 235 CALL nemo_partition( mppsize ) 244 236 #else 245 jpni = 1246 jpnj = 1237 jpni = 1 238 jpnj = 1 247 239 jpnij = jpni*jpnj 248 240 #endif 249 END 241 ENDIF 250 242 251 243 ! Calculate domain dimensions given calculated jpni and jpnj … … 259 251 jpij = jpi*jpj ! jpi x j 260 252 261 262 253 IF(lwp) THEN ! open listing units 263 254 ! … … 268 259 WRITE(numout,*) ' NEMO team' 269 260 WRITE(numout,*) ' Ocean General Circulation Model' 270 WRITE(numout,*) ' version 3. 6 (2015) '261 WRITE(numout,*) ' version 3.7 (2016) ' 271 262 WRITE(numout,*) 272 263 WRITE(numout,*) 273 DO ji = 1, SIZE(cltxt) 274 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji)! control print of mynode264 DO ji = 1, SIZE(cltxt) 265 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) ! control print of mynode 275 266 END DO 276 WRITE(numout,cform_aaa) ! Flag AAAAAAA 267 WRITE(numout,*) 268 WRITE(numout,*) 269 DO ji = 1, SIZE(cltxt2) 270 IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 271 END DO 272 WRITE(numout,cform_aaa) ! Flag AAAAAAA 277 273 ! 278 274 ENDIF 279 275 280 ! Now we know the dimensions of the grid and numout has been set we can 281 ! allocate arrays 276 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 282 277 CALL nemo_alloc() 283 284 ! !--------------------------------! 285 ! ! Model general initialization ! 286 ! !--------------------------------! 287 288 CALL nemo_ctl ! Control prints & Benchmark 278 ! !-------------------------------! 279 ! ! NEMO general initialization ! 280 ! !-------------------------------! 281 282 CALL nemo_ctl ! Control prints 289 283 290 284 ! ! Domain decomposition … … 295 289 IF( nn_timing == 1 ) CALL timing_init 296 290 ! 297 298 291 ! ! General initialization 299 292 IF( nn_timing == 1 ) CALL timing_start( 'nemo_init') … … 374 367 WRITE(numout,*) '~~~~~~~ ' 375 368 WRITE(numout,*) ' Namelist namcfg' 376 WRITE(numout,*) ' read configuration definition files ln_read_cfg = ', ln_read_cfg 377 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 378 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 379 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 369 WRITE(numout,*) ' read domain configuration files ln_read_cfg = ', ln_read_cfg 370 WRITE(numout,*) ' filename to be read cn_domcfg = ', TRIM(cn_domcfg) 371 WRITE(numout,*) ' write configuration definition files ln_write_cfg = ', ln_write_cfg 372 WRITE(numout,*) ' filename to be written cn_domcfg_out = ', TRIM(cn_domcfg_out) 373 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 380 374 ENDIF 381 375 ! ! Parameter control … … 432 426 !!---------------------------------------------------------------------- 433 427 ! 434 IF ( lk_mpp )CALL mppsync428 IF( lk_mpp ) CALL mppsync 435 429 ! 436 430 CALL iom_close ! close all input/output files managed by iom_* … … 455 449 !! ** Method : 456 450 !!---------------------------------------------------------------------- 457 USE diawri ,ONLY: dia_wri_alloc451 USE diawri , ONLY: dia_wri_alloc 458 452 USE dom_oce, ONLY: dom_oce_alloc 459 453 USE zdf_oce, ONLY: zdf_oce_alloc … … 484 478 !! ** Method : 485 479 !!---------------------------------------------------------------------- 486 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have480 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 487 481 ! 488 482 INTEGER, PARAMETER :: nfactmax = 20 … … 493 487 INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 494 488 !!---------------------------------------------------------------------- 495 489 ! 496 490 ierr = 0 497 491 ! 498 492 CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 499 493 ! 500 494 IF( nfact <= 1 ) THEN 501 495 WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' … … 528 522 !! 529 523 !! ** Purpose : return the prime factors of n. 530 !! knfax factors are returned in array kfax which is of 524 !! knfax factors are returned in array kfax which is of 531 525 !! maximum dimension kmaxfax. 532 526 !! ** Method : … … 538 532 INTEGER :: ifac, jl, inu 539 533 INTEGER, PARAMETER :: ntest = 14 540 INTEGER :: ilfax(ntest) 534 INTEGER, DIMENSION(ntest) :: ilfax 535 !!---------------------------------------------------------------------- 541 536 ! 542 537 ! lfax contains the set of allowed factors. 543 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & 544 & 128, 64, 32, 16, 8, 4, 2 / 545 !!---------------------------------------------------------------------- 546 538 ilfax(:) = (/(2**jl,jl=ntest,1,-1)/) 539 ! 547 540 ! Clear the error flag and initialise output vars 548 kerr = 0549 kfax = 1541 kerr = 0 542 kfax = 1 550 543 knfax = 0 551 544 ! 552 545 ! Find the factors of n. 553 546 IF( kn == 1 ) GOTO 20 … … 557 550 ! l points to the allowed factor list. 558 551 ! ifac holds the current factor. 559 552 ! 560 553 inu = kn 561 554 knfax = 0 562 555 ! 563 556 DO jl = ntest, 1, -1 564 557 ! … … 584 577 ! 585 578 END DO 586 579 ! 587 580 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 588 581 ! … … 590 583 591 584 #if defined key_mpp_mpi 585 592 586 SUBROUTINE nemo_northcomms 593 !! ======================================================================587 !!---------------------------------------------------------------------- 594 588 !! *** ROUTINE nemo_northcomms *** 595 !! nemo_northcomms : Setup for north fold exchanges with explicit 596 !! point-to-point messaging 597 !!===================================================================== 598 !!---------------------------------------------------------------------- 599 !! 600 !! ** Purpose : Initialization of the northern neighbours lists. 589 !! ** Purpose : Setup for north fold exchanges with explicit 590 !! point-to-point messaging 591 !! 592 !! ** Method : Initialization of the northern neighbours lists. 601 593 !!---------------------------------------------------------------------- 602 594 !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) 603 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. 604 !Mocavero, CMCC) 605 !!---------------------------------------------------------------------- 606 595 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 596 !!---------------------------------------------------------------------- 607 597 INTEGER :: sxM, dxM, sxT, dxT, jn 608 598 INTEGER :: njmppmax 609 599 !!---------------------------------------------------------------------- 600 ! 610 601 njmppmax = MAXVAL( njmppt ) 611 602 ! 612 603 !initializes the north-fold communication variables 613 604 isendto(:) = 0 614 nsndto = 0615 605 nsndto = 0 606 ! 616 607 !if I am a process in the north 617 608 IF ( njmpp == njmppmax ) THEN … … 625 616 !loop over the other north-fold processes to find the processes 626 617 !managing the points belonging to the sxT-dxT range 627 618 628 619 DO jn = 1, jpni 629 620 !sxT is the first point (in the global domain) of the jn … … 660 651 l_north_nogather = .TRUE. 661 652 END SUBROUTINE nemo_northcomms 653 662 654 #else 663 655 SUBROUTINE nemo_northcomms ! Dummy routine … … 686 678 END SUBROUTINE istate_init 687 679 680 688 681 SUBROUTINE stp_ctl( kt, kindic ) 689 682 !!---------------------------------------------------------------------- … … 712 705 ! 713 706 END SUBROUTINE stp_ctl 707 714 708 !!====================================================================== 715 709 END MODULE nemogcm -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
r6596 r7200 85 85 ! mesh, only glamt and gphit ! 86 86 ! ============================= ! 87 87 ! 88 88 SELECT CASE( jphgr_msh ) ! type of horizontal mesh 89 89 ! 90 90 CASE ( 0 ) ! curvilinear coordinate on the sphere read in coordinate.nc file 91 91 ! 92 92 CALL iom_open( 'coordinates', inum ) 93 93 CALL iom_get( inum, jpdom_unknown, 'glamt', glamdta ) ! mig, mjg undefined at this point 94 94 CALL iom_get( inum, jpdom_unknown, 'gphit', gphidta ) ! so use jpdom_unknown not jpdom_data 95 95 CALL iom_close ( inum ) 96 96 ! 97 97 CASE ( 1 ) ! geographical mesh on the sphere with regular grid-spacing 98 98 ! 99 99 DO jj = 1, jpjdta 100 100 DO ji = 1, jpidta 101 101 zti = FLOAT( ji - 1 + nimpp - 1 ) 102 102 ztj = FLOAT( jj - 1 + njmpp - 1 ) 103 103 ! 104 104 glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 105 105 gphidta(ji,jj) = ppgphi0 + ppe2_deg * ztj 106 106 END DO 107 107 END DO 108 108 ! 109 109 CASE ( 2:3 ) ! f- or beta-plane with regular grid-spacing 110 110 ! 111 111 glam0 = 0.e0 112 112 gphi0 = - ppe2_m * 1.e-3 113 113 ! 114 114 DO jj = 1, jpjdta 115 115 DO ji = 1, jpidta … … 118 118 END DO 119 119 END DO 120 120 ! 121 121 CASE ( 4 ) ! geographical mesh on the sphere, isotropic MERCATOR type 122 122 ! 123 123 IF( ppgphi0 == -90 ) CALL ctl_stop( ' Mercator grid cannot start at south pole !!!! ' ) 124 124 ! 125 125 zarg = rpi / 4. - rpi / 180. * ppgphi0 / 2. 126 126 ijeq = ABS( 180. / rpi * LOG( COS( zarg ) / SIN( zarg ) ) / ppe1_deg ) 127 127 IF( ppgphi0 > 0 ) ijeq = -ijeq 128 128 ! 129 129 DO jj = 1, jpjdta 130 130 DO ji = 1, jpidta 131 131 zti = FLOAT( ji - 1 + nimpp - 1 ) 132 132 ztj = FLOAT( jj - ijeq + njmpp - 1 ) 133 133 ! 134 134 glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 135 135 gphidta(ji,jj) = 1. / rad * ASIN ( TANH( ppe1_deg * rad * ztj ) ) 136 136 END DO 137 137 END DO 138 138 ! 139 139 CASE ( 5 ) ! beta-plane with regular grid-spacing and rotated domain (GYRE configuration) 140 140 ! 141 141 zlam1 = -85 142 142 zphi1 = 29 143 ze1 = 106000. / FLOAT(jp_cfg)144 143 ze1 = 106000. / REAL( nn_cfg , wp ) 144 ! 145 145 zsin_alpha = - SQRT( 2. ) / 2. 146 146 zcos_alpha = SQRT( 2. ) / 2. 147 147 ze1deg = ze1 / (ra * rad) 148 148 ! 149 149 glam0 = zlam1 + zcos_alpha * ze1deg * FLOAT( jpjdta-2 ) ! Force global 150 150 gphi0 = zphi1 + zsin_alpha * ze1deg * FLOAT( jpjdta-2 ) 151 151 ! 152 152 DO jj = 1, jpjdta 153 153 DO ji = 1, jpidta … … 159 159 END DO 160 160 END DO 161 161 ! 162 162 CASE DEFAULT 163 163 ! 164 164 WRITE(ctmp1,*) ' bad flag value for jphgr_msh = ', jphgr_msh 165 165 CALL ctl_stop( ctmp1 ) 166 166 ! 167 167 END SELECT 168 168 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r7188 r7200 22 22 !! dom_nam : read and contral domain namelists 23 23 !! dom_ctl : control print for the ocean domain 24 !! cfg_write : create the "domain_cfg.nc" file containing all required configuration information 24 !! domain_cfg : read the global domain size in domain configuration file 25 !! cfg_write : create the domain configuration file 25 26 !!---------------------------------------------------------------------- 26 27 USE oce ! ocean variables … … 48 49 PRIVATE 49 50 50 PUBLIC dom_init ! called by opa.F90 51 PUBLIC dom_init ! called by nemogcm.F90 52 PUBLIC domain_cfg ! called by nemogcm.F90 51 53 52 54 !!------------------------------------------------------------------------- … … 110 112 END SELECT 111 113 WRITE(numout,*) ' Ocean model configuration used:' 112 WRITE(numout,*) ' c p_cfg = ', cp_cfg113 WRITE(numout,*) ' jp_cfg = ', jp_cfg114 WRITE(numout,*) ' cn_cfg = ', cn_cfg 115 WRITE(numout,*) ' nn_cfg = ', nn_cfg 114 116 ENDIF 115 117 ! … … 123 125 CALL dom_glo ! global domain versus local domain 124 126 CALL dom_nam ! read namelist ( namrun, namdom ) 125 CALL dom_clo( c p_cfg, jp_cfg ) ! Closed seas and lake127 CALL dom_clo( cn_cfg, nn_cfg ) ! Closed seas and lake 126 128 CALL dom_hgr ! Horizontal mesh 127 129 CALL dom_zgr( ik_top, ik_bot ) ! Vertical mesh and bathymetry … … 287 289 INTEGER :: ios ! Local integer output status for namelist read 288 290 !!---------------------------------------------------------------------- 289 291 ! 290 292 REWIND( numnam_ref ) ! Namelist namrun in reference namelist : Parameters of the run 291 293 READ ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 292 294 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 293 295 ! 294 296 REWIND( numnam_cfg ) ! Namelist namrun in configuration namelist : Parameters of the run 295 297 READ ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) … … 380 382 READ ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 381 383 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 382 383 384 ! 384 385 REWIND( numnam_cfg ) ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) … … 414 415 READ ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 415 416 907 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 416 417 ! 417 418 REWIND( numnam_cfg ) ! Namelist namnc4 in configuration namelist : NETCDF 418 419 READ ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) … … 492 493 493 494 495 SUBROUTINE domain_cfg( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 496 !!---------------------------------------------------------------------- 497 !! *** ROUTINE dom_nam *** 498 !! 499 !! ** Purpose : read the domain size in domain configuration file 500 !! 501 !! ** Method : 502 !! 503 !!---------------------------------------------------------------------- 504 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information 505 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 506 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 507 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 508 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 509 ! 510 INTEGER :: inum, ii ! local integer 511 REAL(wp) :: zorca_res ! local scalars 512 REAL(wp) :: ziglo, zjglo, zkglo, zperio ! - - 513 !!---------------------------------------------------------------------- 514 ! 515 ii = 1 516 WRITE(ldtxt(ii),*) ' ' ; ii = ii+1 517 WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in', TRIM( cn_domcfg ), ' file' ; ii = ii+1 518 WRITE(ldtxt(ii),*) '~~~~~~~~~~ ' ; ii = ii+1 519 ! 520 CALL iom_open( cn_domcfg, inum ) 521 ! 522 ! !- ORCA family specificity 523 IF( iom_varid( inum, 'ORCA' , ldstop = .FALSE. ) > 0 .AND. & 524 & iom_varid( inum, 'ORCA_resolution', ldstop = .FALSE. ) > 0 ) THEN 525 ! 526 cd_cfg = 'ORCA' 527 CALL iom_get( inum, 'ORCA_resolution', zorca_res ) ; kk_cfg = INT( zorca_res ) 528 ! 529 WRITE(ldtxt(ii),*) ' ' ; ii = ii+1 530 WRITE(ldtxt(ii),*) ' ==>>> ORCA configuration ' ; ii = ii+1 531 WRITE(ldtxt(ii),*) ' ' ; ii = ii+1 532 ! 533 ELSE !- cd_cfg & k_cfg are not used 534 cd_cfg = 'UNKNOWN' 535 kk_cfg = -9999999 536 ENDIF 537 ! 538 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 539 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 540 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 541 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 542 CALL iom_close( inum ) 543 ! 544 WRITE(ldtxt(ii),*) ' cn_cfg = ', TRIM(cd_cfg), ' nn_cfg = ', kk_cfg ; ii = ii+1 545 WRITE(ldtxt(ii),*) ' jpiglo = ', jpiglo ; ii = ii+1 546 WRITE(ldtxt(ii),*) ' jpjglo = ', jpjglo , ' jpkglo = ', jpkglo ; ii = ii +1 547 WRITE(ldtxt(ii),*) ' jpkglo = ', jpkglo ; ii = ii +1 548 WRITE(ldtxt(ii),*) ' type of global domain lateral boundary jperio = ', jperio ; ii = ii +1 549 ! 550 END SUBROUTINE domain_cfg 551 552 494 553 SUBROUTINE cfg_write 495 554 !!---------------------------------------------------------------------- 496 555 !! *** ROUTINE cfg_write *** 497 556 !! 498 !! ** Purpose : Create the " domain_cfg" file, a NetCDF file which557 !! ** Purpose : Create the "cn_domcfg_out" file, a NetCDF file which 499 558 !! contains all the ocean domain informations required to 500 559 !! define an ocean configuration. … … 503 562 !! ocean configuration. 504 563 !! 505 !! ** output file : domain_cfg.nc : domain size, characteristics, horizontal mesh, 506 !! Coriolis parameter, depth and vertical scale factors 564 !! ** output file : domcfg_out.nc : domain size, characteristics, horizontal 565 !! mesh, Coriolis parameter, and vertical scale factors 566 !! NB: also contain ORCA family information 507 567 !!---------------------------------------------------------------------- 508 568 INTEGER :: ji, jj, jk ! dummy loop indices 509 569 INTEGER :: izco, izps, isco, icav 510 INTEGER :: inum ! temprary units for 'domain_cfg.nc' file570 INTEGER :: inum ! local units 511 571 CHARACTER(len=21) :: clnam ! filename (mesh and mask informations) 512 572 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! workspace … … 514 574 ! 515 575 IF(lwp) WRITE(numout,*) 516 IF(lwp) WRITE(numout,*) 'cfg_write : create the "domain_cfg.nc" file containing all required configuration information'576 IF(lwp) WRITE(numout,*) 'cfg_write : create the domain configuration file (', TRIM(cn_domcfg_out),'.nc)' 517 577 IF(lwp) WRITE(numout,*) '~~~~~~~~~' 518 578 ! 519 579 ! ! ============================= ! 520 ! ! create 'dom ain_cfg.nc' file !580 ! ! create 'domcfg_out.nc' file ! 521 581 ! ! ============================= ! 522 582 ! 523 clnam = 'dom ain_cfg' ! filename (configuration information)583 clnam = 'domcfg_out' ! filename (configuration information) 524 584 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE., kiolib = jprstlib ) 525 585 586 ! 587 ! !== ORCA family specificities ==! 588 IF( cn_cfg == "ORCA" ) THEN 589 CALL iom_rstput( 0, 0, inum, 'ORCA' , 1._wp , ktype = jp_i4 ) 590 CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( nn_cfg, wp), ktype = jp_i4 ) 591 ENDIF 592 ! 526 593 ! !== global domain size ==! 527 594 ! … … 574 641 ! !== vertical mesh ==! 575 642 ! 576 CALL iom_rstput( 0, 0, inum, 'e3t_1d' , e3t_1d 577 CALL iom_rstput( 0, 0, inum, 'e3w_1d' , e3w_1d 578 ! 579 CALL iom_rstput( 0, 0, inum, 'e3t_0' , e3t_0 580 CALL iom_rstput( 0, 0, inum, 'e3u_0' , e3u_0 581 CALL iom_rstput( 0, 0, inum, 'e3v_0' , e3v_0 582 CALL iom_rstput( 0, 0, inum, 'e3f_0' , e3f_0 583 CALL iom_rstput( 0, 0, inum, 'e3w_0' , e3w_0 584 CALL iom_rstput( 0, 0, inum, 'e3uw_0' , e3uw_0 585 CALL iom_rstput( 0, 0, inum, 'e3vw_0' , e3vw_0 643 CALL iom_rstput( 0, 0, inum, 'e3t_1d' , e3t_1d , ktype = jp_r8 ) ! reference 1D-coordinate 644 CALL iom_rstput( 0, 0, inum, 'e3w_1d' , e3w_1d , ktype = jp_r8 ) 645 ! 646 CALL iom_rstput( 0, 0, inum, 'e3t_0' , e3t_0 , ktype = jp_r8 ) ! vertical scale factors 647 CALL iom_rstput( 0, 0, inum, 'e3u_0' , e3u_0 , ktype = jp_r8 ) 648 CALL iom_rstput( 0, 0, inum, 'e3v_0' , e3v_0 , ktype = jp_r8 ) 649 CALL iom_rstput( 0, 0, inum, 'e3f_0' , e3f_0 , ktype = jp_r8 ) 650 CALL iom_rstput( 0, 0, inum, 'e3w_0' , e3w_0 , ktype = jp_r8 ) 651 CALL iom_rstput( 0, 0, inum, 'e3uw_0' , e3uw_0 , ktype = jp_r8 ) 652 CALL iom_rstput( 0, 0, inum, 'e3vw_0' , e3vw_0 , ktype = jp_r8 ) 586 653 ! 587 654 ! !== wet top and bottom level ==! (caution: multiplied by ssmask) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
r6894 r7200 21 21 !!---------------------------------------------------------------------- 22 22 !! dom_hgr : initialize the horizontal mesh 23 !! hgr_read : read "coordinate" NetCDFfile23 !! hgr_read : read horizontal information in the domain configuration file 24 24 !!---------------------------------------------------------------------- 25 25 USE dom_oce ! ocean space and time domain … … 91 91 IF( ln_read_cfg ) THEN !== read in mesh_mask.nc file ==! 92 92 IF(lwp) WRITE(numout,*) 93 IF(lwp) WRITE(numout,*) ' read horizontal mesh in "domain_cfg"file'93 IF(lwp) WRITE(numout,*) ' read horizontal mesh in ', TRIM( cn_domcfg ), ' file' 94 94 ! 95 95 CALL hgr_read ( glamt , glamu , glamv , glamf , & ! geographic position (required) … … 121 121 ELSE 122 122 IF( ln_read_cfg ) THEN 123 IF(lwp) WRITE(numout,*) ' Coriolis parameter have been read in "domain_cfg"file'123 IF(lwp) WRITE(numout,*) ' Coriolis parameter have been read in ', TRIM( cn_domcfg ), ' file' 124 124 ELSE 125 125 IF(lwp) WRITE(numout,*) ' Coriolis parameter have been set in usr_def_hgr routine' … … 186 186 ENDIF 187 187 ! 188 CALL iom_open( 'domain_cfg', inum )188 CALL iom_open( cn_domcfg, inum ) 189 189 ! 190 190 CALL iom_get( inum, jpdom_data, 'glamt', plamt, lrowattr=ln_use_jattr ) … … 210 210 IF( iom_varid( inum, 'ff_f', ldstop = .FALSE. ) > 0 .AND. & 211 211 & iom_varid( inum, 'ff_t', ldstop = .FALSE. ) > 0 ) THEN 212 IF(lwp) WRITE(numout,*) ' Coriolis factor at f- and t-points read in domain_cfgfile'212 IF(lwp) WRITE(numout,*) ' Coriolis factor at f- and t-points read in ', TRIM( cn_domcfg ), ' file' 213 213 CALL iom_get( inum, jpdom_data, 'ff_f' , pff_f , lrowattr=ln_use_jattr ) 214 214 CALL iom_get( inum, jpdom_data, 'ff_t' , pff_t , lrowattr=ln_use_jattr ) … … 219 219 ! 220 220 IF( iom_varid( inum, 'e1e2u', ldstop = .FALSE. ) > 0 ) THEN 221 IF(lwp) WRITE(numout,*) ' e1e2u & e1e2v read in domain_cfgfile'221 IF(lwp) WRITE(numout,*) ' e1e2u & e1e2v read in ', TRIM( cn_domcfg ), ' file' 222 222 CALL iom_get( inum, jpdom_data, 'e1e2u' , pe1e2u , lrowattr=ln_use_jattr ) 223 223 CALL iom_get( inum, jpdom_data, 'e1e2v' , pe1e2v , lrowattr=ln_use_jattr ) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
r7111 r7200 140 140 END DO 141 141 END DO 142 !SF add here lbc_lnk: bug not still understood : cause now domain_cfg is read ! 142 !SF add here lbc_lnk: bug not still understood : cause now domain configuration is read ! 143 !!gm I don't understand why... 143 144 CALL lbc_lnk( tmask , 'T', 1._wp ) ! Lateral boundary conditions 144 145 … … 263 264 ! -------------------------------- 264 265 ! 265 CALL usr_def_fmask( c p_cfg, jp_cfg, fmask )266 CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 266 267 ! 267 268 ! -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r6667 r7200 232 232 END DO 233 233 END DO 234 IF( c p_cfg == "orca" .AND. jp_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2234 IF( cn_cfg == "orca" .AND. nn_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 235 235 ii0 = 103 ; ii1 = 111 236 236 ij0 = 128 ; ij1 = 135 ; -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
r7189 r7200 23 23 !!---------------------------------------------------------------------- 24 24 !! dom_zgr : read or set the ocean vertical coordinate system 25 !! zgr_read : read the vertical domain coordinate and mask in domain_cfgfile25 !! zgr_read : read the vertical information in the domain configuration file 26 26 !! zgr_top_bot : ocean top and bottom level for t-, u, and v-points with 1 as minimum value 27 27 !!--------------------------------------------------------------------- … … 89 89 IF( ln_read_cfg ) THEN !== read in mesh_mask.nc file ==! 90 90 IF(lwp) WRITE(numout,*) 91 IF(lwp) WRITE(numout,*) ' Read vertical mesh in "domain_cfg"file'91 IF(lwp) WRITE(numout,*) ' Read vertical mesh in ', TRIM( cn_domcfg ), ' file' 92 92 ! 93 93 CALL zgr_read ( ln_zco , ln_zps , ln_sco, ln_isfcav, & … … 120 120 IF(lwp) THEN ! Control print 121 121 WRITE(numout,*) 122 WRITE(numout,*) ' Type of vertical coordinate (read in domain_cfg.nc or set through user defined routines) :'122 WRITE(numout,*) ' Type of vertical coordinate (read in ', TRIM( cn_domcfg ), ' file or set in userdef_nam) :' 123 123 WRITE(numout,*) ' z-coordinate - full steps ln_zco = ', ln_zco 124 124 WRITE(numout,*) ' z-coordinate - partial steps ln_zps = ', ln_zps … … 178 178 !! *** ROUTINE zgr_read *** 179 179 !! 180 !! ** Purpose : Read the vertical information in a domain_cfg.ncfile180 !! ** Purpose : Read the vertical information in the domain configuration file 181 181 !! 182 182 !!---------------------------------------------------------------------- … … 198 198 IF(lwp) THEN 199 199 WRITE(numout,*) 200 WRITE(numout,*) ' zgr_read : read the vertical coordinates in "domain_cfg.nc"file'201 WRITE(numout,*) ' ~~~~~~~~ jpiglo = ', jpiglo, ' jpjglo = ', jpjglo, ' jpkglo = ', jpkglo202 ENDIF 203 ! 204 CALL iom_open( 'domain_cfg', inum )205 ! 206 ! !type of vertical coordinate200 WRITE(numout,*) ' zgr_read : read the vertical coordinates in ', TRIM( cn_domcfg ), ' file' 201 WRITE(numout,*) ' ~~~~~~~~' 202 ENDIF 203 ! 204 CALL iom_open( cn_domcfg, inum ) 205 ! 206 ! !* type of vertical coordinate 207 207 CALL iom_get( inum, 'ln_zco' , z_zco ) 208 208 CALL iom_get( inum, 'ln_zps' , z_zps ) … … 212 212 IF( z_sco == 0._wp ) THEN ; ld_sco = .false. ; ELSE ; ld_sco = .true. ; ENDIF 213 213 ! 214 ! !ocean cavities under iceshelves214 ! !* ocean cavities under iceshelves 215 215 CALL iom_get( inum, 'ln_isfcav', z_cav ) 216 216 IF( z_cav == 0._wp ) THEN ; ld_isfcav = .false. ; ELSE ; ld_isfcav = .true. ; ENDIF 217 217 ! 218 ! ! 1D vertical scale factors (reference coordinate)219 CALL iom_get( inum, jpdom_unknown, 'e3t_1d' , pe3t_1d ) 218 ! !* vertical scale factors 219 CALL iom_get( inum, jpdom_unknown, 'e3t_1d' , pe3t_1d ) ! 1D reference coordinate 220 220 CALL iom_get( inum, jpdom_unknown, 'e3w_1d' , pe3w_1d ) 221 221 ! 222 ! ! 3D vertical scale factors 223 CALL iom_get( inum, jpdom_data, 'e3t_0' , pe3t , lrowattr=ln_use_jattr ) 222 CALL iom_get( inum, jpdom_data, 'e3t_0' , pe3t , lrowattr=ln_use_jattr ) ! 3D coordinate 224 223 CALL iom_get( inum, jpdom_data, 'e3u_0' , pe3u , lrowattr=ln_use_jattr ) 225 224 CALL iom_get( inum, jpdom_data, 'e3v_0' , pe3v , lrowattr=ln_use_jattr ) … … 229 228 CALL iom_get( inum, jpdom_data, 'e3vw_0' , pe3vw , lrowattr=ln_use_jattr ) 230 229 ! 231 ! ! 1D & 3D depths 232 ! 233 ! ! old depth definition (obsolescent feature) 230 ! !* depths 231 ! !- old depth definition (obsolescent feature) 234 232 IF( iom_varid( inum, 'gdept_1d', ldstop = .FALSE. ) > 0 .AND. & 235 233 & iom_varid( inum, 'gdepw_1d', ldstop = .FALSE. ) > 0 .AND. & … … 237 235 & iom_varid( inum, 'gdepw_0' , ldstop = .FALSE. ) > 0 ) THEN 238 236 CALL ctl_warn( 'zgr_read : old definition of depths and scale factors used ', & 239 & 'depths at t- and w-points read in domain_cfgfile')237 & ' depths at t- and w-points read in the domain configuration file') 240 238 CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d ) 241 239 CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) … … 243 241 CALL iom_get( inum, jpdom_data , 'gdepw_0' , pdepw , lrowattr=ln_use_jattr ) 244 242 ! 245 ELSE ! depths computed from e3. scale factors 246 ! 243 ELSE !- depths computed from e3. scale factors 247 244 CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d ) ! 1D reference depth 245 CALL e3_to_depth( pe3t , pe3w , pdept , pdepw ) ! 3D depths 248 246 IF(lwp) THEN 249 247 WRITE(numout,*) … … 252 250 WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk ) 253 251 ENDIF 254 ! 255 CALL e3_to_depth( pe3t , pe3w , pdept , pdepw ) ! 3D depths 256 ! 257 ENDIF 258 ! 259 ! ! ocean top and bottom level 260 CALL iom_get( inum, jpdom_data, 'bottom_level' , z2d , lrowattr=ln_use_jattr ) ! nb of ocean T-points 252 ENDIF 253 ! 254 ! !* ocean top and bottom level 255 CALL iom_get( inum, jpdom_data, 'top_level' , z2d , lrowattr=ln_use_jattr ) ! 1st wet T-points (ISF) 256 k_top(:,:) = INT( z2d(:,:) ) 257 CALL iom_get( inum, jpdom_data, 'bottom_level' , z2d , lrowattr=ln_use_jattr ) ! last wet T-points 261 258 k_bot(:,:) = INT( z2d(:,:) ) 262 CALL iom_get( inum, jpdom_data, 'top_level' , z2d , lrowattr=ln_use_jattr ) ! nb of ocean T-points (ISF)263 k_top(:,:) = INT( z2d(:,:) )264 259 ! 265 260 CALL iom_close( inum ) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
r6580 r7200 155 155 ! 156 156 ! 157 !!gm This should be removed from the code ===>>>> T & S files has to be changed 158 ! 157 159 ! !== ORCA_R2 configuration and T & S damping ==! 158 IF( c p_cfg == "orca" .AND. jp_cfg == 2 .AND. ln_tsd_tradmp ) THEN ! some hand made alterations160 IF( cn_cfg == "orca" .AND. nn_cfg == 2 .AND. ln_tsd_tradmp ) THEN ! some hand made alterations 159 161 ! 160 162 ij0 = 101 ; ij1 = 109 ! Reduced T & S in the Alboran Sea … … 178 180 sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 ) = 6.0_wp 179 181 ENDIF 182 !!gm end 180 183 ! 181 184 ptsd(:,:,:,jp_tem) = sf_tsd(jp_tem)%fnow(:,:,:) ! NO mask -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90
r6977 r7200 6 6 !! FOR USING THIS VERSION, A PREPROCESSING TRAITMENT IS RECOMMENDED 7 7 !! FOR DEFINING BETTER CUTTING OUT. 8 !! This routine requires the presence of the "domain_cfg.nc"file.8 !! This routine requires the presence of the domain configuration file. 9 9 !! In this version, the land processors are avoided and the adress 10 10 !! processor (nproc, narea,noea, ...) are calculated again. … … 37 37 !! ! 1998-05 (M. Imbard, J. Escobar, L. Colombet ) SHMEM and MPI versions 38 38 !! NEMO 1.0 ! 2004-01 (G. Madec, J.M Molines) F90 : free form , north fold jpni > 1 39 !! 4.0 ! 2016-06 (G. Madec) use domain _cfgfile instead of bathymetry file39 !! 4.0 ! 2016-06 (G. Madec) use domain configuration file instead of bathymetry file 40 40 !!---------------------------------------------------------------------- 41 41 USE in_out_manager ! I/O Manager … … 83 83 ! 0. initialisation 84 84 ! ----------------- 85 CALL iom_open( 'domain_cfg', inum )85 CALL iom_open( cn_domcfg, inum ) 86 86 ! 87 87 ! ! ocean top and bottom level -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90
r6596 r7200 558 558 END DO 559 559 560 !!gm IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! ORCA R2561 !!gm DO jj = 2, jpjm1562 !!gm DO ji = fs_2, fs_jpim1 ! vector opt.563 !!gm ! Take the minimum between aeiw and 1000 m2/s over shelves (depth shallower than 650 m)564 !!gm IF( mbkt(ji,jj) <= 20 ) zaeiw(ji,jj) = MIN( zaeiw(ji,jj), 1000. )565 !!gm END DO566 !!gm END DO567 !!gm ENDIF568 569 560 ! !== Bound on eiv coeff. ==! 570 561 z1_f20 = 1._wp / ( 2._wp * omega * sin( rad * 20._wp ) ) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r6900 r7200 378 378 ! (update freshwater fluxes) 379 379 ! Should not be ran if ln_diurnal_only 380 IF( .NOT. (ln_diurnal_only) .AND. (nn_closea == 1) ) CALL sbc_clo( kt)380 IF( .NOT.ln_diurnal_only .AND. nn_closea == 1 ) CALL sbc_clo( kt, cn_cfg, nn_cfg ) 381 381 382 382 !RBbug do not understand why see ticket 667 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
r6900 r7200 38 38 REAL(wp) :: r1_6 = 1._wp / 6._wp ! =1/6 39 39 40 ! ! tridiag solver associated indices: 41 INTEGER, PARAMETER :: np_NH = 0 ! Neumann homogeneous boundary condition 42 INTEGER, PARAMETER :: np_CEN2 = 1 ! 2nd order centered boundary condition 43 40 44 !! * Substitutions 41 45 # include "vectopt_loop_substitute.h90" … … 706 710 707 711 708 SUBROUTINE interp_4th_cpt ( pt_in, pt_out )709 !!---------------------------------------------------------------------- 710 !! *** ROUTINE interp_4th_cpt ***712 SUBROUTINE interp_4th_cpt_org( pt_in, pt_out ) 713 !!---------------------------------------------------------------------- 714 !! *** ROUTINE interp_4th_cpt_org *** 711 715 !! 712 716 !! ** Purpose : Compute the interpolation of tracer at w-point … … 739 743 END DO 740 744 ! 741 jk =2! Switch to second order centered at top742 DO jj =1,jpj743 DO ji =1,jpi745 jk = 2 ! Switch to second order centered at top 746 DO jj = 1, jpj 747 DO ji = 1, jpi 744 748 zwd (ji,jj,jk) = 1._wp 745 749 zwi (ji,jj,jk) = 0._wp … … 789 793 END DO 790 794 ! 795 END SUBROUTINE interp_4th_cpt_org 796 797 798 SUBROUTINE interp_4th_cpt( pt_in, pt_out ) 799 !!---------------------------------------------------------------------- 800 !! *** ROUTINE interp_4th_cpt *** 801 !! 802 !! ** Purpose : Compute the interpolation of tracer at w-point 803 !! 804 !! ** Method : 4th order compact interpolation 805 !!---------------------------------------------------------------------- 806 REAL(wp),DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pt_in ! field at t-point 807 REAL(wp),DIMENSION(jpi,jpj,jpk), INTENT( out) :: pt_out ! field interpolated at w-point 808 ! 809 INTEGER :: ji, jj, jk ! dummy loop integers 810 INTEGER :: ikt, ikb ! local integers 811 REAL(wp),DIMENSION(jpi,jpj,jpk) :: zwd, zwi, zws, zwrm, zwt 812 !!---------------------------------------------------------------------- 813 ! 814 ! !== build the three diagonal matrix & the RHS ==! 815 ! 816 DO jk = 3, jpkm1 ! interior (from jk=3 to jpk-1) 817 DO jj = 2, jpjm1 818 DO ji = fs_2, fs_jpim1 819 zwd (ji,jj,jk) = 3._wp * wmask(ji,jj,jk) + 1._wp ! diagonal 820 zwi (ji,jj,jk) = wmask(ji,jj,jk) ! lower diagonal 821 zws (ji,jj,jk) = wmask(ji,jj,jk) ! upper diagonal 822 zwrm(ji,jj,jk) = 3._wp * wmask(ji,jj,jk) & ! RHS 823 & * ( pt_in(ji,jj,jk) + pt_in(ji,jj,jk-1) ) 824 END DO 825 END DO 826 END DO 827 ! 828 !!gm 829 ! SELECT CASE( kbc ) !* boundary condition 830 ! CASE( np_NH ) ! Neumann homogeneous at top & bottom 831 ! CASE( np_CEN2 ) ! 2nd order centered at top & bottom 832 ! END SELECT 833 !!gm 834 ! 835 DO jj = 2, jpjm1 ! 2nd order centered at top & bottom 836 DO ji = fs_2, fs_jpim1 837 ikt = mikt(ji,jj) + 1 ! w-point below the 1st wet point 838 ikb = mbkt(ji,jj) ! - above the last wet point 839 ! 840 zwd (ji,jj,ikt) = 1._wp ! top 841 zwi (ji,jj,ikt) = 0._wp 842 zws (ji,jj,ikt) = 0._wp 843 zwrm(ji,jj,ikt) = 0.5_wp * ( pt_in(ji,jj,jk-1) + pt_in(ji,jj,jk) ) 844 ! 845 zwd (ji,jj,ikb) = 1._wp ! bottom 846 zwi (ji,jj,ikb) = 0._wp 847 zws (ji,jj,ikb) = 0._wp 848 zwrm(ji,jj,ikb) = 0.5_wp * ( pt_in(ji,jj,jk-1) + pt_in(ji,jj,jk) ) 849 END DO 850 END DO 851 ! 852 ! !== tridiagonal solver ==! 853 ! 854 DO jj = 2, jpjm1 !* 1st recurrence: Tk = Dk - Ik Sk-1 / Tk-1 855 DO ji = fs_2, fs_jpim1 856 zwt(ji,jj,2) = zwd(ji,jj,2) 857 END DO 858 END DO 859 DO jk = 3, jpkm1 860 DO jj = 2, jpjm1 861 DO ji = fs_2, fs_jpim1 862 zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) /zwt(ji,jj,jk-1) 863 END DO 864 END DO 865 END DO 866 ! 867 DO jj = 2, jpjm1 !* 2nd recurrence: Zk = Yk - Ik / Tk-1 Zk-1 868 DO ji = fs_2, fs_jpim1 869 pt_out(ji,jj,2) = zwrm(ji,jj,2) 870 END DO 871 END DO 872 DO jk = 3, jpkm1 873 DO jj = 2, jpjm1 874 DO ji = fs_2, fs_jpim1 875 pt_out(ji,jj,jk) = zwrm(ji,jj,jk) - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) *pt_out(ji,jj,jk-1) 876 END DO 877 END DO 878 END DO 879 880 DO jj = 2, jpjm1 !* 3d recurrence: Xk = (Zk - Sk Xk+1 ) / Tk 881 DO ji = fs_2, fs_jpim1 882 pt_out(ji,jj,jpkm1) = pt_out(ji,jj,jpkm1) / zwt(ji,jj,jpkm1) 883 END DO 884 END DO 885 DO jk = jpk-2, 2, -1 886 DO jj = 2, jpjm1 887 DO ji = fs_2, fs_jpim1 888 pt_out(ji,jj,jk) = ( pt_out(ji,jj,jk) - zws(ji,jj,jk) * pt_out(ji,jj,jk+1) ) / zwt(ji,jj,jk) 889 END DO 890 END DO 891 END DO 892 ! 791 893 END SUBROUTINE interp_4th_cpt 792 894 895 896 SUBROUTINE tridia_solver( pD, pU, pL, pRHS, pt_out , klev ) 897 !!---------------------------------------------------------------------- 898 !! *** ROUTINE tridia_solver *** 899 !! 900 !! ** Purpose : solve a symmetric 3diagonal system 901 !! 902 !! ** Method : solve M.t_out = RHS(t) where M is a tri diagonal matrix ( jpk*jpk ) 903 !! 904 !! ( D_1 U_1 0 0 0 )( t_1 ) ( RHS_1 ) 905 !! ( L_2 D_2 U_2 0 0 )( t_2 ) ( RHS_2 ) 906 !! ( 0 L_3 D_3 U_3 0 )( t_3 ) = ( RHS_3 ) 907 !! ( ... )( ... ) ( ... ) 908 !! ( 0 0 0 L_k D_k )( t_k ) ( RHS_k ) 909 !! 910 !! M is decomposed in the product of an upper and lower triangular matrix. 911 !! The tri-diagonals matrix is given as input 3D arrays: pD, pU, pL 912 !! (i.e. the Diagonal, the Upper diagonal, and the Lower diagonal). 913 !! The solution is pta. 914 !! The 3d array zwt is used as a work space array. 915 !!---------------------------------------------------------------------- 916 REAL(wp),DIMENSION(:,:,:), INTENT(in ) :: pD, pU, PL ! 3-diagonal matrix 917 REAL(wp),DIMENSION(:,:,:), INTENT(in ) :: pRHS ! Right-Hand-Side 918 REAL(wp),DIMENSION(:,:,:), INTENT( out) :: pt_out !!gm field at level=F(klev) 919 INTEGER , INTENT(in ) :: klev ! =1 pt_out at w-level 920 ! ! =0 pt at t-level 921 INTEGER :: ji, jj, jk ! dummy loop integers 922 INTEGER :: kstart ! local indices 923 REAL(wp),DIMENSION(jpi,jpj,jpk) :: zwt ! 3D work array 924 !!---------------------------------------------------------------------- 925 ! 926 kstart = 1 + klev 927 ! 928 DO jj = 2, jpjm1 !* 1st recurrence: Tk = Dk - Ik Sk-1 / Tk-1 929 DO ji = fs_2, fs_jpim1 930 zwt(ji,jj,kstart) = pD(ji,jj,kstart) 931 END DO 932 END DO 933 DO jk = kstart+1, jpkm1 934 DO jj = 2, jpjm1 935 DO ji = fs_2, fs_jpim1 936 zwt(ji,jj,jk) = pD(ji,jj,jk) - pL(ji,jj,jk) * pU(ji,jj,jk-1) /zwt(ji,jj,jk-1) 937 END DO 938 END DO 939 END DO 940 ! 941 DO jj = 2, jpjm1 !* 2nd recurrence: Zk = Yk - Ik / Tk-1 Zk-1 942 DO ji = fs_2, fs_jpim1 943 pt_out(ji,jj,kstart) = pRHS(ji,jj,kstart) 944 END DO 945 END DO 946 DO jk = kstart+1, jpkm1 947 DO jj = 2, jpjm1 948 DO ji = fs_2, fs_jpim1 949 pt_out(ji,jj,jk) = pRHS(ji,jj,jk) - pL(ji,jj,jk) / zwt(ji,jj,jk-1) *pt_out(ji,jj,jk-1) 950 END DO 951 END DO 952 END DO 953 954 DO jj = 2, jpjm1 !* 3d recurrence: Xk = (Zk - Sk Xk+1 ) / Tk 955 DO ji = fs_2, fs_jpim1 956 pt_out(ji,jj,jpkm1) = pt_out(ji,jj,jpkm1) / zwt(ji,jj,jpkm1) 957 END DO 958 END DO 959 DO jk = jpk-2, kstart, -1 960 DO jj = 2, jpjm1 961 DO ji = fs_2, fs_jpim1 962 pt_out(ji,jj,jk) = ( pt_out(ji,jj,jk) - pU(ji,jj,jk) * pt_out(ji,jj,jk+1) ) / zwt(ji,jj,jk) 963 END DO 964 END DO 965 END DO 966 ! 967 END SUBROUTINE tridia_solver 968 793 969 !!====================================================================== 794 970 END MODULE traadv_fct -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
r6717 r7200 545 545 CALL wrk_dealloc( jpi, jpj, zmbk ) 546 546 547 547 ! !* sign of grad(H) at u- and v-points 548 548 mgrhu(jpi,:) = 0 ; mgrhu(:,jpj) = 0 ; mgrhv(jpi,:) = 0 ; mgrhv(:,jpj) = 0 549 549 DO jj = 1, jpjm1 … … 553 553 END DO 554 554 END DO 555 555 ! 556 556 DO jj = 1, jpjm1 !* bbl thickness at u- (v-) point 557 557 DO ji = 1, jpim1 ! minimum of top & bottom e3u_0 (e3v_0) … … 561 561 END DO 562 562 CALL lbc_lnk( e3u_bbl_0, 'U', 1. ) ; CALL lbc_lnk( e3v_bbl_0, 'V', 1. ) ! lateral boundary conditions 563 563 ! 564 564 ! !* masked diffusive flux coefficients 565 565 ahu_bbl_0(:,:) = rn_ahtbbl * e2_e1u(:,:) * e3u_bbl_0(:,:) * umask(:,:,1) 566 566 ahv_bbl_0(:,:) = rn_ahtbbl * e1_e2v(:,:) * e3v_bbl_0(:,:) * vmask(:,:,1) 567 567 568 569 IF( cp_cfg == "orca" ) THEN !* ORCA configuration : regional enhancement of ah_bbl570 !571 SELECT CASE ( jp_cfg )572 CASE ( 2 ) ! ORCA_R2573 ij0 = 102 ; ij1 = 102 ! Gibraltar enhancement of BBL574 ii0 = 139 ; ii1 = 140575 ahu_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1)) = 4.e0*ahu_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1))576 ahv_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1)) = 4.e0*ahv_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1))577 !578 ij0 = 88 ; ij1 = 88 ! Red Sea enhancement of BBL579 ii0 = 161 ; ii1 = 162580 ahu_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1)) = 10.e0*ahu_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1))581 ahv_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1)) = 10.e0*ahv_bbl_0(mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1))582 !583 END SELECT584 !585 ENDIF586 568 ! 587 569 IF( nn_timing == 1 ) CALL timing_stop( 'tra_bbl_init') -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_closea.F90
r6923 r7200 35 35 PRIVATE 36 36 37 PUBLIC dom_clo ! routinecalled by domain module38 PUBLIC sbc_clo ! routinecalled by step module39 PUBLIC clo_rnf ! routinecalled by sbcrnf module40 PUBLIC clo_bat ! routinecalled in domzgr module37 PUBLIC dom_clo ! called by domain module 38 PUBLIC sbc_clo ! called by step module 39 PUBLIC clo_rnf ! called by sbcrnf module 40 PUBLIC clo_bat ! called in domzgr module 41 41 42 42 INTEGER, PUBLIC, PARAMETER :: jpncs = 4 !: number of closed sea … … 75 75 !! =2 put at location runoff 76 76 !!---------------------------------------------------------------------- 77 CHARACTER(len= 1), INTENT(in ) :: cd_cfg ! configuration name77 CHARACTER(len=*), INTENT(in ) :: cd_cfg ! configuration name 78 78 INTEGER , INTENT(in ) :: kcfg ! configuration identifier 79 79 ! … … 177 177 178 178 179 SUBROUTINE sbc_clo( kt )179 SUBROUTINE sbc_clo( kt, cd_cfg, kcfg ) 180 180 !!--------------------------------------------------------------------- 181 181 !! *** ROUTINE sbc_clo *** … … 189 189 !! ** Action : emp updated surface freshwater fluxes and associated heat content at kt 190 190 !!---------------------------------------------------------------------- 191 INTEGER, INTENT(in) :: kt ! ocean model time step 191 INTEGER , INTENT(in ) :: kt ! ocean model time step 192 CHARACTER(len=*), INTENT(in ) :: cd_cfg ! configuration name 193 INTEGER , INTENT(in ) :: kcfg ! configuration identifier 192 194 ! 193 195 INTEGER :: ji, jj, jc, jn ! dummy loop indices … … 272 274 ENDIF 273 275 274 IF( c p_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! Black Sea case for ORCA_R2 configuration276 IF( cd_cfg == "orca" .AND. kcfg == 2 ) THEN ! Black Sea case for ORCA_R2 configuration 275 277 zze2 = ( zfwf(3) + zfwf(4) ) * 0.5_wp 276 278 zfwf(3) = zze2 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_nam.F90
r6923 r7200 38 38 CONTAINS 39 39 40 SUBROUTINE usr_def_nam( ldtxt, ldnam, kpi, kpj, kpk, kperio )40 SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 41 41 !!---------------------------------------------------------------------- 42 42 !! *** ROUTINE dom_nam *** … … 51 51 !!---------------------------------------------------------------------- 52 52 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information 53 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 56 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. … … 66 68 ! 67 69 WRITE( ldnam(:), namusr_def ) 70 ! 71 cd_cfg = 'GYRE' ! name & resolution (not used) 72 kk_cfg = nn_GYRE 68 73 ! 69 74 kpi = 30 * nn_GYRE + 2 ! Global Domain size -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90
r7188 r7200 112 112 !! e3t_1d(jpk) = 2 * ( dept_1d(jpk) - depw_1d(jpk) ) 113 113 !! The depth are then re-computed from the sum of e3. This ensures 114 !! that depths are identical when reading domain _cfg.nc file. Indeed,115 !! Only e3. are saved in this file, depth are compute by a call to116 !! t he e3_to_depth subroutine.114 !! that depths are identical when reading domain configuration file. 115 !! Indeed, only e3. are saved in this file, depth are compute by a call 116 !! to the e3_to_depth subroutine. 117 117 !! 118 118 !! Here the Madec & Imbard (1996) function is used. -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r7188 r7200 46 46 !!---------------------------------------------------------------------- 47 47 USE step_oce ! module used in the ocean time stepping module (step.F90) 48 USE mppini ! shared/distributed memory setting (mpp_init routine) 49 USE domain ! domain initialization (dom_init routine) 50 #if defined key_nemocice_decomp 51 USE ice_domain_size, only: nx_global, ny_global 52 #endif 48 USE phycst ! physical constant (par_cst routine) 49 USE domain ! domain initialization (dom_init & dom_cfg routines) 50 USE usrdef_nam ! user defined configuration 53 51 USE tideini ! tidal components initialization (tide_ini routine) 54 52 USE bdyini ! open boundary cond. setting (bdy_init routine) … … 60 58 USE ldftra ! lateral diffusivity setting (ldftra_init routine) 61 59 USE zdfini ! vertical physics setting (zdf_init routine) 62 USE phycst ! physical constant (par_cst routine)63 60 USE trdini ! dyn/tra trends initialization (trd_init routine) 64 61 USE asminc ! assimilation increments … … 68 65 USE diaobs ! Observation diagnostics (dia_obs_init routine) 69 66 USE diacfl ! CFL diagnostics (dia_cfl_init routine) 70 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)71 67 USE step ! NEMO time-stepping (stp routine) 72 68 USE icbini ! handle bergs, initialisation … … 78 74 USE stopar ! Stochastic param.: ??? 79 75 USE stopts ! Stochastic param.: ??? 76 USE diurnal_bulk ! diurnal bulk SST 77 USE step_diu ! diurnal bulk SST timestepping (called from here if run offline) 78 USE crsini ! initialise grid coarsening utility 79 USE diatmb ! Top,middle,bottom output 80 USE dia25h ! 25h mean output 81 USE sbc_oce , ONLY : lk_oasis 82 USE wet_dry ! Wetting and drying setting (wad_init routine) 80 83 #if defined key_top 81 84 USE trcini ! passive tracer initialisation 82 85 #endif 86 #if defined key_nemocice_decomp 87 USE ice_domain_size, only: nx_global, ny_global 88 #endif 89 ! 83 90 USE lib_mpp ! distributed memory computing 84 USE diurnal_bulk ! diurnal bulk SST 85 USE step_diu ! diurnal bulk SST timestepping (called from here if run offline) 91 USE mppini ! shared/distributed memory setting (mpp_init routine) 92 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 93 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 86 94 #if defined key_iomput 87 95 USE xios ! xIOserver 88 96 #endif 89 USE crsini ! initialise grid coarsening utility90 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges91 USE sbc_oce, ONLY : lk_oasis92 USE diatmb ! Top,middle,bottom output93 USE dia25h ! 25h mean output94 USE wet_dry ! Wetting and drying setting (wad_init routine)95 USE usrdef_nam ! user defined configuration96 97 97 98 IMPLICIT NONE … … 125 126 !! Madec, 2008, internal report, IPSL. 126 127 !!---------------------------------------------------------------------- 127 INTEGER :: istp 128 INTEGER :: istp ! time step index 128 129 !!---------------------------------------------------------------------- 129 130 ! … … 196 197 ! !== finalize the run ==! 197 198 ! !------------------------! 198 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA199 ! 200 IF( nstop /= 0 .AND. lwp ) THEN ! error print199 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 200 ! 201 IF( nstop /= 0 .AND. lwp ) THEN ! error print 201 202 WRITE(numout,cform_err) 202 203 WRITE(numout,*) nstop, ' error have been found' … … 216 217 ! 217 218 #if defined key_iomput 218 CALL xios_finalize ! end mpp communications with xios219 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS219 CALL xios_finalize ! end mpp communications with xios 220 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 220 221 #else 221 222 IF( lk_oasis ) THEN 222 CALL cpl_finalize ! end coupling and mpp communications with OASIS223 CALL cpl_finalize ! end coupling and mpp communications with OASIS 223 224 ELSE 224 IF( lk_mpp ) CALL mppstop ! end mpp communications225 IF( lk_mpp ) CALL mppstop ! end mpp communications 225 226 ENDIF 226 227 #endif … … 235 236 !! ** Purpose : initialization of the NEMO GCM 236 237 !!---------------------------------------------------------------------- 237 INTEGER :: ji ! dummy loop indices 238 INTEGER :: ilocal_comm ! local integer 239 INTEGER :: ios, inum ! - - 240 REAL(wp) :: ziglo, zjglo, zkglo, zperio ! local scalars 238 INTEGER :: ji ! dummy loop indices 239 INTEGER :: ios, ilocal_comm ! local integer 241 240 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 242 241 ! … … 244 243 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 245 244 & nn_timing, nn_diacfl 246 NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr245 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 247 246 !!---------------------------------------------------------------------- 248 247 ! … … 260 259 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 261 260 ! 262 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints261 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 263 262 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 264 263 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 265 264 ! 266 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist 265 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints 267 266 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 268 267 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) 269 ! 270 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist 268 269 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 271 270 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 272 271 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) … … 275 274 ! ! Set global domain size ! (control print return in cltxt2) 276 275 ! !--------------------------! 277 IF( ln_read_cfg ) THEN ! Read sizes in configuration "domain_cfg" file 278 CALL iom_open( 'domain_cfg', inum ) 279 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 280 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 281 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 282 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 283 CALL iom_close( inum ) 284 WRITE(cltxt2(1),*) ' ' 285 WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file ' 286 WRITE(cltxt2(3),*) '~~~~~~~~~~ ' 287 WRITE(cltxt2(4),*) ' jpiglo = ', jpiglo, ' jpjglo = ', jpjglo, ' jpkglo = ', jpkglo 288 WRITE(cltxt2(5),*) ' global domain type of lateral boundary jperio = ', jperio 289 ! 276 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 277 CALL domain_cfg ( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 278 ! 290 279 ELSE ! user-defined namelist 291 CALL usr_def_nam( cltxt2, clnam, jpiglo, jpjglo, jpkglo, jperio ) 292 ENDIF 293 jpk = jpkglo 280 CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 281 ENDIF 282 ! 283 jpk = jpkglo 294 284 ! 295 285 #if defined key_agrif … … 313 303 IF( Agrif_Root() ) THEN 314 304 IF( lk_oasis ) THEN 315 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis316 CALL xios_initialize( "not used" ,local_comm=ilocal_comm ) ! send nemo communicator to xios305 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 306 CALL xios_initialize( "not used" ,local_comm= ilocal_comm ) ! send nemo communicator to xios 317 307 ELSE 318 308 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios … … 324 314 IF( lk_oasis ) THEN 325 315 IF( Agrif_Root() ) THEN 326 CALL cpl_init( "oceanx", ilocal_comm ) 316 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 327 317 ENDIF 328 318 ! Nodes selection (control print return in cltxt) 329 319 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 330 320 ELSE 331 ilocal_comm = 0 332 ! Nodes selection (control print return in cltxt) 321 ilocal_comm = 0 ! Nodes selection (control print return in cltxt) 333 322 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) 334 323 ENDIF … … 340 329 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 341 330 342 IF(lwm) THEN 343 ! write merged namelists from earlier to output namelist now that the 344 ! file has been opened in call to mynode. nammpp has already been 345 ! written in mynode (if lk_mpp_mpi) 331 IF(lwm) THEN ! write merged namelists from earlier to output namelist 332 ! ! now that the file has been opened in call to mynode. 333 ! ! NB: nammpp has already been written in mynode (if lk_mpp_mpi) 346 334 WRITE( numond, namctl ) 347 335 WRITE( numond, namcfg ) 348 336 IF( .NOT.ln_read_cfg ) THEN 349 337 DO ji = 1, SIZE(clnam) 350 IF( TRIM(clnam (ji)) /= '' ) WRITE(numond, * ) clnam(ji)! namusr_def print338 IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 351 339 END DO 352 340 ENDIF … … 394 382 CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 395 383 ! 396 397 398 384 WRITE(numout,*) 399 385 WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC' 400 386 WRITE(numout,*) ' NEMO team' 401 387 WRITE(numout,*) ' Ocean General Circulation Model' 402 WRITE(numout,*) ' 388 WRITE(numout,*) ' NEMO version 3.7 (2016) ' 403 389 WRITE(numout,*) 404 390 WRITE(numout,*) 405 391 DO ji = 1, SIZE(cltxt) 406 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) 392 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) ! control print of mynode 407 393 END DO 408 394 WRITE(numout,*) 409 395 WRITE(numout,*) 410 396 DO ji = 1, SIZE(cltxt2) 411 IF( cltxt2(ji) /= '' ) WRITE(numout,*) cltxt2(ji)! control print of domain size397 IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 412 398 END DO 413 399 ! 414 WRITE(numout,cform_aaa) 400 WRITE(numout,cform_aaa) ! Flag AAAAAAA 415 401 ! 416 402 ENDIF … … 418 404 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 419 405 CALL nemo_alloc() 406 420 407 ! !-------------------------------! 421 408 ! ! NEMO general initialization ! … … 534 521 CALL dia_tmb_init ! TMB outputs 535 522 CALL dia_25h_init ! 25h mean outputs 536 537 523 ! 538 524 END SUBROUTINE nemo_init … … 577 563 WRITE(numout,*) '~~~~~~~ ' 578 564 WRITE(numout,*) ' Namelist namcfg' 579 WRITE(numout,*) ' read configuration definition files ln_read_cfg = ', ln_read_cfg 580 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 581 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 582 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 565 WRITE(numout,*) ' read domain configuration file ln_read_cfg = ', ln_read_cfg 566 WRITE(numout,*) ' filename to be read cn_domcfg = ', TRIM(cn_domcfg) 567 WRITE(numout,*) ' write configuration definition file ln_write_cfg = ', ln_write_cfg 568 WRITE(numout,*) ' filename to be written cn_domcfg_out = ', TRIM(cn_domcfg_out) 569 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 583 570 ENDIF 584 571 ! ! Parameter control … … 679 666 !!---------------------------------------------------------------------- 680 667 ! 681 ierr = oce_alloc () ! ocean 668 ierr = oce_alloc () ! ocean 682 669 ierr = ierr + dia_wri_alloc () 683 670 ierr = ierr + dom_oce_alloc () ! ocean domain … … 855 842 IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 856 843 nsndto = nsndto + 1 857 844 isendto(nsndto) = jn 858 845 ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 859 846 nsndto = nsndto + 1 860 847 isendto(nsndto) = jn 861 848 ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 862 849 nsndto = nsndto + 1 863 864 END 850 isendto(nsndto) = jn 851 ENDIF 865 852 END DO 866 853 nfsloop = 1 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/par_oce.F90
r6717 r7200 16 16 !! namcfg namelist parameters 17 17 !!---------------------------------------------------------------------- 18 LOGICAL :: ln_read_cfg !: (=T) read the domain configuration in 'domain_cfg.nc" file 18 LOGICAL :: ln_read_cfg !: (=T) read the domain configuration file or (=F) not 19 CHARACTER(lc) :: cn_domcfg !: filename the configuration file to be read 19 20 LOGICAL :: ln_write_cfg !: (=T) create the domain configuration file 21 CHARACTER(lc) :: cn_domcfg_out !: filename the configuration file to be read 20 22 ! 21 CHARACTER(lc) :: cp_cfg !: name of the configuration22 INTEGER :: jp_cfg !: resolution of the configuration23 23 LOGICAL :: ln_use_jattr !: input file read offset 24 24 ! ! Use file global attribute: open_ocean_jstart to determine start j-row … … 27 27 ! ! with the extended grids used in the under ice shelf configurations to 28 28 ! ! be used without redundant rows when the ice shelves are not in use. 29 ! 29 30 30 31 !!--------------------------------------------------------------------- 31 32 !! Domain Matrix size 32 33 !!--------------------------------------------------------------------- 34 ! configuration name & resolution (required only in ORCA family case) 35 CHARACTER(lc) :: cn_cfg !: name of the configuration 36 INTEGER :: nn_cfg !: resolution of the configuration 33 37 34 38 ! global domain size !!! * total computational domain * -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90
r6982 r7200 4 4 !! Ocean system : NEMO GCM (ocean dynamics, on-line tracers, biochemistry and sea-ice) 5 5 !!====================================================================== 6 !! History : OPA ! 1990-10 (C. Levy, G. Madec) Original code 7 !! 7.0 ! 1991-11 (M. Imbard, C. Levy, G. Madec) 8 !! 7.1 ! 1993-03 (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 9 !! P. Delecluse, C. Perigaud, G. Caniaux, B. Colot, C. Maes) release 7.1 10 !! - ! 1992-06 (L.Terray) coupling implementation 11 !! - ! 1993-11 (M.A. Filiberti) IGLOO sea-ice 12 !! 8.0 ! 1996-03 (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 13 !! P. Delecluse, L.Terray, M.A. Filiberti, J. Vialar, A.M. Treguier, M. Levy) release 8.0 14 !! 8.1 ! 1997-06 (M. Imbard, G. Madec) 15 !! 8.2 ! 1999-11 (M. Imbard, H. Goosse) LIM sea-ice model 16 !! ! 1999-12 (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols) OPEN-MP 17 !! ! 2000-07 (J-M Molines, M. Imbard) Open Boundary Conditions (CLIPPER) 18 !! NEMO 1.0 ! 2002-08 (G. Madec) F90: Free form and modules 19 !! - ! 2004-06 (R. Redler, NEC CCRLE, Germany) add OASIS[3/4] coupled interfaces 20 !! - ! 2004-08 (C. Talandier) New trends organization 21 !! - ! 2005-06 (C. Ethe) Add the 1D configuration possibility 22 !! - ! 2005-11 (V. Garnier) Surface pressure gradient organization 23 !! - ! 2006-03 (L. Debreu, C. Mazauric) Agrif implementation 24 !! - ! 2006-04 (G. Madec, R. Benshila) Step reorganization 25 !! - ! 2007-07 (J. Chanut, A. Sellar) Unstructured open boundaries (BDY) 26 !! 3.2 ! 2009-08 (S. Masson) open/write in the listing file in mpp 27 !! 3.3 ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 28 !! - ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 !! 3.4 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) add nemo_northcomms 31 !! - ! 2011-11 (C. Harris) decomposition changes for running with CICE 32 !! 3.6 ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 33 !! - ! 2013-06 (I. Epicoco, S. Mocavero, CMCC) nemo_northcomms: setup avoiding MPI communication 34 !! - ! 2014-12 (G. Madec) remove KPP scheme and cross-land advection (cla) 6 !! History : 3.6 ! 2015-12 (A. Ryan) Original code (from OPA_SRC/) 7 !! 4.0 ! 2016-11 (G. Madec, S. Flavoni) domain configuration / user defined interface 35 8 !!---------------------------------------------------------------------- 36 9 37 10 !!---------------------------------------------------------------------- 38 !! nemo_gcm 39 !! nemo_init 40 !! nemo_ctl 41 !! nemo_closefile 42 !! nemo_alloc 43 !! nemo_partition 44 !! factorise 11 !! nemo_gcm : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice 12 !! nemo_init : initialization of the NEMO system 13 !! nemo_ctl : initialisation of the contol print 14 !! nemo_closefile: close remaining open files 15 !! nemo_alloc : dynamical allocation 16 !! nemo_partition: calculate MPP domain decomposition 17 !! factorise : calculate the factors of the no. of MPI processes 45 18 !!---------------------------------------------------------------------- 46 19 USE step_oce ! module used in the ocean time stepping module (step.F90) 47 USE domcfg ! domain configuration (dom_cfg routine) 48 USE mppini ! shared/distributed memory setting (mpp_init routine) 49 USE domain ! domain initialization (dom_init routine) 20 USE domain ! domain initialization (dom_init & dom_cfg routines) 21 USE istate ! initial state setting (istate_init routine) 22 USE phycst ! physical constant (par_cst routine) 23 USE step ! NEMO time-stepping (stp routine) 24 USE cpl_oasis3 ! OASIS3 coupling 25 USE diaobs ! Observation diagnostics (dia_obs_init routine) 50 26 #if defined key_nemocice_decomp 51 27 USE ice_domain_size, only: nx_global, ny_global 52 28 #endif 53 USE istate ! initial state setting (istate_init routine) 54 USE phycst ! physical constant (par_cst routine) 55 USE diaobs ! Observation diagnostics (dia_obs_init routine) 56 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 57 USE step ! NEMO time-stepping (stp routine) 58 USE cpl_oasis3 ! OASIS3 coupling 59 USE lib_mpp ! distributed memory computing 29 ! ! Stand Alone Observation operator modules 30 USE sao_data 31 USE sao_intp 32 ! 33 USE lib_mpp ! distributed memory computing 34 USE mppini ! shared/distributed memory setting (mpp_init routine) 35 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 36 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 60 37 #if defined key_iomput 61 38 USE xios ! xIOserver 62 39 #endif 63 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges64 65 ! Stand Alone Observation operator modules66 USE sao_data67 USE sao_intp68 40 69 41 IMPLICIT NONE … … 94 66 !! 3. Cycle through match ups 95 67 !! 4. Write results to file 96 !!97 68 !!---------------------------------------------------------------------- 98 !! Initialise NEMO 99 CALL nemo_init 100 !! Initialise Stand Alone Observation operator data 101 CALL sao_data_init 102 !! Initialise obs_oper 103 CALL dia_obs_init 104 !! Interpolate to observation space 105 CALL sao_interp 106 !! Pipe to output files 107 CALL dia_obs_wri 108 !! Reset the obs_oper between 109 CALL dia_obs_dealloc 110 !! Safely stop MPI 111 IF(lk_mpp) CALL mppstop ! end mpp communications 69 ! 70 CALL nemo_init ! Initialise NEMO 71 ! 72 CALL sao_data_init ! Initialise Stand Alone Observation operator data 73 ! 74 CALL dia_obs_init ! Initialise obs_operator 75 ! 76 CALL sao_interp ! Interpolate to observation space 77 ! 78 CALL dia_obs_wri ! Pipe to output files 79 ! 80 CALL dia_obs_dealloc ! Reset the obs_oper between 81 ! 82 IF(lk_mpp) CALL mppstop ! Safely stop MPI (end mpp communications) 83 ! 112 84 END SUBROUTINE nemo_gcm 113 85 … … 119 91 !! ** Purpose : initialization of the NEMO GCM 120 92 !!---------------------------------------------------------------------- 121 INTEGER :: ji ! dummy loop indices 122 INTEGER :: ilocal_comm ! local integer 123 INTEGER :: ios 124 !!gm CHARACTER(len=80), DIMENSION(16) :: cltxt 125 CHARACTER(len=80), DIMENSION(-10:16) :: cltxt 126 ! 127 NAMELIST/namctl/ ln_ctl, nn_print, nn_ictls, nn_ictle, & 128 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 93 INTEGER :: ji ! dummy loop indices 94 INTEGER :: ios, ilocal_comm ! local integer 95 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 96 ! 97 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 98 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 129 99 & nn_timing, nn_diacfl 130 NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr 131 !!---------------------------------------------------------------------- 132 ! 133 cltxt = '' 100 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 101 !!---------------------------------------------------------------------- 102 ! 103 cltxt = '' 104 cltxt2 = '' 105 clnam = '' 134 106 cxios_context = 'nemo' 135 107 ! … … 138 110 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 139 111 ! 140 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark112 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints 141 113 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 142 114 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 143 144 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark115 ! 116 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 145 117 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 146 118 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 147 148 ! 149 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints & Benchmark 119 ! 120 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints 150 121 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 151 122 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) … … 155 126 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 156 127 157 !!gm WRITE(clbug(3),*) ' after namelist namcfg read nstop', nstop158 159 128 ! !--------------------------! 160 129 ! ! Set global domain size ! (control print return in cltxt2) 161 130 ! !--------------------------! 162 IF( ln_read_cfg ) THEN ! Read sizes in configuration "mesh_mask" file 163 CALL iom_open( 'domain_cfg', inum ) 164 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 165 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 166 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 167 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 168 CALL iom_close( inum ) 169 WRITE(cltxt2(1),*) 170 WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file : jp(i,j,k)glo = ', jpiglo, jpjglo, jpkglo 171 WRITE(cltxt2(3),*) '~~~~~~~~~~ lateral boudary type of the global domain jperio= ', jperio 172 ! 131 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 132 CALL domain_cfg ( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 133 ! 173 134 ELSE ! user-defined namelist 174 CALL usr_def_nam( cltxt2, clnam, jpiglo, jpjglo, jpkglo, jperio ) 175 ENDIF 176 jpk = jpkglo 135 CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 136 ENDIF 137 ! 138 jpk = jpkglo 177 139 ! 178 140 #if defined key_agrif … … 217 179 ENDIF 218 180 #endif 181 219 182 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) 220 183 … … 230 193 IF( .NOT.ln_read_cfg ) THEN 231 194 DO ji = 1, SIZE(clnam) 232 IF( TRIM(clnam (ji)) /= '' ) WRITE(numond, * ) clnam(ji)! namusr_def print195 IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 233 196 END DO 234 197 ENDIF … … 239 202 IF( jpni < 1 .OR. jpnj < 1 ) THEN 240 203 #if defined key_mpp_mpi 241 IF( Agrif_Root() ) CALL nemo_partition(mppsize)204 IF( Agrif_Root() ) CALL nemo_partition( mppsize ) 242 205 #else 243 206 jpni = 1 … … 247 210 ENDIF 248 211 249 ! Calculate domain dimensions given calculated jpni and jpnj 250 ! This used to be done in par_oce.F90 when they were parameters rather 251 ! than variables 252 IF( Agrif_Root() ) THEN 212 IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj 253 213 #if defined key_nemocice_decomp 254 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim.255 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim.214 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 215 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 256 216 #else 257 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci! first dim.258 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj! second dim.217 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 218 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 259 219 #endif 260 220 ENDIF … … 272 232 CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 273 233 ! 274 275 DO ji = 1, SIZE(clbug)276 IF( TRIM(clbug (ji)) /= '' ) WRITE(numout,*) clbug(ji) ! bug print277 END DO278 WRITE(numout,*)279 280 281 282 283 234 WRITE(numout,*) 284 235 WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC' 285 236 WRITE(numout,*) ' NEMO team' 286 237 WRITE(numout,*) ' Stand Alone Observation operator' 287 WRITE(numout,*) ' version 1.0(2015) '238 WRITE(numout,*) ' NEMO version 3.7 (2015) ' 288 239 WRITE(numout,*) 289 240 WRITE(numout,*) 290 241 DO ji = 1, SIZE(cltxt) 291 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji)! control print of mynode242 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) ! control print of mynode 292 243 END DO 293 WRITE(numout,cform_aaa) ! Flag AAAAAAA 294 ! 295 ENDIF 296 297 ! Now we know the dimensions of the grid and numout has been set we can 298 ! allocate arrays 244 WRITE(numout,*) 245 WRITE(numout,*) 246 DO ji = 1, SIZE(cltxt2) 247 IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 248 END DO 249 ! 250 WRITE(numout,cform_aaa) ! Flag AAAAAAA 251 ! 252 ENDIF 253 254 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 299 255 CALL nemo_alloc() 300 256 … … 315 271 CALL phy_cst ! Physical constants 316 272 CALL eos_init ! Equation of state 317 CALL dom_cfg ! Domain configuration318 273 CALL dom_init ! Domain 319 274 … … 337 292 IF(lwp) THEN ! control print 338 293 WRITE(numout,*) 339 WRITE(numout,*) 'nemo_ctl: Control prints & Benchmark'294 WRITE(numout,*) 'nemo_ctl: Control prints' 340 295 WRITE(numout,*) '~~~~~~~ ' 341 296 WRITE(numout,*) ' Namelist namctl' … … 364 319 WRITE(numout,*) '~~~~~~~ ' 365 320 WRITE(numout,*) ' Namelist namcfg' 366 WRITE(numout,*) ' read configuration definition files ln_read_cfg = ', ln_read_cfg 367 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 368 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 369 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 321 WRITE(numout,*) ' read domain configuration file ln_read_cfg = ', ln_read_cfg 322 WRITE(numout,*) ' filename to be read cn_domcfg = ', TRIM(cn_domcfg) 323 WRITE(numout,*) ' write configuration definition file ln_write_cfg = ', ln_write_cfg 324 WRITE(numout,*) ' filename to be written cn_domcfg_out = ', TRIM(cn_domcfg_out) 325 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 370 326 ENDIF 371 327 ! ! Parameter control … … 439 395 IF( numdct_heat /= -1 ) CLOSE( numdct_heat ) ! heat transports 440 396 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 441 442 397 ! 443 398 numout = 6 ! redefine numout in case it is used after this point... … … 478 433 !! ** Method : 479 434 !!---------------------------------------------------------------------- 480 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have435 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 481 436 ! 482 437 INTEGER, PARAMETER :: nfactmax = 20 … … 532 487 INTEGER :: ifac, jl, inu 533 488 INTEGER, PARAMETER :: ntest = 14 534 INTEGER :: ilfax(ntest) 489 INTEGER, DIMENSION(ntest) :: ilfax 490 !!---------------------------------------------------------------------- 535 491 ! 536 492 ! lfax contains the set of allowed factors. 537 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & 538 & 128, 64, 32, 16, 8, 4, 2 / 539 !!---------------------------------------------------------------------- 540 493 ilfax(:) = (/(2**jl,jl=ntest,1,-1)/) 494 ! 541 495 ! Clear the error flag and initialise output vars 542 kerr = 0543 kfax = 1496 kerr = 0 497 kfax = 1 544 498 knfax = 0 545 499 ! 546 500 ! Find the factors of n. 547 501 IF( kn == 1 ) GOTO 20 … … 551 505 ! l points to the allowed factor list. 552 506 ! ifac holds the current factor. 553 507 ! 554 508 inu = kn 555 509 knfax = 0 556 510 ! 557 511 DO jl = ntest, 1, -1 558 512 ! … … 578 532 ! 579 533 END DO 580 534 ! 581 535 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 582 536 ! … … 586 540 587 541 SUBROUTINE nemo_northcomms 588 !! ======================================================================542 !!---------------------------------------------------------------------- 589 543 !! *** ROUTINE nemo_northcomms *** 590 !! nemo_northcomms : Setup for north fold exchanges with explicit 591 !! point-to-point messaging 592 !!===================================================================== 593 !!---------------------------------------------------------------------- 594 !! 595 !! ** Purpose : Initialization of the northern neighbours lists. 544 !! ** Purpose : Setup for north fold exchanges with explicit 545 !! point-to-point messaging 546 !! 547 !! ** Method : Initialization of the northern neighbours lists. 596 548 !!---------------------------------------------------------------------- 597 549 !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) 598 550 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 599 551 !!---------------------------------------------------------------------- 600 601 552 INTEGER :: sxM, dxM, sxT, dxT, jn 602 553 INTEGER :: njmppmax 603 554 !!---------------------------------------------------------------------- 555 ! 604 556 njmppmax = MAXVAL( njmppt ) 605 557 ! 606 558 !initializes the north-fold communication variables 607 559 isendto(:) = 0 608 nsndto = 0609 560 nsndto = 0 561 ! 610 562 !if I am a process in the north 611 563 IF ( njmpp == njmppmax ) THEN … … 629 581 IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 630 582 nsndto = nsndto + 1 631 583 isendto(nsndto) = jn 632 584 ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 633 585 nsndto = nsndto + 1 634 586 isendto(nsndto) = jn 635 587 ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 636 588 nsndto = nsndto + 1 637 638 END 589 isendto(nsndto) = jn 590 ENDIF 639 591 END DO 640 592 nfsloop = 1 … … 654 606 l_north_nogather = .TRUE. 655 607 END SUBROUTINE nemo_northcomms 608 656 609 #else 657 610 SUBROUTINE nemo_northcomms ! Dummy routine … … 663 616 END MODULE nemogcm 664 617 665 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/SAO_SRC/sao_data.F90
r5063 r7200 1 1 MODULE sao_data 2 !! ================================================================= 3 !! *** MODULE sao_data *** 4 !! ================================================================= 2 !!====================================================================== 3 !! *** MODULE sao_data *** 4 !!====================================================================== 5 !! History : 3.6 ! 2015-12 (A. Ryan) Original code 6 !!---------------------------------------------------------------------- 5 7 USE par_kind, ONLY: lc 6 8 USE lib_mpp ! distributed memory computing 9 USE in_out_manager 7 10 8 11 IMPLICIT NONE 9 10 !! Public data11 12 12 13 INTEGER, PARAMETER :: MaxNumFiles = 1000 13 14 14 15 !! Stand Alone Observation operator settings 15 CHARACTER(len=lc) :: & 16 & sao_files(MaxNumFiles) !: model files 17 INTEGER :: & 18 & n_files, & !: number of files 19 & nn_sao_idx(MaxNumFiles), & !: time_counter indices 20 & nn_sao_freq !: read frequency in time steps 16 CHARACTER(len=lc) :: sao_files(MaxNumFiles) !: model files 17 INTEGER :: n_files !: number of files 18 INTEGER :: nn_sao_idx(MaxNumFiles) !: time_counter indices 19 INTEGER :: nn_sao_freq !: read frequency in time steps 20 21 !!---------------------------------------------------------------------- 22 !! NEMO/OPA 3.7 , NEMO Consortium (2015) 23 !! $Id: trazdf_imp.F90 6140 2015-12-21 11:35:23Z timgraham $ 24 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 25 !!---------------------------------------------------------------------- 21 26 CONTAINS 27 22 28 SUBROUTINE sao_data_init() 23 29 !!---------------------------------------------------------------------- … … 27 33 !! 28 34 !!---------------------------------------------------------------------- 29 USE in_out_manager 30 INTEGER :: & 31 & jf !: file dummy loop index 32 LOGICAL :: lmask(MaxNumFiles) !: Logical mask used for counting 33 INTEGER :: ios 34 35 ! Standard offline obs_oper information 35 INTEGER :: jf ! file dummy loop index 36 LOGICAL :: lmask(MaxNumFiles) ! Logical mask used for counting 37 INTEGER :: ios 38 !! 36 39 NAMELIST/namsao/sao_files, nn_sao_idx, nn_sao_freq 40 !!---------------------------------------------------------------------- 37 41 38 42 ! Standard offline obs_oper initialisation 39 n_files = 0 ! :number of files to cycle through40 sao_files(:) = '' ! :list of files to read in41 nn_sao_idx(:) = 0 ! :list of indices inside each file42 nn_sao_freq = -1 ! :input frequency in time steps43 n_files = 0 ! number of files to cycle through 44 sao_files(:) = '' ! list of files to read in 45 nn_sao_idx(:) = 0 ! list of indices inside each file 46 nn_sao_freq = -1 ! input frequency in time steps 43 47 44 48 ! Standard offline obs_oper settings … … 46 50 READ ( numnam_ref, namsao, IOSTAT = ios, ERR = 901 ) 47 51 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsao in reference namelist', .TRUE. ) 48 52 ! 49 53 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark 50 54 READ ( numnam_cfg, namsao, IOSTAT = ios, ERR = 902 ) 51 55 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsao in configuration namelist', .TRUE. ) 52 53 54 ! count input files 55 lmask(:) = .FALSE. 56 57 lmask(:) = .FALSE. ! count input files 56 58 WHERE (sao_files(:) /= '') lmask(:) = .TRUE. 57 59 n_files = COUNT(lmask) 58 59 !! Initialise sub obs window frequency 60 IF (nn_sao_freq == -1) THEN 61 !! Run length 62 nn_sao_freq = nitend - nit000 + 1 60 ! 61 IF(nn_sao_freq == -1) THEN ! Initialise sub obs window frequency 62 nn_sao_freq = nitend - nit000 + 1 ! Run length 63 63 ENDIF 64 65 !! Print summary of settings 66 IF(lwp) THEN 64 ! 65 IF(lwp) THEN ! Print summary of settings 67 66 WRITE(numout,*) 68 67 WRITE(numout,*) 'offline obs_oper : Initialization' … … 70 69 WRITE(numout,*) ' Namelist namsao : set stand alone obs_oper parameters' 71 70 DO jf = 1, n_files 72 WRITE(numout,'(1X,2A)') ' Input forecast file name forecastfile = ', & 73 TRIM(sao_files(jf)) 74 WRITE(numout,*) ' Input forecast file index forecastindex = ', & 75 nn_sao_idx(jf) 71 WRITE(numout,'(1X,2A)') ' Input forecast file name forecastfile = ', TRIM(sao_files(jf)) 72 WRITE(numout,*) ' Input forecast file index forecastindex = ', nn_sao_idx(jf) 76 73 END DO 77 74 END IF 78 75 ! 79 76 END SUBROUTINE sao_data_init 80 77 78 !!====================================================================== 81 79 END MODULE sao_data 82 80 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/SAO_SRC/sao_intp.F90
r5063 r7200 4 4 !! ** Purpose : Run NEMO observation operator in offline mode 5 5 !!====================================================================== 6 !! NEMO modules 6 !! History : 3.6 ! 2015-12 (A. Ryan) Original code 7 !!---------------------------------------------------------------------- 8 ! ! NEMO modules 7 9 USE in_out_manager 8 10 USE diaobs 9 ! ! Stand Alone Observation operator modules11 ! ! Stand Alone Observation operator modules 10 12 USE sao_read 11 13 USE sao_data … … 16 18 PUBLIC sao_interp 17 19 18 CONTAINS 20 !!---------------------------------------------------------------------- 21 !! NEMO/OPA 3.7 , NEMO Consortium (2015) 22 !! $Id: trazdf_imp.F90 6140 2015-12-21 11:35:23Z timgraham $ 23 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 24 !!---------------------------------------------------------------------- 25 CONTAINS 19 26 20 SUBROUTINE sao_interp 21 !!---------------------------------------------------------------------- 22 !! *** SUBROUTINE sao_interp *** 23 !! 24 !! ** Purpose : To interpolate the model as if it were running online. 25 !! 26 !! ** Method : 1. Populate model counterparts 27 !! 2. Call dia_obs at appropriate time steps 28 !!---------------------------------------------------------------------- 29 INTEGER :: & 30 & istp, & ! time step index 31 & ifile ! file index 32 istp = nit000 - 1 33 nstop = 0 34 ifile = 1 35 CALL sao_rea_dri(ifile) 36 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 37 IF (ifile <= n_files + 1) THEN 38 IF ( MOD(istp, nn_sao_freq) == nit000 ) THEN 39 CALL sao_rea_dri(ifile) 40 ifile = ifile + 1 41 ENDIF 42 CALL dia_obs(istp) 27 SUBROUTINE sao_interp 28 !!---------------------------------------------------------------------- 29 !! *** SUBROUTINE sao_interp *** 30 !! 31 !! ** Purpose : To interpolate the model as if it were running online. 32 !! 33 !! ** Method : 1. Populate model counterparts 34 !! 2. Call dia_obs at appropriate time steps 35 !!---------------------------------------------------------------------- 36 INTEGER :: istp ! time step index 37 INTEGER :: ifile ! file index 38 !!---------------------------------------------------------------------- 39 istp = nit000 - 1 40 nstop = 0 41 ifile = 1 42 CALL sao_rea_dri(ifile) 43 ! 44 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 45 IF (ifile <= n_files + 1) THEN 46 IF ( MOD(istp, nn_sao_freq) == nit000 ) THEN 47 CALL sao_rea_dri(ifile) 48 ifile = ifile + 1 43 49 ENDIF 44 istp = istp + 1 45 END DO 46 END SUBROUTINE sao_interp 50 CALL dia_obs(istp) 51 ENDIF 52 istp = istp + 1 53 END DO 54 ! 55 END SUBROUTINE sao_interp 47 56 57 !!====================================================================== 48 58 END MODULE sao_intp -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/SAO_SRC/sao_read.F90
r5063 r7200 1 1 MODULE sao_read 2 !!================================================================== 3 !! *** MODULE sao_read***2 !!====================================================================== 3 !! *** MODULE sao_read *** 4 4 !! Read routines : I/O for Stand Alone Observation operator 5 !!================================================================== 5 !!====================================================================== 6 6 USE mppini 7 7 USE lib_mpp … … 12 12 USE dom_oce, ONLY: nlci, nlcj, nimpp, njmpp, tmask 13 13 USE par_oce, ONLY: jpi, jpj, jpk 14 ! 14 15 USE obs_fbm, ONLY: fbimdi, fbrmdi, fbsp, fbdp 15 16 USE sao_data … … 20 21 PUBLIC sao_rea_dri 21 22 23 !!---------------------------------------------------------------------- 24 !! NEMO/OPA 3.7 , NEMO Consortium (2015) 25 !! $Id: trazdf_imp.F90 6140 2015-12-21 11:35:23Z timgraham $ 26 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 27 !!---------------------------------------------------------------------- 22 28 CONTAINS 23 SUBROUTINE sao_rea_dri(kfile) 29 30 SUBROUTINE sao_rea_dri( kfile ) 24 31 !!------------------------------------------------------------------------ 25 32 !! *** sao_rea_dri *** … … 31 38 !! 32 39 !!------------------------------------------------------------------------ 33 INTEGER, INTENT(IN) :: & 34 & kfile !: File number 35 CHARACTER(len=lc) :: & 36 & cdfilename !: File name 37 INTEGER :: & 38 & kindex !: File index to read 39 40 cdfilename = TRIM(sao_files(kfile)) 40 INTEGER, INTENT(in) :: kfile ! File number 41 ! 42 CHARACTER(len=lc) :: cdfilename ! File name 43 INTEGER :: kindex ! File index to read 44 !!------------------------------------------------------------------------ 45 ! 46 cdfilename = TRIM( sao_files(kfile) ) 41 47 kindex = nn_sao_idx(kfile) 42 CALL sao_read_file( TRIM(cdfilename), kindex)43 48 CALL sao_read_file( TRIM( cdfilename ), kindex ) 49 ! 44 50 END SUBROUTINE sao_rea_dri 45 51 46 SUBROUTINE sao_read_file(filename, ifcst) 52 53 SUBROUTINE sao_read_file( filename, ifcst ) 47 54 !!------------------------------------------------------------------------ 48 !! *** sao_read_file***55 !! *** sao_read_file *** 49 56 !! 50 57 !! Purpose : To fill tn and sn with dailymean field from netcdf files … … 54 61 !! Author : A. Ryan Oct 2010 55 62 !!------------------------------------------------------------------------ 56 57 INTEGER, INTENT(IN) :: ifcst 58 CHARACTER(len=*), INTENT(IN) :: filename 59 INTEGER :: ncid, & 60 & varid,& 61 & istat,& 62 & ntimes,& 63 & tdim, & 64 & xdim, & 65 & ydim, & 66 & zdim 67 INTEGER :: ii, ij, ik 68 INTEGER, DIMENSION(4) :: start_n, & 69 & count_n 70 INTEGER, DIMENSION(3) :: start_s, & 71 & count_s 72 REAL(fbdp), DIMENSION(:,:,:),ALLOCATABLE :: temp_tn, & 73 & temp_sn 74 REAL(fbdp), DIMENSION(:,:), ALLOCATABLE :: temp_sshn 75 REAL(fbdp) :: fill_val 63 INTEGER, INTENT(in) :: ifcst 64 CHARACTER(len=*), INTENT(in) :: filename 65 INTEGER :: ncid, varid, istat, ntimes 66 INTEGER :: tdim, xdim, ydim, zdim 67 INTEGER :: ii, ij, ik 68 INTEGER, DIMENSION(4) :: start_n, count_n 69 INTEGER, DIMENSION(3) :: start_s, count_s 70 REAL(fbdp) :: fill_val 71 REAL(fbdp), DIMENSION(:,:,:), ALLOCATABLE :: temp_tn, temp_sn 72 REAL(fbdp), DIMENSION(:,:) , ALLOCATABLE :: temp_sshn 76 73 77 74 ! DEBUG 78 INTEGER :: istage 75 INTEGER :: istage 76 !!------------------------------------------------------------------------ 79 77 80 78 IF (TRIM(filename) == 'nofile') THEN 81 tsn (:,:,:,:) = fbrmdi82 sshn(:,:) = fbrmdi79 tsn (:,:,:,:) = fbrmdi 80 sshn(:,:) = fbrmdi 83 81 ELSE 84 82 WRITE(numout,*) "Opening :", TRIM(filename) … … 169 167 istat = nf90_close(ncid) 170 168 END IF 169 ! 171 170 END SUBROUTINE sao_read_file 171 172 !!------------------------------------------------------------------------ 172 173 END MODULE sao_read -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r6982 r7200 2 2 !!====================================================================== 3 3 !! *** MODULE nemogcm *** 4 !! Ocean system : NEMO GCM (ocean dynamics, on-line tracers, biochemistry and sea-ice)4 !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats 5 5 !!====================================================================== 6 !! History : OPA ! 1990-10 (C. Levy, G. Madec) Original code 7 !! 7.0 ! 1991-11 (M. Imbard, C. Levy, G. Madec) 8 !! 7.1 ! 1993-03 (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 9 !! P. Delecluse, C. Perigaud, G. Caniaux, B. Colot, C. Maes) release 7.1 10 !! - ! 1992-06 (L.Terray) coupling implementation 11 !! - ! 1993-11 (M.A. Filiberti) IGLOO sea-ice 12 !! 8.0 ! 1996-03 (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 13 !! P. Delecluse, L.Terray, M.A. Filiberti, J. Vialar, A.M. Treguier, M. Levy) release 8.0 14 !! 8.1 ! 1997-06 (M. Imbard, G. Madec) 15 !! 8.2 ! 1999-11 (M. Imbard, H. Goosse) LIM sea-ice model 16 !! ! 1999-12 (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols) OPEN-MP 17 !! ! 2000-07 (J-M Molines, M. Imbard) Open Boundary Conditions (CLIPPER) 18 !! NEMO 1.0 ! 2002-08 (G. Madec) F90: Free form and modules 19 !! - ! 2004-06 (R. Redler, NEC CCRLE, Germany) add OASIS[3/4] coupled interfaces 20 !! - ! 2004-08 (C. Talandier) New trends organization 21 !! - ! 2005-06 (C. Ethe) Add the 1D configuration possibility 22 !! - ! 2005-11 (V. Garnier) Surface pressure gradient organization 23 !! - ! 2006-03 (L. Debreu, C. Mazauric) Agrif implementation 24 !! - ! 2006-04 (G. Madec, R. Benshila) Step reorganization 25 !! - ! 2007-07 (J. Chanut, A. Sellar) Unstructured open boundaries (BDY) 26 !! 3.2 ! 2009-08 (S. Masson) open/write in the listing file in mpp 27 !! 3.3 ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 28 !! - ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 !! 3.4 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) add nemo_northcomms 31 !! - ! 2011-11 (C. Harris) decomposition changes for running with CICE 32 !! 3.6 ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 6 !! History : 3.6 ! 2011-11 (S. Alderson, G. Madec) original code 33 7 !! - ! 2013-06 (I. Epicoco, S. Mocavero, CMCC) nemo_northcomms: setup avoiding MPI communication 34 8 !! - ! 2014-12 (G. Madec) remove KPP scheme and cross-land advection (cla) 9 !! 4.0 ! 2016-10 (G. Madec, S. Flavoni) domain configuration / user defined interface 35 10 !!---------------------------------------------------------------------- 36 11 37 12 !!---------------------------------------------------------------------- 38 !! nemo_gcm 39 !! nemo_init 40 !! nemo_ctl : initialisation of the contol print41 !! nemo_closefile 42 !! nemo_alloc 43 !! nemo_partition 44 !! factorise 13 !! nemo_gcm : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice 14 !! nemo_init : initialization of the NEMO system 15 !! nemo_ctl : initialisation of the contol print 16 !! nemo_closefile: close remaining open files 17 !! nemo_alloc : dynamical allocation 18 !! nemo_partition: calculate MPP domain decomposition 19 !! factorise : calculate the factors of the no. of MPI processes 45 20 !!---------------------------------------------------------------------- 46 USE step_oce ! module used in the ocean time stepping module 47 USE sbc_oce ! surface boundary condition: ocean 48 USE domcfg ! domain configuration (dom_cfg routine) 49 USE daymod ! calendar 50 USE mppini ! shared/distributed memory setting (mpp_init routine) 51 USE domain ! domain initialization (dom_init routine) 52 USE phycst ! physical constant (par_cst routine) 53 USE step ! NEMO time-stepping (stp routine) 54 USE lib_mpp ! distributed memory computing 55 #if defined key_nosignedzero 56 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 57 #endif 21 USE step_oce ! module used in the ocean time stepping module 22 USE sbc_oce ! surface boundary condition: ocean 23 USE phycst ! physical constant (par_cst routine) 24 USE domain ! domain initialization (dom_init & dom_cfg routines) 25 USE usrdef_nam ! user defined configuration 26 USE daymod ! calendar 27 USE step ! NEMO time-stepping (stp routine) 28 USE cpl_oasis3 ! 29 USE sbcssm ! 30 USE icbstp ! handle bergs, calving, themodynamics and transport 31 #if defined key_bdy 32 USE bdyini ! open boundary cond. setting (bdy_init routine). clem: mandatory for LIM3 33 USE bdydta ! open boundary cond. setting (bdy_dta_init routine). clem: mandatory for LIM3 34 #endif 35 USE bdy_par 36 ! 37 USE lib_mpp ! distributed memory computing 38 USE mppini ! shared/distributed memory setting (mpp_init routine) 39 USE lbcnfd , ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 40 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 58 41 #if defined key_iomput 59 USE xios 60 #endif 61 USE cpl_oasis3 62 USE sbcssm 63 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 64 USE icbstp ! handle bergs, calving, themodynamics and transport 65 #if defined key_bdy 66 USE bdyini ! open boundary cond. setting (bdy_init routine). clem: mandatory for LIM3 67 USE bdydta ! open boundary cond. setting (bdy_dta_init routine). clem: mandatory for LIM3 68 #endif 69 USE bdy_par 70 USE usrdef_nam ! user defined configuration 42 USE xios ! xIOserver 43 #endif 71 44 72 45 IMPLICIT NONE … … 99 72 !! Madec, 2008, internal report, IPSL. 100 73 !!---------------------------------------------------------------------- 101 INTEGER :: istp 74 INTEGER :: istp ! time step index 102 75 !!---------------------------------------------------------------------- 103 76 ! … … 105 78 CALL Agrif_Init_Grids() ! AGRIF: set the meshes 106 79 #endif 107 80 ! 108 81 ! !-----------------------! 109 82 CALL nemo_init !== Initialisations ==! … … 152 125 ! !== finalize the run ==! 153 126 ! !------------------------! 154 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA155 ! 156 IF( nstop /= 0 .AND. lwp ) THEN ! error print127 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 128 ! 129 IF( nstop /= 0 .AND. lwp ) THEN ! error print 157 130 WRITE(numout,cform_err) 158 WRITE(numout,*) nstop, ' error have been found' 131 WRITE(numout,*) nstop, ' error have been found' 159 132 ENDIF 160 133 ! … … 169 142 ! 170 143 #if defined key_iomput 171 CALL xios_finalize ! end mpp communications with xios172 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS144 CALL xios_finalize ! end mpp communications with xios 145 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 173 146 #else 174 147 IF( lk_oasis ) THEN 175 CALL cpl_finalize ! end coupling and mpp communications with OASIS148 CALL cpl_finalize ! end coupling and mpp communications with OASIS 176 149 ELSE 177 IF( lk_mpp ) CALL mppstop ! end mpp communications150 IF( lk_mpp ) CALL mppstop ! end mpp communications 178 151 ENDIF 179 152 #endif … … 191 164 INTEGER :: ilocal_comm ! local integer 192 165 INTEGER :: ios, inum ! - - 193 REAL(wp) :: ziglo, zjglo, zkglo, zperio ! local scalars 194 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam, clbug 166 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 195 167 CHARACTER(len=80) :: clname 196 168 ! 197 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &198 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, &169 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 170 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 199 171 & nn_timing, nn_diacfl 200 NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr172 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 201 173 !!---------------------------------------------------------------------- 202 174 ! … … 204 176 cltxt2 = '' 205 177 clnam = '' 206 clbug = ''207 178 cxios_context = 'nemo' 208 179 ! … … 220 191 ENDIF 221 192 ! 222 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark193 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints 223 194 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 224 195 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 225 226 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark196 ! 197 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 227 198 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 228 199 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 229 230 ! 231 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints & Benchmark 200 ! 201 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints 232 202 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 233 203 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) … … 237 207 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 238 208 239 !!gm WRITE(clbug(3),*) ' after namelist namcfg read nstop', nstop240 241 209 ! !--------------------------! 242 210 ! ! Set global domain size ! (control print return in cltxt2) 243 211 ! !--------------------------! 244 IF( ln_read_cfg ) THEN ! Read sizes in configuration "mesh_mask" file 245 CALL iom_open( 'domain_cfg', inum ) 246 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 247 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 248 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 249 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 250 CALL iom_close( inum ) 251 WRITE(cltxt2(1),*) 252 WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file : jp(i,j,k)glo = ', jpiglo, jpjglo, jpkglo 253 WRITE(cltxt2(3),*) '~~~~~~~~~~ lateral boudary type of the global domain jperio= ', jperio 254 ! 212 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 213 CALL domain_cfg ( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 214 ! 255 215 ELSE ! user-defined namelist 256 CALL usr_def_nam( cltxt2, clnam, jpiglo, jpjglo, jpkglo, jperio ) 257 ENDIF 258 jpk = jpkglo 216 CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 217 ENDIF 218 ! 219 jpk = jpkglo 259 220 ! 260 221 #if defined key_agrif … … 281 242 CALL xios_initialize( "not used",local_comm=ilocal_comm ) ! send nemo communicator to xios 282 243 ELSE 283 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) 244 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios 284 245 ENDIF 285 246 ENDIF … … 296 257 ENDIF 297 258 #endif 259 298 260 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) 299 261 … … 301 263 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 302 264 303 IF(lwm) THEN 304 ! write merged namelists from earlier to output namelist now that the 305 ! file has been opened in call to mynode. nammpp has already been 306 ! written in mynode (if lk_mpp_mpi) 265 IF(lwm) THEN ! write merged namelists from earlier to output namelist 266 ! ! now that the file has been opened in call to mynode. 267 ! ! NB: nammpp has already been written in mynode (if lk_mpp_mpi) 307 268 WRITE( numond, namctl ) 308 269 WRITE( numond, namcfg ) 309 270 IF( .NOT.ln_read_cfg ) THEN 310 271 DO ji = 1, SIZE(clnam) 311 IF( TRIM(clnam (ji)) /= '' ) WRITE(numond, * ) clnam(ji)! namusr_def print272 IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 312 273 END DO 313 274 ENDIF 314 275 ENDIF 315 276 316 ! If dimensions of processor grid weren't specified in the namelist file 277 ! If dimensions of processor grid weren't specified in the namelist file 317 278 ! then we calculate them here now that we have our communicator size 318 279 IF( jpni < 1 .OR. jpnj < 1 ) THEN … … 326 287 ENDIF 327 288 328 ! Calculate domain dimensions given calculated jpni and jpnj 329 ! This used to be done in par_oce.F90 when they were parameters rather 330 ! than variables 331 IF( Agrif_Root() ) THEN 289 IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj 332 290 #if defined key_nemocice_decomp 333 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim.334 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim.291 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 292 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 335 293 #else 336 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci! first dim.337 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj! second dim.294 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 295 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 338 296 #endif 339 297 ENDIF … … 366 324 WRITE(numout,*) ' NEMO team' 367 325 WRITE(numout,*) ' Ocean General Circulation Model' 368 WRITE(numout,*) ' version 3.7 (201 5) '326 WRITE(numout,*) ' version 3.7 (2016) ' 369 327 WRITE(numout,*) ' StandAlone Surface version (SAS) ' 370 328 WRITE(numout,*) 371 329 WRITE(numout,*) 372 DO ji = 1, SIZE(cltxt) 373 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji)! control print of mynode330 DO ji = 1, SIZE(cltxt) 331 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) ! control print of mynode 374 332 END DO 375 333 WRITE(numout,*) 376 334 WRITE(numout,*) 377 335 DO ji = 1, SIZE(cltxt2) 378 ! IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 379 IF( cltxt2(ji) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 336 IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size 380 337 END DO 381 338 ! 382 WRITE(numout,cform_aaa) 339 WRITE(numout,cform_aaa) ! Flag AAAAAAA 383 340 ! 384 341 ENDIF 385 342 386 ! Now we know the dimensions of the grid and numout has been set we can 387 ! allocate arrays 343 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 388 344 CALL nemo_alloc() 389 390 345 ! !-------------------------------! 391 346 ! ! NEMO general initialization ! 392 347 ! !-------------------------------! 393 348 394 CALL nemo_ctl ! Control prints & Benchmark349 CALL nemo_ctl ! Control prints 395 350 396 351 ! ! Domain decomposition … … 404 359 CALL phy_cst ! Physical constants 405 360 CALL eos_init ! Equation of state 406 CALL dom_cfg ! Domain configuration407 361 CALL dom_init ! Domain 408 362 … … 437 391 IF(lwp) THEN ! control print 438 392 WRITE(numout,*) 439 WRITE(numout,*) 'nemo_ctl: Control prints & Benchmark'393 WRITE(numout,*) 'nemo_ctl: Control prints' 440 394 WRITE(numout,*) '~~~~~~~ ' 441 395 WRITE(numout,*) ' Namelist namctl' … … 464 418 WRITE(numout,*) '~~~~~~~ ' 465 419 WRITE(numout,*) ' Namelist namcfg' 466 WRITE(numout,*) ' read configuration definition files ln_read_cfg = ', ln_read_cfg 467 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 468 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 469 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 420 WRITE(numout,*) ' read domain configuration files ln_read_cfg = ', ln_read_cfg 421 WRITE(numout,*) ' filename to be read cn_domcfg = ', TRIM(cn_domcfg) 422 WRITE(numout,*) ' write configuration definition files ln_write_cfg = ', ln_write_cfg 423 WRITE(numout,*) ' filename to be written cn_domcfg_out = ', TRIM(cn_domcfg_out) 424 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 470 425 ENDIF 471 426 ! ! Parameter control … … 486 441 ! ! indices used for the SUM control 487 442 IF( nictls+nictle+njctls+njctle == 0 ) THEN ! print control done over the default area 488 lsp_area = .FALSE. 443 lsp_area = .FALSE. 489 444 ELSE ! print control done over a specific area 490 445 lsp_area = .TRUE. … … 558 513 #endif 559 514 ! 560 INTEGER :: ierr, ierr1,ierr2,ierr3,ierr4,ierr5,ierr6,ierr7,ierr8515 INTEGER :: ierr, ierr1, ierr2, ierr3, ierr4, ierr5, ierr6, ierr7, ierr8 561 516 INTEGER :: jpm 562 517 !!---------------------------------------------------------------------- … … 577 532 ! clem: should not be needed. To be checked out 578 533 jpm = MAX(jp_tem, jp_sal) 579 ALLOCATE( tsn (jpi,jpj,1,jpm), STAT=ierr2 )580 ALLOCATE( ub (jpi,jpj,1), STAT=ierr3 )581 ALLOCATE( vb (jpi,jpj,1), STAT=ierr4 )582 ALLOCATE( tsb (jpi,jpj,1,jpm), STAT=ierr5 )534 ALLOCATE( tsn (jpi,jpj,1,jpm) , STAT=ierr2 ) 535 ALLOCATE( ub (jpi,jpj,1) , STAT=ierr3 ) 536 ALLOCATE( vb (jpi,jpj,1) , STAT=ierr4 ) 537 ALLOCATE( tsb (jpi,jpj,1,jpm) , STAT=ierr5 ) 583 538 ALLOCATE( sshn(jpi,jpj) , STAT=ierr6 ) 584 ALLOCATE( un (jpi,jpj,1), STAT=ierr7 )585 ALLOCATE( vn (jpi,jpj,1), STAT=ierr8 )539 ALLOCATE( un (jpi,jpj,1) , STAT=ierr7 ) 540 ALLOCATE( vn (jpi,jpj,1) , STAT=ierr8 ) 586 541 ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6 + ierr7 + ierr8 587 542 #endif … … 601 556 !! ** Method : 602 557 !!---------------------------------------------------------------------- 603 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have558 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 604 559 ! 605 560 INTEGER, PARAMETER :: nfactmax = 20 … … 645 600 !! 646 601 !! ** Purpose : return the prime factors of n. 647 !! knfax factors are returned in array kfax which is of 602 !! knfax factors are returned in array kfax which is of 648 603 !! maximum dimension kmaxfax. 649 604 !! ** Method : … … 655 610 INTEGER :: ifac, jl, inu 656 611 INTEGER, PARAMETER :: ntest = 14 657 INTEGER :: ilfax(ntest) 612 INTEGER, DIMENSION(ntest) :: ilfax 613 !!---------------------------------------------------------------------- 658 614 ! 659 615 ! lfax contains the set of allowed factors. 660 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & 661 & 128, 64, 32, 16, 8, 4, 2 / 662 !!---------------------------------------------------------------------- 663 616 ilfax(:) = (/(2**jl,jl=ntest,1,-1)/) 617 ! 664 618 ! Clear the error flag and initialise output vars 665 619 kerr = 0 … … 709 663 710 664 SUBROUTINE nemo_northcomms 711 !! ======================================================================665 !!---------------------------------------------------------------------- 712 666 !! *** ROUTINE nemo_northcomms *** 713 !! nemo_northcomms : Setup for north fold exchanges with explicit 714 !! point-to-point messaging 715 !!===================================================================== 716 !!---------------------------------------------------------------------- 717 !! 718 !! ** Purpose : Initialization of the northern neighbours lists. 667 !! ** Purpose : Setup for north fold exchanges with explicit 668 !! point-to-point messaging 669 !! 670 !! ** Method : Initialization of the northern neighbours lists. 719 671 !!---------------------------------------------------------------------- 720 672 !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) … … 783 735 END SUBROUTINE nemo_northcomms 784 736 #endif 737 785 738 !!====================================================================== 786 739 END MODULE nemogcm -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r6140 r7200 416 416 IF(lwp) WRITE(numout,*) 417 417 418 IF( c p_cfg == "orca" .AND. .NOT. lk_c1d ) THEN ! ORCA configuration (not 1D) !419 ! 418 IF( cn_cfg == "orca" .AND. .NOT. lk_c1d ) THEN ! ORCA configuration (not 1D) ! 419 ! ! --------------------------- ! 420 420 ! set total alkalinity, phosphate, nitrate & silicate 421 421 zarea = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90
r5725 r7200 225 225 WHERE( gphit(:,:) < 0._wp ) ; trc_o(:,:,jn) = zpisc(jn,3) ; END WHERE ! Antarctic 226 226 ENDIF 227 IF( c p_cfg == "orca" ) THEN ! Baltic Sea particular case for ORCA configurations227 IF( cn_cfg == "orca" ) THEN ! Baltic Sea particular case for ORCA configurations 228 228 WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & 229 229 54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) … … 264 264 265 265 !-- Baltic 266 IF( c p_cfg == "orca" ) THEN ! Baltic treated seperately for ORCA configs266 IF( cn_cfg == "orca" ) THEN ! Baltic treated seperately for ORCA configs 267 267 IF ( trc_ice_ratio(jn) >= - 1._wp ) THEN ! no prescribed conc. ; typically everything but iron) 268 268 WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND. & -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r6596 r7200 252 252 ! ------------------- 253 253 254 IF( c p_cfg == "orca" ) THEN255 ! 256 SELECT CASE ( jp_cfg )254 IF( cn_cfg == "orca" ) THEN 255 ! 256 SELECT CASE ( nn_cfg ) 257 257 ! ! ======================= 258 258 CASE ( 1 ) ! eORCA_R1 configuration -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
r6596 r7200 429 429 430 430 !!gm Test removed, nothing specific to a configuration should survive out of usrdef modules 431 !!gm IF ( c p_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration431 !!gm IF ( cn_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration 432 432 !!gm ! GYRE : for diagnostic fields, are needed if cyclic B.C. are present, but not for purely MPI comm. 433 433 !!gm ! therefore we do not call lbc_lnk in GYRE config. (closed basin, no cyclic B.C.) … … 569 569 570 570 !-- Lateral boundary conditions 571 IF ( c p_cfg .NE. 'gyre' ) THEN571 IF ( cn_cfg .NE. 'gyre' ) THEN 572 572 CALL lbc_lnk( ztmltot(:,:,jn) , 'T', 1. ) ; CALL lbc_lnk( ztmlres(:,:,jn) , 'T', 1. ) 573 573 CALL lbc_lnk( ztmlatf(:,:,jn) , 'T', 1. ) ; CALL lbc_lnk( ztmlrad(:,:,jn) , 'T', 1. ) … … 620 620 621 621 !-- Lateral boundary conditions 622 IF ( c p_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration622 IF ( cn_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration 623 623 CALL lbc_lnk( ztmltot2(:,:,jn), 'T', 1. ) 624 624 CALL lbc_lnk( ztmlres2(:,:,jn), 'T', 1. ) … … 992 992 993 993 !-- Lateral boundary conditions 994 IF ( c p_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration994 IF ( cn_cfg .NE. 'gyre' ) THEN ! other than GYRE configuration 995 995 ! ES_B27_CD_WARN : lbc inutile GYRE, cf. + haut 996 996 DO jn = 1, jpdiabio 997 997 CALL lbc_lnk( ztmltrdbio2(:,:,jn), 'T', 1. ) 998 END DO998 END DO 999 999 ENDIF 1000 1000 -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/namelist_cfg
r7189 r7200 15 15 !----------------------------------------------------------------------- 16 16 ! 17 ln_e 2_dep = .true. ! =T : e3=dk[depth] in discret sens.17 ln_e3_dep = .true. ! =T : e3=dk[depth] in discret sens. 18 18 ! ! ===>>> will become the only possibility in v4.0 19 19 ! ! =F : e3 analytical derivative of depth function -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/namelist_ref
r7189 r7200 74 74 !----------------------------------------------------------------------- 75 75 ! 76 ln_e 2_dep = .true. ! =T : e3=dk[depth] in discret sens.76 ln_e3_dep = .true. ! =T : e3=dk[depth] in discret sens. 77 77 ! ! ===>>> will become the only possibility in v4.0 78 78 ! ! =F : e3 analytical derivative of depth function -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/domain.f90
r7189 r7200 379 379 !! ocean configuration. 380 380 !! 381 !! ** output file : domain_cfg.nc : domain size, characteristics, 382 ! horizontal mesh,383 !! Coriolis parameter, depth and vertical384 ! scale factors381 !! ** output file : domain_cfg.nc : domain size, characteristics,horizontal mesh, 382 !! Coriolis parameter, and vertical scale factors 383 !! NB: also contains ORCA family information (if cp_cfg = "ORCA") 384 !! and depths (ln_e3_dep=F) 385 385 !!---------------------------------------------------------------------- 386 386 INTEGER :: ji, jj, jk ! dummy loop indices … … 402 402 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE., kiolib = jprstlib ) 403 403 404 ! 405 ! !== ORCA family specificities ==! 406 IF( cp_cfg == "ORCA" ) THEN 407 CALL iom_rstput( 0, 0, inum, 'ORCA' , 1._wp , ktype = jp_i4 ) 408 CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( jp_cfg, wp), ktype = jp_i4 ) 409 ENDIF 404 410 ! !== global domain size ==! 405 411 ! … … 456 462 CALL iom_rstput( 0, 0, inum, 'e3w_1d' , e3w_1d , ktype = jp_r8 ) 457 463 ! 458 IF(.NOT.ln_e2_dep ) THEN ! depth (t- & w-points)459 CALL iom_rstput( 0, 0, inum, 'gdept_1d', gdept_1d, ktype = jp_r8 ) ! required only with460 CALL iom_rstput( 0, 0, inum, 'gdepw_1d', gdepw_1d, ktype = jp_r8 ) ! the old e3. definition461 CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 )462 CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 )463 ENDIF464 !465 464 CALL iom_rstput( 0, 0, inum, 'e3t_0' , e3t_0 , ktype = jp_r8 ) ! vertical scale factors (e 466 465 CALL iom_rstput( 0, 0, inum, 'e3u_0' , e3u_0 , ktype = jp_r8 ) … … 470 469 CALL iom_rstput( 0, 0, inum, 'e3uw_0' , e3uw_0 , ktype = jp_r8 ) 471 470 CALL iom_rstput( 0, 0, inum, 'e3vw_0' , e3vw_0 , ktype = jp_r8 ) 471 ! 472 IF(.NOT.ln_e3_dep ) THEN ! depth (t- & w-points) 473 CALL iom_rstput( 0, 0, inum, 'gdept_1d', gdept_1d, ktype = jp_r8 ) ! required only with 474 CALL iom_rstput( 0, 0, inum, 'gdepw_1d', gdepw_1d, ktype = jp_r8 ) ! the old e3. definition 475 CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 ) 476 CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 ) 477 ENDIF 472 478 ! 473 479 ! !== ocean top and bottom level ==! -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90
r7189 r7200 314 314 ENDIF 315 315 316 IF ( ln_isfcav .OR. ln_e 2_dep ) THEN ! e3. = dk[gdep]316 IF ( ln_isfcav .OR. ln_e3_dep ) THEN ! e3. = dk[gdep] 317 317 ! 318 318 !==>>> need to be like this to compute the pressure gradient with ISF. -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/nemogcm.f90
r7189 r7200 131 131 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 132 132 & nn_bench, nn_timing, nn_diacfl 133 NAMELIST/namcfg/ ln_e 2_dep, &133 NAMELIST/namcfg/ ln_e3_dep, & 134 134 & cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 135 135 & jpizoom, jpjzoom, jperio, ln_use_jattr … … 288 288 WRITE(numout,*) '~~~~~~~ ' 289 289 WRITE(numout,*) ' Namelist namcfg' 290 WRITE(numout,*) ' vertical scale factors =T: e3.=dk[depth] ln_e 2_dep = ', ln_e2_dep290 WRITE(numout,*) ' vertical scale factors =T: e3.=dk[depth] ln_e3_dep = ', ln_e3_dep 291 291 WRITE(numout,*) ' =F: old definition ' 292 292 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) … … 303 303 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 304 304 ! 305 IF(.NOT.ln_e 2_dep ) THEN305 IF(.NOT.ln_e3_dep ) THEN 306 306 WRITE(numout,cform_war) 307 307 WRITE(numout,*) -
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/par_oce.f90
r7189 r7200 29 29 !!---------------------------------------------------------------------- 30 30 ! 31 LOGICAL :: ln_e 2_dep ! e3. definition flag31 LOGICAL :: ln_e3_dep ! e3. definition flag 32 32 ! 33 33 CHARACTER(lc) :: cp_cfg !: name of the configuration
Note: See TracChangeset
for help on using the changeset viewer.