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 4739 for branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/TOOLS/DMP_TOOLS/src/utils.F90 – NEMO

Ignore:
Timestamp:
2014-08-13T10:46:04+02:00 (10 years ago)
Author:
timgraham
Message:

Updated C1D/dyndmp.F90 and trcdmp.F90 to read restoration coefficient from a file.
Modified namelist_top_ref to match new options
Bug fixes to DMP_TOOLS tool and addition of custom.F90 to allow users to make modifications. Also changed to use working precision (wp) throughout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/TOOLS/DMP_TOOLS/src/utils.F90

    r4738 r4739  
    66  PUBLIC 
    77   
     8  INTEGER, PUBLIC, PARAMETER   :: dp=8 , sp=4, wp=dp 
    89  INTEGER :: tmask_id, umask_id, vmask_id, fmask_id 
    910  INTEGER :: gdept_id 
     
    1314  INTEGER :: jpi, jpj, jpk                      ! Size of domain 
    1415  INTEGER  :: ncin, ncout                              ! File handles for netCDF files 
    15   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: gphit, glamt 
    16   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: gphiu, glamu 
    17   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: gphiv, glamv 
    18   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: gphif, glamf 
    19   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: tmask, umask, vmask, fmask 
    20   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: gdept 
    21   REAL(8), DIMENSION(:,:),   ALLOCATABLE :: resto 
     16  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: gphit, glamt 
     17  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: gphiu, glamu 
     18  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: gphiv, glamv 
     19  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: gphif, glamf 
     20  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: tmask, umask, vmask, fmask 
     21  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: gdept 
     22  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: resto 
    2223 
    2324  INTEGER,PARAMETER :: numout = 6 
    2425  INTEGER,PARAMETER :: numerr = 0 
    2526  INTEGER,PARAMETER :: numnam = 11 
    26   REAL(8),PARAMETER :: rday = 86400           ! seconds in a day 
    27   REAL(8),PARAMETER ::   rpi = 3.141592653589793 
    28   REAL(8),PARAMETER ::   rad = 3.141592653589793/180. 
    29   REAL(8),PARAMETER ::   ra =  6371229. 
     27  REAL(wp),PARAMETER :: rday = 86400           ! seconds in a day 
     28  REAL(wp),PARAMETER ::   rpi = 3.141592653589793 
     29  REAL(wp),PARAMETER ::   rad = 3.141592653589793/180. 
     30  REAL(wp),PARAMETER ::   ra =  6371229. 
    3031 
    3132  ! Namelist variables 
     
    4243  LOGICAL :: ln_full_field = .true. 
    4344  LOGICAL :: ln_med_red_seas = .false. 
     45  LOGICAL :: ln_old_31_lev_code = .false. 
    4446  LOGICAL :: ln_zero_top_layer = .false. 
    4547  LOGICAL :: ln_custom = .false. 
    4648 
    4749  NAMELIST/nam_dmp_create/cp_cfg, cp_cfz, jp_cfg, lzoom, ln_full_field, & 
    48                           ln_med_red_seas, ln_coast, ln_zero_top_layer, ln_custom, & 
     50                          ln_med_red_seas, ln_old_31_lev_code, ln_coast, & 
     51                          ln_zero_top_layer, ln_custom, & 
    4952                          pn_surf, pn_bot, pn_dep, nn_hdmp, jperio 
    5053 
     
    106109     CALL check_nf90( nf90_def_dim(ncout, 'z', jpk, id_z) ) 
    107110 
    108      CALL check_nf90( nf90_def_var(ncout, 'resto', nf90_float, (/id_x,id_y,id_z/), resto_id ) ) 
     111     CALL check_nf90( nf90_def_var(ncout, 'resto', nf90_double, (/id_x,id_y,id_z/), resto_id ) ) 
    109112     CALL check_nf90( nf90_enddef(ncout) ) 
    110113 
Note: See TracChangeset for help on using the changeset viewer.