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 5837 for branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D – NEMO

Ignore:
Timestamp:
2015-10-26T15:59:39+01:00 (9 years ago)
Author:
timgraham
Message:

Upgraded to r5518 of trunk (NEMO 3.6 stable)

Location:
branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90

    • Property svn:keywords set to Id
    r4624 r5837  
    2727   REAL(wp), PUBLIC            ::  rn_lat1d     ! Column latitude 
    2828   REAL(wp), PUBLIC            ::  rn_lon1d     ! Column longitude 
     29   LOGICAL , PUBLIC            ::  ln_c1d_locpt ! Localization (or not) of 1D column in a grid 
    2930 
    3031   !!---------------------------------------------------------------------- 
    3132   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    32    !! $Id: c1d.F90 2382 2010-11-13 13:08:12Z gm $  
     33   !! $Id$  
    3334   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3435   !!====================================================================== 
     
    4445      !!---------------------------------------------------------------------- 
    4546      INTEGER ::   ios                 ! Local integer output status for namelist read 
    46       NAMELIST/namc1d/ rn_lat1d, rn_lon1d 
     47      NAMELIST/namc1d/ rn_lat1d, rn_lon1d , ln_c1d_locpt 
    4748      !!---------------------------------------------------------------------- 
    4849      ! 
     
    6364         WRITE(numout,*) '~~~~~~~~' 
    6465         WRITE(numout,*) '   Namelist namc1d : set options for the C1D model' 
    65          WRITE(numout,*) '      column latitude                 rn_lat1d = ', rn_lat1d 
    66          WRITE(numout,*) '      column longitude                rn_lon1d = ', rn_lon1d 
     66         WRITE(numout,*) '      column latitude                 rn_lat1d     = ', rn_lat1d 
     67         WRITE(numout,*) '      column longitude                rn_lon1d     = ', rn_lon1d 
     68         WRITE(numout,*) '      column localization in a grid   ln_c1d_locpt = ', ln_c1d_locpt 
    6769      ENDIF 
    6870      ! 
     
    7880   LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .FALSE.   !: 1D config. flag de-activated 
    7981   REAL(wp)                   ::   rn_lat1d, rn_lon1d 
     82   LOGICAL , PUBLIC           ::   ln_c1d_locpt = .FALSE.  
     83 
    8084CONTAINS 
    8185 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90

    • Property svn:keywords set to Id
    r4245 r5837  
    2626   !!---------------------------------------------------------------------- 
    2727   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    28    !! $Id: domc1d.F90 3851 2013-04-30 10:30:51Z hadcv $  
     28   !! $Id$  
    2929   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3030   !!---------------------------------------------------------------------- 
     
    4343      !! ** Action  : Recalculate jpizoom, jpjzoom (indices of C1D zoom) 
    4444      !!---------------------------------------------------------------------- 
     45      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
     46         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
     47         &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    & 
     48         &             jphgr_msh, & 
     49         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
     50         &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, & 
     51         &             ppa2, ppkth2, ppacr2 
     52 
    4553      INTEGER  ::  ji, jj                          ! Dummy loop indices 
    4654      INTEGER  ::  inum                            ! Coordinate file handle (case 0) 
    4755      INTEGER  ::  ijeq                            ! Index of equator T point (case 4) 
     56      INTEGER  ::  ios                             ! Local integer output status for namelist read 
    4857 
    4958      INTEGER , DIMENSION(2) ::   iloc             ! Minloc returned indices 
     
    6372      IF( nn_timing == 1 )   CALL timing_start('dom_c1d') 
    6473 
     74      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
     75      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 901 ) 
     76901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     77   
     78      ! 
     79      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
     80      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 902 ) 
     81902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     82 
    6583      CALL wrk_alloc( jpidta, jpjdta, gphidta, glamdta, zdist ) 
    6684 
     
    8098         CALL iom_get( inum, jpdom_unknown, 'gphit', gphidta ) ! so use jpdom_unknown not jpdom_data 
    8199         CALL iom_close ( inum ) 
    82  
    83          PRINT *,'Check dom_c1d coordinates file data read in:' !!! 
    84          PRINT *,'Bottom-left most glamdta is ', glamdta(1,1)    !!! Need to check 
    85          PRINT *,'Bottom-left most gphidta is ', gphidta(1,1)    !!! field read 
    86          PRINT *,'We are using nimpp,njmpp = ' , nimpp,njmpp     !!! 
    87100 
    88101      CASE ( 1 )                 ! geographical mesh on the sphere with regular grid-spacing 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90

    • Property svn:keywords set to Id
    r4624 r5837  
    3535   !!---------------------------------------------------------------------- 
    3636   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    37    !! $Id: dtauvd.F90 2392 2010-11-15 21:20:05Z gm $  
     37   !! $Id$  
    3838   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3939   !!---------------------------------------------------------------------- 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/dyncor_c1d.F90

    • Property svn:keywords set to Id
    r2409 r5837  
    3030   !!---------------------------------------------------------------------- 
    3131   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    32    !! $Id: dyncor_c1d.F90 2382 2010-11-13 13:08:12Z gm $  
     32   !! $Id$  
    3333   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3434   !!---------------------------------------------------------------------- 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90

    • Property svn:keywords set to Id
    r4624 r5837  
    33   !!                       ***  MODULE  dyndmp  *** 
    44   !! Ocean dynamics: internal restoring trend on momentum (U and V current) 
     5   !!                 This should only be used for C1D case in current form 
    56   !!====================================================================== 
    67   !! History :  3.5  ! 2013-08  (D. Calvert)  Original code 
     8   !!            3.6  ! 2014-08  (T. Graham) Modified to use netcdf file of 
     9   !!                             restoration coefficients supplied to tradmp 
    710   !!---------------------------------------------------------------------- 
    811 
     
    1518   USE dom_oce        ! ocean: domain variables 
    1619   USE c1d            ! 1D vertical configuration 
    17    USE trdmod         ! ocean: trends 
    18    USE trdmod_oce     ! ocean: trends variables 
    1920   USE tradmp         ! ocean: internal damping 
    2021   USE zdf_oce        ! ocean: vertical physics 
     
    2728   USE wrk_nemo       ! Memory allocation 
    2829   USE timing         ! Timing 
     30   USE iom            ! I/O manager 
    2931 
    3032   IMPLICIT NONE 
     
    4547   !!---------------------------------------------------------------------- 
    4648   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    47    !! $Id: dyndmp.F90 3294 2012-01-28 16:44:18Z rblod $  
     49   !! $Id$  
    4850   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    4951   !!---------------------------------------------------------------------- 
     
    7577      NAMELIST/namc1d_dyndmp/ ln_dyndmp 
    7678      INTEGER :: ios 
     79      INTEGER :: imask 
    7780      !!---------------------------------------------------------------------- 
    7881 
     
    9396         WRITE(numout,*) '      add a damping term or not       ln_dyndmp = ', ln_dyndmp 
    9497         WRITE(numout,*) '   Namelist namtra_dmp    : Set damping parameters' 
    95          WRITE(numout,*) '      horizontal damping option       nn_hdmp   = ', nn_hdmp 
    96          WRITE(numout,*) '      mixed layer damping option      nn_zdmp   = ', nn_zdmp, '(non-C1D zoom: forced to 0)' 
    97          WRITE(numout,*) '      surface time scale (days)       rn_surf   = ', rn_surf 
    98          WRITE(numout,*) '      bottom time scale (days)        rn_bot    = ', rn_bot 
    99          WRITE(numout,*) '      depth of transition (meters)    rn_dep    = ', rn_dep 
    100          WRITE(numout,*) '      create a damping.coeff file     nn_file   = ', nn_file 
     98         WRITE(numout,*) '      Apply relaxation   or not       ln_tradmp = ', ln_tradmp 
     99         WRITE(numout,*) '      mixed layer damping option      nn_zdmp   = ', nn_zdmp 
     100         WRITE(numout,*) '      Damping file name               cn_resto  = ', cn_resto 
    101101         WRITE(numout,*) 
    102102      ENDIF 
     
    106106         IF( dyn_dmp_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dyn_dmp_init: unable to allocate arrays' ) 
    107107         ! 
    108 #if ! defined key_c1d 
    109          SELECT CASE ( nn_hdmp )             !==   control print of horizontal option   ==! 
    110          CASE (  -1  )   ;   IF(lwp) WRITE(numout,*) '   momentum damping in the Med & Red seas only' 
    111          CASE ( 1:90 )   ;   IF(lwp) WRITE(numout,*) '   momentum damping poleward of', nn_hdmp, ' degrees' 
    112          CASE DEFAULT 
    113             WRITE(ctmp1,*) '          bad flag value for nn_hdmp = ', nn_hdmp 
    114             CALL ctl_stop(ctmp1) 
    115          END SELECT 
    116          ! 
    117 #endif 
    118108         SELECT CASE ( nn_zdmp )             !==   control print of vertical option   ==! 
    119109         CASE ( 0    )   ;   IF(lwp) WRITE(numout,*) '   momentum damping throughout the water column' 
     
    132122         utrdmp(:,:,:) = 0._wp               ! internal damping trends 
    133123         vtrdmp(:,:,:) = 0._wp 
    134          !                                   !==   Damping coefficients calculation:                           ==! 
    135          !                                   !==   use tradmp.F90 subroutines dtacof, dtacof_zoom and cofdis   ==! 
    136          !                                   !!!   NOTE: these need to be altered for use in this module if  
    137          !                                   !!!       they are to be used outside the C1D context  
    138          !                                   !!!       (use of U,V grid variables) 
    139          IF( lzoom .AND. .NOT. lk_c1d ) THEN   ;   CALL dtacof_zoom( resto_uv ) 
    140          ELSE               ;   CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, nn_file, 'DYN', resto_uv ) 
    141          ENDIF 
    142          ! 
     124         ! 
     125         !Read in mask from file 
     126         CALL iom_open ( cn_resto, imask) 
     127         CALL iom_get  ( imask, jpdom_autoglo, 'resto', resto) 
     128         CALL iom_close( imask ) 
    143129      ENDIF 
    144130      ! 
     
    164150      !! ** Action  : - (ua,va)   momentum trends updated with the damping trend 
    165151      !!---------------------------------------------------------------------- 
    166       ! 
    167152      INTEGER, INTENT(in) ::   kt                        ! ocean time-step index 
    168153      !! 
     
    236221      END SELECT 
    237222      ! 
    238       !                           ! Trend diagnostic 
    239       IF( l_trddyn )   CALL trd_mod( utrdmp, vtrdmp, jpdyn_trd_dat, 'DYN', kt ) 
     223!!gm      !                           ! Trend diagnostic 
     224!!gm      IF( l_trddyn )   CALL trd_mod( utrdmp, vtrdmp, jpdyn_trd_dat, 'DYN', kt ) 
    240225      ! 
    241226      !                           ! Control print 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90

    • Property svn:keywords set to Id
    r2409 r5837  
    2525   !!---------------------------------------------------------------------- 
    2626   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    27    !! $Id: dynnxt_c1d.F90 2382 2010-11-13 13:08:12Z gm $  
     27   !! $Id$  
    2828   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    2929   !!---------------------------------------------------------------------- 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90

    • Property svn:keywords set to Id
    r4313 r5837  
    3232   !!---------------------------------------------------------------------- 
    3333   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    34    !! $Id: step_c1d.F90 2382 2010-11-13 13:08:12Z gm $ 
     34   !! $Id$ 
    3535   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3636   !!---------------------------------------------------------------------- 
     
    7272      ! Ocean physics update                (ua, va, ta, sa used as workspace) 
    7373      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    74                          CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency 
    75                          CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
     74                         CALL eos_rab( tsb, rab_b )   ! before local thermal/haline expension ratio at T-points 
     75                         CALL eos_rab( tsn, rab_n )   ! now    local thermal/haline expension ratio at T-points 
     76                         CALL bn2( tsb, rab_b, rn2b ) ! before Brunt-Vaisala frequency 
     77                         CALL bn2( tsn, rab_n, rn2  ) ! now    Brunt-Vaisala frequency 
    7678      !  VERTICAL PHYSICS    
    7779                         CALL zdf_bfr( kstp )         ! bottom friction 
     
    115117      ! Passive Tracer Model 
    116118      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    117                          CALL trc_stp( kstp )            ! time-stepping 
     119                        CALL trc_stp( kstp )       ! time-stepping 
    118120#endif 
    119121 
     
    121123      ! Active tracers                              (ua, va used as workspace) 
    122124      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    123                              tsa(:,:,:,:) = 0.e0                ! set tracer trends to zero 
     125                        tsa(:,:,:,:) = 0._wp       ! set tracer trends to zero 
    124126 
    125                              CALL tra_sbc    ( kstp )        ! surface boundary condition 
    126       IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr 
    127       IF( ln_tradmp      )   CALL tra_dmp    ( kstp )        ! internal damping trends- tracers 
    128       IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes 
    129                              CALL tra_zdf    ( kstp )        ! vertical mixing 
    130                              CALL tra_nxt    ( kstp )        ! tracer fields at next time step 
    131       IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )        ! applied non penetrative convective adjustment on (t,s) 
    132                              CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )      ! now (swap=before) in situ density for dynhpg module 
     127                        CALL tra_sbc( kstp )       ! surface boundary condition 
     128      IF( ln_traqsr )   CALL tra_qsr( kstp )       ! penetrative solar radiation qsr 
     129      IF( ln_tradmp )   CALL tra_dmp( kstp )       ! internal damping trends- tracers 
     130      IF( lk_zdfkpp )   CALL tra_kpp( kstp )       ! KPP non-local tracer fluxes 
     131                        CALL tra_zdf( kstp )       ! vertical mixing 
     132                        CALL eos( tsn, rhd, rhop, gdept_0(:,:,:) )   ! now potential density for zdfmxl 
     133      IF( ln_zdfnpc )   CALL tra_npc( kstp )       ! applied non penetrative convective adjustment on (t,s) 
     134                        CALL tra_nxt( kstp )       ! tracer fields at next time step 
     135 
     136 
    133137 
    134138      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    135139      ! Dynamics                                    (ta, sa used as workspace) 
    136140      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    137                                ua(:,:,:) = 0.e0               ! set dynamics trends to zero 
    138                                va(:,:,:) = 0.e0 
     141                        ua(:,:,:) = 0._wp          ! set dynamics trends to zero 
     142                        va(:,:,:) = 0._wp 
    139143 
    140       IF( ln_dyndmp      )     CALL dyn_dmp    ( kstp )       ! internal damping trends- momentum 
    141                                CALL dyn_cor_c1d( kstp )       ! vorticity term including Coriolis 
    142                                CALL dyn_zdf    ( kstp )       ! vertical diffusion 
    143                                CALL dyn_nxt_c1d( kstp )       ! lateral velocity at next time step 
     144      IF( ln_dyndmp )   CALL dyn_dmp    ( kstp )   ! internal damping trends- momentum 
     145                        CALL dyn_cor_c1d( kstp )   ! vorticity term including Coriolis 
     146                        CALL dyn_zdf    ( kstp )   ! vertical diffusion 
     147                        CALL dyn_nxt_c1d( kstp )   ! lateral velocity at next time step 
    144148 
    145149      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    146150      ! Control and restarts 
    147151      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    148                                  CALL stp_ctl( kstp, indic ) 
    149       IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file 
    150       IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file 
     152                             CALL stp_ctl( kstp, indic ) 
     153      IF( kstp == nit000 )   CALL iom_close( numror )      ! close input  ocean restart file 
     154      IF( lrst_oce       )   CALL rst_write( kstp )        ! write output ocean restart file 
    151155      ! 
     156#if defined key_iomput 
     157      IF( kstp == nitend .OR. indic < 0 )   CALL xios_context_finalize()   ! needed for XIOS 
     158      ! 
     159#endif 
    152160   END SUBROUTINE stp_c1d 
    153161 
Note: See TracChangeset for help on using the changeset viewer.