New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9169 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2017-12-26T17:32:56+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: all SRC: finalize the removal of useless warning when reading namelist_cfg + remove all nn_closea + nn_msh replaced by a logical

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r9168 r9169  
    7070      !!                         and scale factors, and the coriolis factor 
    7171      !!              - dom_zgr: define the vertical coordinate and the bathymetry 
    72       !!              - dom_wri: create the meshmask file if nn_msh=1 
     72      !!              - dom_wri: create the meshmask file (ln_meshmask=T) 
    7373      !!              - 1D configuration, move Coriolis, u and v at T-point 
    7474      !!---------------------------------------------------------------------- 
     
    110110         END SELECT 
    111111         WRITE(numout,*)     '      Ocean model configuration used:' 
    112          WRITE(numout,*)     '              cn_cfg = ', cn_cfg 
    113          WRITE(numout,*)     '              nn_cfg = ', nn_cfg 
     112         WRITE(numout,*)     '         cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg 
    114113      ENDIF 
    115114      ! 
     
    176175      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point 
    177176      ! 
    178       IF( nn_msh > 0 .AND. .NOT. ln_iscpl )                         CALL dom_wri      ! Create a domain file 
    179       IF( nn_msh > 0 .AND.       ln_iscpl .AND. .NOT. ln_rstart )   CALL dom_wri      ! Create a domain file 
    180       IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
    181       ! 
    182        
     177      IF( ln_meshmask .AND. .NOT.ln_iscpl )                        CALL dom_wri     ! Create a domain file 
     178      IF( ln_meshmask .AND.      ln_iscpl .AND. .NOT.ln_rstart )   CALL dom_wri     ! Create a domain file 
     179      IF(                                       .NOT.ln_rstart )   CALL dom_ctl     ! Domain control 
     180      ! 
     181      IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
     182      ! 
    183183      IF(lwp) THEN 
    184184         WRITE(numout,*) 
    185          WRITE(numout,*) 'dom_init : end of domain initialization nn_msh=', nn_msh 
     185         WRITE(numout,*) 'dom_init :   ==>>>   END of domain initialization' 
     186         WRITE(numout,*) '~~~~~~~~' 
    186187         WRITE(numout,*)  
    187188      ENDIF 
    188       ! 
    189       IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
    190189      ! 
    191190   END SUBROUTINE dom_init 
     
    269268      !!---------------------------------------------------------------------- 
    270269      USE ioipsl 
     270      !! 
     271      INTEGER  ::   ios   ! Local integer 
     272      ! 
    271273      NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list,                 & 
    272274         &             nn_no   , cn_exp   , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl ,     & 
     
    274276         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    275277         &             ln_cfmeta, ln_iscpl 
    276       NAMELIST/namdom/ ln_linssh, nn_msh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs 
     278      NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
    277279#if defined key_netcdf4 
    278280      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 
    279281#endif 
    280       INTEGER  ::   ios                 ! Local integer output status for namelist read 
    281       !!---------------------------------------------------------------------- 
     282      !!---------------------------------------------------------------------- 
     283      ! 
     284      IF(lwp) THEN 
     285         WRITE(numout,*) 
     286         WRITE(numout,*) 'dom_nam  : domain initialization through namelist read' 
     287         WRITE(numout,*) '~~~~~~~ ' 
     288      ENDIF 
    282289      ! 
    283290      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
     
    290297      ! 
    291298      IF(lwp) THEN                  ! control print 
    292          WRITE(numout,*) 
    293          WRITE(numout,*) 'dom_nam  : domain initialization through namelist read' 
    294          WRITE(numout,*) '~~~~~~~ ' 
    295          WRITE(numout,*) '   Namelist namrun' 
    296          WRITE(numout,*) '      job number                      nn_no      = ', nn_no 
    297          WRITE(numout,*) '      experiment name for output      cn_exp     = ', cn_exp 
    298          WRITE(numout,*) '      file prefix restart input       cn_ocerst_in= ', cn_ocerst_in 
    299          WRITE(numout,*) '      restart input directory         cn_ocerst_indir= ', cn_ocerst_indir 
    300          WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out 
    301          WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir 
    302          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart 
    303          WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler 
    304          WRITE(numout,*) '      control of time step            nn_rstctl  = ', nn_rstctl 
    305          WRITE(numout,*) '      number of the first time step   nn_it000   = ', nn_it000 
    306          WRITE(numout,*) '      number of the last time step    nn_itend   = ', nn_itend 
    307          WRITE(numout,*) '      initial calendar date aammjj    nn_date0   = ', nn_date0 
    308          WRITE(numout,*) '      initial time of day in hhmm     nn_time0   = ', nn_time0 
    309          WRITE(numout,*) '      leap year calendar (0/1)        nn_leapy   = ', nn_leapy 
    310          WRITE(numout,*) '      initial state output            nn_istate  = ', nn_istate 
     299         WRITE(numout,*) '   Namelist : namrun' 
     300         WRITE(numout,*) '      job number                      nn_no           = ', nn_no 
     301         WRITE(numout,*) '      experiment name for output      cn_exp          = ', TRIM( cn_exp           ) 
     302         WRITE(numout,*) '      file prefix restart input       cn_ocerst_in    = ', TRIM( cn_ocerst_in     ) 
     303         WRITE(numout,*) '      restart input directory         cn_ocerst_indir = ', TRIM( cn_ocerst_indir  ) 
     304         WRITE(numout,*) '      file prefix restart output      cn_ocerst_out   = ', TRIM( cn_ocerst_out    ) 
     305         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', TRIM( cn_ocerst_outdir ) 
     306         WRITE(numout,*) '      restart logical                 ln_rstart       = ', ln_rstart 
     307         WRITE(numout,*) '      start with forward time step    nn_euler        = ', nn_euler 
     308         WRITE(numout,*) '      control of time step            nn_rstctl       = ', nn_rstctl 
     309         WRITE(numout,*) '      number of the first time step   nn_it000        = ', nn_it000 
     310         WRITE(numout,*) '      number of the last time step    nn_itend        = ', nn_itend 
     311         WRITE(numout,*) '      initial calendar date aammjj    nn_date0        = ', nn_date0 
     312         WRITE(numout,*) '      initial time of day in hhmm     nn_time0        = ', nn_time0 
     313         WRITE(numout,*) '      leap year calendar (0/1)        nn_leapy        = ', nn_leapy 
     314         WRITE(numout,*) '      initial state output            nn_istate       = ', nn_istate 
    311315         IF( ln_rst_list ) THEN 
    312             WRITE(numout,*) '      list of restart dump times      nn_stocklist   =', nn_stocklist 
     316            WRITE(numout,*) '      list of restart dump times      nn_stocklist    =', nn_stocklist 
    313317         ELSE 
    314             WRITE(numout,*) '      frequency of restart file       nn_stock   = ', nn_stock 
     318            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    315319         ENDIF 
    316          WRITE(numout,*) '      frequency of output file        nn_write   = ', nn_write 
    317          WRITE(numout,*) '      mask land points                ln_mskland = ', ln_mskland 
    318          WRITE(numout,*) '      additional CF standard metadata ln_cfmeta  = ', ln_cfmeta 
    319          WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber 
    320          WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz = ', nn_chunksz 
    321          WRITE(numout,*) '      IS coupling at the restart step ln_iscpl   = ', ln_iscpl 
     320         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     321         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
     322         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     323         WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber 
     324         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz 
     325         WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl 
    322326      ENDIF 
    323327 
     
    336340      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
    337341         IF(lwp) WRITE(numout,*)   
    338          IF(lwp) WRITE(numout,*)'   Start from rest (ln_rstart=F) ==>>> an Euler initial time step is used,' 
    339          IF(lwp) WRITE(numout,*)'                                       nn_euler is forced to 0 '    
     342         IF(lwp) WRITE(numout,*)'   ==>>>   Start from rest (ln_rstart=F)' 
     343         IF(lwp) WRITE(numout,*)'           an Euler initial time step is used : nn_euler is forced to 0 '    
    340344         neuler = 0 
    341345      ENDIF 
    342346      !                             ! control of output frequency 
    343       IF ( nstock == 0 .OR. nstock > nitend ) THEN 
     347      IF( nstock == 0 .OR. nstock > nitend ) THEN 
    344348         WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
    345349         CALL ctl_warn( ctmp1 ) 
     
    376380      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    377381904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
    378       IF(lwm) WRITE ( numond, namdom ) 
     382      IF(lwm) WRITE( numond, namdom ) 
    379383      ! 
    380384      IF(lwp) THEN 
    381385         WRITE(numout,*) 
    382          WRITE(numout,*) '   Namelist namdom : space & time domain' 
    383          WRITE(numout,*) '      linear free surface (=T)              ln_linssh  = ', ln_linssh 
    384          WRITE(numout,*) '      create mesh/mask file(s)              nn_msh     = ', nn_msh 
    385          WRITE(numout,*) '           = 0   no file created           ' 
    386          WRITE(numout,*) '           = 1   mesh_mask                 ' 
    387          WRITE(numout,*) '           = 2   mesh and mask             ' 
    388          WRITE(numout,*) '           = 3   mesh_hgr, msh_zgr and mask' 
    389          WRITE(numout,*) '      treshold to open the isf cavity       rn_isfhmin = ', rn_isfhmin, ' (m)' 
    390          WRITE(numout,*) '      ocean time step                       rn_rdt     = ', rn_rdt 
    391          WRITE(numout,*) '      asselin time filter parameter         rn_atfp    = ', rn_atfp 
    392          WRITE(numout,*) '      online coarsening of dynamical fields ln_crs     = ', ln_crs 
    393       ENDIF 
    394        
    395       call flush( numout ) 
    396       ! 
    397 !     !          ! conversion DOCTOR names into model names (this should disappear soon) 
    398       atfp      = rn_atfp 
    399       rdt       = rn_rdt 
     386         WRITE(numout,*) '   Namelist : namdom   ---   space & time domain' 
     387         WRITE(numout,*) '      linear free surface (=T)                ln_linssh   = ', ln_linssh 
     388         WRITE(numout,*) '      create mesh/mask file                   ln_meshmask = ', ln_meshmask 
     389         WRITE(numout,*) '      treshold to open the isf cavity         rn_isfhmin  = ', rn_isfhmin, ' [m]' 
     390         WRITE(numout,*) '      ocean time step                         rn_rdt      = ', rn_rdt 
     391         WRITE(numout,*) '      asselin time filter parameter           rn_atfp     = ', rn_atfp 
     392         WRITE(numout,*) '      online coarsening of dynamical fields   ln_crs      = ', ln_crs 
     393      ENDIF 
     394      ! 
     395      !          ! conversion DOCTOR names into model names (this should disappear soon) 
     396      atfp = rn_atfp 
     397      rdt  = rn_rdt 
    400398 
    401399#if defined key_netcdf4 
     
    403401      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    404402      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    405 907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     403907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
    406404      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    407405      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    408 908   IF( ios >  0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     406908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
    409407      IF(lwm) WRITE( numond, namnc4 ) 
    410408 
     
    412410         WRITE(numout,*) 
    413411         WRITE(numout,*) '   Namelist namnc4 - Netcdf4 chunking parameters' 
    414          WRITE(numout,*) '      number of chunks in i-dimension      nn_nchunks_i  = ', nn_nchunks_i 
    415          WRITE(numout,*) '      number of chunks in j-dimension      nn_nchunks_j  = ', nn_nchunks_j 
    416          WRITE(numout,*) '      number of chunks in k-dimension      nn_nchunks_k  = ', nn_nchunks_k 
    417          WRITE(numout,*) '      apply netcdf4/hdf5 chunking & compression ln_nc4zip = ', ln_nc4zip 
     412         WRITE(numout,*) '      number of chunks in i-dimension             nn_nchunks_i = ', nn_nchunks_i 
     413         WRITE(numout,*) '      number of chunks in j-dimension             nn_nchunks_j = ', nn_nchunks_j 
     414         WRITE(numout,*) '      number of chunks in k-dimension             nn_nchunks_k = ', nn_nchunks_k 
     415         WRITE(numout,*) '      apply netcdf4/hdf5 chunking & compression   ln_nc4zip    = ', ln_nc4zip 
    418416      ENDIF 
    419417 
     
    487485      !! ** Purpose :   read the domain size in domain configuration file 
    488486      !! 
    489       !! ** Method  :    
    490       !! 
     487      !! ** Method  :   read the cn_domcfg NetCDF file 
    491488      !!---------------------------------------------------------------------- 
    492489      CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
     
    503500      ii = 1 
    504501      WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    505       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'   ;   ii = ii+1 
     502      WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    506503      WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
    507504      ! 
     
    515512         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = INT( zorca_res ) 
    516513         ! 
    517          WRITE(ldtxt(ii),*) '       '                                                    ;   ii = ii+1 
    518          WRITE(ldtxt(ii),*) '       ==>>>   ORCA configuration '                         ;   ii = ii+1 
    519          WRITE(ldtxt(ii),*) '       '                                                    ;   ii = ii+1 
     514         WRITE(ldtxt(ii),*) '       '                                                     ;   ii = ii+1 
     515         WRITE(ldtxt(ii),*) '       ==>>>   ORCA configuration '                          ;   ii = ii+1 
     516         WRITE(ldtxt(ii),*) '       '                                                     ;   ii = ii+1 
    520517         ! 
    521518      ELSE                                !- cd_cfg & k_cfg are not used 
Note: See TracChangeset for help on using the changeset viewer.