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 11831 for NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS – NEMO

Ignore:
Timestamp:
2019-10-29T18:14:49+01:00 (4 years ago)
Author:
laurent
Message:

Update the branch to r11830 of the trunk!

Location:
NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS/README.rst

    r10279 r11831  
    22On line biogeochemistry coarsening 
    33********************************** 
     4 
     5.. todo:: 
     6 
     7 
    48 
    59.. contents:: 
     
    6367                              ! 1, MAX of KZ 
    6468                              ! 2, MIN of KZ 
    65                               ! 3, 10^(MEAN(LOG(KZ))  
    66                               ! 4, MEDIANE of KZ  
     69                              ! 3, 10^(MEAN(LOG(KZ)) 
     70                              ! 4, MEDIANE of KZ 
    6771      ln_crs_wn   = .false.   ! wn coarsened (T) or computed using horizontal divergence ( F ) 
    6872                              !                           ! 
     
    7377  the north-fold lateral boundary condition (ORCA025, ORCA12, ORCA36, ...). 
    7478- ``nn_msh_crs = 1`` will activate the generation of the coarsened grid meshmask. 
    75 - ``nn_crs_kz`` is the operator to coarsen the vertical mixing coefficient.  
     79- ``nn_crs_kz`` is the operator to coarsen the vertical mixing coefficient. 
    7680- ``ln_crs_wn`` 
    7781 
     
    8084  - when ``key_vvl`` is not activated, 
    8185 
    82     - coarsened vertical velocities are computed using horizontal divergence (``ln_crs_wn = .false.``)  
     86    - coarsened vertical velocities are computed using horizontal divergence (``ln_crs_wn = .false.``) 
    8387    - or coarsened vertical velocities are computed with an average operator (``ln_crs_wn = .true.``) 
    8488- ``ln_crs_top = .true.``: should be activated to run BCG model in coarsened space; 
     
    97101 
    98102In the [attachment:iodef.xml iodef.xml]  file, a "nemo" context is defined and 
    99 some variable defined in [attachment:file_def.xml file_def.xml] are writted on the ocean-dynamic grid.   
     103some variable defined in [attachment:file_def.xml file_def.xml] are writted on the ocean-dynamic grid. 
    100104To write variables on the coarsened grid, and in particular the passive tracers, 
    101105a "nemo_crs" context should be defined in [attachment:iodef.xml iodef.xml] and 
     
    111115  interpolated `on-the-fly <http://forge.ipsl.jussieu.fr/nemo/wiki/Users/SetupNewConfiguration/Weight-creator>`_. 
    112116  Example of namelist for PISCES : 
    113    
     117 
    114118   .. code-block:: fortran 
    115119 
     
    134138         rn_trfac(14)  =   1.0e-06  !  -      -      -     - 
    135139         rn_trfac(23)  =   7.6e-06  !  -      -      -     - 
    136        
     140 
    137141         cn_dir        =  './'      !  root directory for the location of the data files 
    138142 
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS/crsdom.F90

    r10068 r11831  
    296296      ENDDO 
    297297 
    298       CALL crs_lbc_lnk( p_e1_crs, cd_type, 1.0, pval=1.0 ) 
    299       CALL crs_lbc_lnk( p_e2_crs, cd_type, 1.0, pval=1.0 ) 
     298      CALL crs_lbc_lnk( p_e1_crs, cd_type, 1.0, pfillval=1.0 ) 
     299      CALL crs_lbc_lnk( p_e2_crs, cd_type, 1.0, pfillval=1.0 ) 
    300300 
    301301   END SUBROUTINE crs_dom_hgr 
     
    579579                  ENDDO   
    580580               CASE DEFAULT 
    581                     STOP 
     581                  CALL ctl_stop( 'STOP', 'error from crs_dom_ope_3d, you should not be there...' ) 
    582582               END SELECT 
    583583 
     
    17481748       ENDDO 
    17491749                   
    1750        CALL crs_lbc_lnk( p_e3_crs    , cd_type, 1.0, pval=1.0 )   
    1751        CALL crs_lbc_lnk( p_e3_max_crs, cd_type, 1.0, pval=1.0 )   
     1750       CALL crs_lbc_lnk( p_e3_crs    , cd_type, 1.0, pfillval=1.0 )   
     1751       CALL crs_lbc_lnk( p_e3_max_crs, cd_type, 1.0, pfillval=1.0 )   
    17521752       !               
    17531753       ! 
     
    18571857      ENDDO    
    18581858 
    1859       CALL crs_lbc_lnk( p_surf_crs    , cd_type, 1.0, pval=1.0 ) 
    1860       CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pval=1.0 ) 
     1859      CALL crs_lbc_lnk( p_surf_crs    , cd_type, 1.0, pfillval=1.0 ) 
     1860      CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pfillval=1.0 ) 
    18611861 
    18621862   END SUBROUTINE crs_dom_sfc 
     
    19471947                 
    19481948              CASE DEFAULT 
    1949                  STOP 
     1949                 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (1) ...' ) 
    19501950           END SELECT 
    19511951           IF( nlcjt_crs(jn) > jpj_crs )     jpj_crs = jpj_crs + 1 
     
    19961996 
    19971997              CASE DEFAULT 
    1998                  STOP 
     1998                 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (2) ...' ) 
    19991999           END SELECT 
    20002000 
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS/crsini.F90

    r10068 r11831  
    8282      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    8383      READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
    84 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist', lwp ) 
     84901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist' ) 
    8585      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    8686      READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
    87 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist', lwp ) 
     87902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist' ) 
    8888      IF(lwm) WRITE ( numond, namcrs ) 
    8989 
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/CRS/crslbclnk.F90

    r10425 r11831  
    2727CONTAINS 
    2828 
    29    SUBROUTINE crs_lbc_lnk_3d( pt3d1, cd_type1, psgn, cd_mpp, pval ) 
     29   SUBROUTINE crs_lbc_lnk_3d( pt3d1, cd_type1, psgn, kfillmode, pfillval ) 
    3030      !!--------------------------------------------------------------------- 
    3131      !!                  ***  SUBROUTINE crs_lbc_lnk  *** 
     
    4040      REAL(wp)                                , INTENT(in   ) ::   psgn     ! control of the sign 
    4141      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(inout) ::   pt3d1    ! 3D array on which the lbc is applied 
    42       REAL(wp)                      , OPTIONAL, INTENT(in   ) ::   pval     ! valeur sur les halo 
    43       CHARACTER(len=3)              , OPTIONAL, INTENT(in   ) ::   cd_mpp   ! MPP only (here do nothing) 
     42      INTEGER                     , OPTIONAL  , INTENT(in   ) ::   kfillmode   ! filling method for halo over land (default = cst) 
     43      REAL(wp)                    , OPTIONAL  , INTENT(in   ) ::   pfillval    ! background value (used at closed boundaries) 
    4444      ! 
    4545      LOGICAL  ::   ll_grid_crs 
    46       REAL(wp) ::   zval   ! valeur sur les halo 
    4746      !!---------------------------------------------------------------------- 
    4847      ! 
    4948      ll_grid_crs = ( jpi == jpi_crs ) 
    5049      ! 
    51       IF( PRESENT(pval) ) THEN   ;   zval = pval 
    52       ELSE                       ;   zval = 0._wp 
    53       ENDIF 
    54       ! 
    5550      IF( .NOT.ll_grid_crs )   CALL dom_grid_crs   ! Save the parent grid information  & Switch to coarse grid domain 
    5651      ! 
    57       IF( PRESENT( cd_mpp ) ) THEN   ;   CALL lbc_lnk( 'crslbclnk', pt3d1, cd_type1, psgn, cd_mpp, pval=zval  ) 
    58       ELSE                           ;   CALL lbc_lnk( 'crslbclnk', pt3d1, cd_type1, psgn        , pval=zval  ) 
    59       ENDIF 
     52      CALL lbc_lnk( 'crslbclnk', pt3d1, cd_type1, psgn, kfillmode, pfillval ) 
    6053      ! 
    6154      IF( .NOT.ll_grid_crs )   CALL dom_grid_glo   ! Return to parent grid domain 
     
    6457    
    6558    
    66    SUBROUTINE crs_lbc_lnk_2d(pt2d, cd_type, psgn, cd_mpp, pval) 
     59   SUBROUTINE crs_lbc_lnk_2d(pt2d, cd_type, psgn, kfillmode, pfillval ) 
    6760      !!--------------------------------------------------------------------- 
    6861      !!                  ***  SUBROUTINE crs_lbc_lnk  *** 
     
    7770      REAL(wp)                            , INTENT(in   ) ::   psgn     ! control of the sign 
    7871      REAL(wp), DIMENSION(jpi_crs,jpj_crs), INTENT(inout) ::   pt2d     ! 2D array on which the lbc is applied 
    79       REAL(wp)                  , OPTIONAL, INTENT(in   ) ::   pval     ! valeur sur les halo 
    80       CHARACTER(len=3)          , OPTIONAL, INTENT(in   ) ::   cd_mpp   ! MPP only (here do nothing) 
     72      INTEGER                 , OPTIONAL  , INTENT(in   ) ::   kfillmode   ! filling method for halo over land (default = constant) 
     73      REAL(wp)                , OPTIONAL  , INTENT(in   ) ::   pfillval    ! background value (used at closed boundaries) 
    8174      !       
    8275      LOGICAL  ::   ll_grid_crs 
    83       REAL(wp) ::   zval     ! valeur sur les halo 
    8476      !!---------------------------------------------------------------------- 
    8577      ! 
    8678      ll_grid_crs = ( jpi == jpi_crs ) 
    8779      ! 
    88       IF( PRESENT(pval) ) THEN   ;   zval = pval 
    89       ELSE                       ;   zval = 0._wp 
    90       ENDIF 
    91       ! 
    9280      IF( .NOT.ll_grid_crs )   CALL dom_grid_crs   ! Save the parent grid information  & Switch to coarse grid domain 
    9381      ! 
    94       IF( PRESENT( cd_mpp ) ) THEN   ;   CALL lbc_lnk( 'crslbclnk', pt2d, cd_type, psgn, cd_mpp, pval=zval  ) 
    95       ELSE                           ;   CALL lbc_lnk( 'crslbclnk', pt2d, cd_type, psgn        , pval=zval  ) 
    96       ENDIF 
     82      CALL lbc_lnk( 'crslbclnk', pt2d, cd_type, psgn, kfillmode, pfillval ) 
    9783      ! 
    9884      IF( .NOT.ll_grid_crs )   CALL dom_grid_glo   ! Return to parent grid domain 
Note: See TracChangeset for help on using the changeset viewer.