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 7217 for branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2016-11-09T21:27:33+01:00 (7 years ago)
Author:
cbricaud
Message:

CRS branch: code cleaning

Location:
branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OFF_SRC/domrea.F90

    r5602 r7217  
    125125      NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh    , rn_hmin,   & 
    126126         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,            & 
    127          &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea , ln_crs, & 
     127         &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea , & 
    128128         &             jphgr_msh, & 
    129129         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90

    r5602 r7217  
    4545      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
    4646         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
    47          &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    & 
     47         &             rn_rdtmax, rn_rdth     , nn_closea , & 
    4848         &             jphgr_msh, & 
    4949         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crs.F90

    r7215 r7217  
    139139      INTEGER           :: nn_factx   = 3       !: reduction factor of x-dimension of the parent grid 
    140140      INTEGER           :: nn_facty   = 3       !: reduction factor of y-dimension of the parent grid 
    141       INTEGER           :: nn_binref  = 0       !: 0 = binning starts north fold (equator could be asymmetric) 
    142141                                                !: 1 = binning centers at equator (north fold my have artifacts)      
    143142                                                !:    for even reduction factors, equator placed in bin biased south 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90

    r7215 r7217  
    55   !!           higher-resolution grid for the coarse grid. 
    66   !! 
    7    !!  Method:  Given the user-defined reduction factor,  
    8    !!           the averaging bins are set:  
    9    !!           - nn_binref = 0, starting from the north  
    10    !!           to the south in the model interior domain,  
    11    !!           in this way the north fold and redundant halo cells   
    12    !!           could be handled in a consistent manner and  
    13    !!           the irregularities of bin size can be handled 
    14    !!           more naturally by the presence of land 
    15    !!           in the southern boundary.  Thus the southernmost bin  
    16    !!           could be of an irregular bin size. 
    17    !!           Information on the parent grid is retained, specifically, 
    18    !!           each coarse grid cell's volume and ocean surface  
    19    !!           at the faces, relative to the parent grid. 
    20    !!           - nn_binref = 1 (not yet available), starting 
    21    !!           at a centralized bin at the equator, being only 
    22    !!           truly centered for odd-numbered j-direction reduction  
    23    !!           factors. 
     7   !!  Method: 
     8 
    249   !!  References:  Aumont, O., J.C. Orr, D. Jamous, P. Monfray 
    2510   !!               O. Marti and G. Madec, 1998. A degradation  
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90

    r7215 r7217  
    9999 
    100100      !--------------------------------------------------------------------------------------------------- 
    101       !scale factors: swap  
    102       !--------------------------------------------------------------------------------------------------- 
    103 #if defined key_vvl 
    104       !e3t_b_crs(:,:,:) = e3t_n_crs(:,:,:) 
    105       !e3u_b_crs(:,:,:) = e3u_n_crs(:,:,:) 
    106       !e3v_b_crs(:,:,:) = e3v_n_crs(:,:,:) 
    107       !e3w_b_crs(:,:,:) = e3w_n_crs(:,:,:) 
    108       !e3t_n_crs(:,:,:) = e3t_a_crs(:,:,:) 
    109       !e3u_n_crs(:,:,:) = e3u_a_crs(:,:,:) 
    110       !e3v_n_crs(:,:,:) = e3v_a_crs(:,:,:) 
    111       !e3w_n_crs(:,:,:) = e3w_a_crs(:,:,:) 
     101      !scale factors: before and now  
     102      !--------------------------------------------------------------------------------------------------- 
     103#if defined key_vvl 
    112104  
    113       !cbr: ds dynnxt, si  (lk_dynspg_ts.AND.ln_bt_fw) on fait un swap simple ( e3X_b_crs=e3X_n_crs ) 
    114       !                 sinon e3X_b_crs passe par le filtre d'asselin !!!!!! 
    115       !     ds dommvl, swap simple pr  e3X_n_crs=e3X_a_crs  
    116  
    117105 
    118106      IF( kt /= nit000 )THEN 
    119       zfse3t(:,:,:) = e3t_b(:,:,:) 
    120       zfse3u(:,:,:) = e3u_b(:,:,:) 
    121       zfse3v(:,:,:) = e3v_b(:,:,:) 
    122       zfse3w(:,:,:) = e3w_b(:,:,:) 
    123       CALL crs_dom_e3( e1t, e2t, zfse3t, p_sfc_3d_crs=e1e2w_crs, cd_type='T', p_mask=tmask, p_e3_crs=e3t_b_crs, p_e3_max_crs=zs_crs) 
    124       CALL crs_dom_e3( e1t, e2t, zfse3w, p_sfc_3d_crs=e1e2w_crs, cd_type='W', p_mask=tmask, p_e3_crs=e3w_b_crs, p_e3_max_crs=zs_crs) 
    125       CALL crs_dom_e3( e1u, e2u, zfse3u, p_sfc_2d_crs=e2u_crs  , cd_type='U', p_mask=umask, p_e3_crs=e3u_b_crs, p_e3_max_crs=zs_crs) 
    126       CALL crs_dom_e3( e1v, e2v, zfse3v, p_sfc_2d_crs=e1v_crs  , cd_type='V', p_mask=vmask, p_e3_crs=e3v_b_crs, p_e3_max_crs=zs_crs) 
    127       DO jk = 1, jpk 
    128          DO ji = 1, jpi_crs 
    129             DO jj = 1, jpj_crs 
    130                IF( e3t_b_crs(ji,jj,jk) == 0._wp ) e3t_b_crs(ji,jj,jk) = e3t_1d(jk) 
    131                IF( e3w_b_crs(ji,jj,jk) == 0._wp ) e3w_b_crs(ji,jj,jk) = e3w_1d(jk) 
    132                IF( e3u_b_crs(ji,jj,jk) == 0._wp ) e3u_b_crs(ji,jj,jk) = e3t_1d(jk) 
    133                IF( e3v_b_crs(ji,jj,jk) == 0._wp ) e3v_b_crs(ji,jj,jk) = e3t_1d(jk) 
     107         zfse3t(:,:,:) = e3t_b(:,:,:) 
     108         zfse3u(:,:,:) = e3u_b(:,:,:) 
     109         zfse3v(:,:,:) = e3v_b(:,:,:) 
     110         zfse3w(:,:,:) = e3w_b(:,:,:) 
     111 
     112         CALL crs_dom_e3( e1t, e2t, zfse3t, p_sfc_3d_crs=e1e2w_crs, cd_type='T', p_mask=tmask, p_e3_crs=e3t_b_crs, p_e3_max_crs=zs_crs) 
     113         CALL crs_dom_e3( e1t, e2t, zfse3w, p_sfc_3d_crs=e1e2w_crs, cd_type='W', p_mask=tmask, p_e3_crs=e3w_b_crs, p_e3_max_crs=zs_crs) 
     114         CALL crs_dom_e3( e1u, e2u, zfse3u, p_sfc_2d_crs=e2u_crs  , cd_type='U', p_mask=umask, p_e3_crs=e3u_b_crs, p_e3_max_crs=zs_crs) 
     115         CALL crs_dom_e3( e1v, e2v, zfse3v, p_sfc_2d_crs=e1v_crs  , cd_type='V', p_mask=vmask, p_e3_crs=e3v_b_crs, p_e3_max_crs=zs_crs) 
     116 
     117         DO jk = 1, jpk 
     118            DO ji = 1, jpi_crs 
     119               DO jj = 1, jpj_crs 
     120                  IF( e3t_b_crs(ji,jj,jk) == 0._wp ) e3t_b_crs(ji,jj,jk) = e3t_1d(jk) 
     121                  IF( e3w_b_crs(ji,jj,jk) == 0._wp ) e3w_b_crs(ji,jj,jk) = e3w_1d(jk) 
     122                  IF( e3u_b_crs(ji,jj,jk) == 0._wp ) e3u_b_crs(ji,jj,jk) = e3t_1d(jk) 
     123                  IF( e3v_b_crs(ji,jj,jk) == 0._wp ) e3v_b_crs(ji,jj,jk) = e3t_1d(jk) 
     124               ENDDO 
    134125            ENDDO 
    135         ENDDO 
    136       ENDDO 
    137  
    138       e3t_n_crs(:,:,:) = e3t_a_crs(:,:,:) 
    139       e3u_n_crs(:,:,:) = e3u_a_crs(:,:,:) 
    140       e3v_n_crs(:,:,:) = e3v_a_crs(:,:,:) 
    141       e3w_n_crs(:,:,:) = e3w_a_crs(:,:,:) 
     126         ENDDO 
     127 
     128         e3t_n_crs(:,:,:) = e3t_a_crs(:,:,:) 
     129         e3u_n_crs(:,:,:) = e3u_a_crs(:,:,:) 
     130         e3v_n_crs(:,:,:) = e3v_a_crs(:,:,:) 
     131         e3w_n_crs(:,:,:) = e3w_a_crs(:,:,:) 
    142132 
    143133      ENDIF 
     
    158148#endif 
    159149 
    160       !zmin=MINVAL();zmax=MAXVAL();CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld ",zmin,zmax  
    161       !zmin=MINVAL();zmax=MAXVAL();CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld ",zmin,zmax  
    162  
    163150      IF( kt /= nit000 )THEN 
    164151         emp_b_crs(:,:)        = emp_crs(:,:) 
    165152         rnf_b_crs(:,:)        = rnf_crs(:,:) 
    166          hdivb_crs(:,:,:)      = hdivn_crs(:,:,:) !cbr hdivb_crs pas utile ????????????????????????????????? 
     153         hdivb_crs(:,:,:)      = hdivn_crs(:,:,:) 
    167154      ELSE 
    168155         emp_b_crs(:,:    ) = 0._wp 
    169156         rnf_b_crs(:,:    ) = 0._wp 
    170          hdivb_crs(:,:,:  ) = 0._wp  !cbr hdivb_crs pas utile ????????????????????????????????? 
     157         hdivb_crs(:,:,:  ) = 0._wp 
    171158      ENDIF 
    172159 
     
    181168      tsb_crs(:,:,:,jp_sal) = zs_crs(:,:,:) 
    182169 
    183       !  U-velocity  !cb  pas utile ????????????????????????????????? 
     170      !  U-velocity 
    184171      CALL crs_dom_ope( ub, 'SUM', 'U', umask, ub_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
    185172 
    186       !  V-velocity  pas utile ????????????????????????????????? 
     173      !  V-velocity 
    187174      CALL crs_dom_ope( vb, 'SUM', 'V', vmask, vb_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
    188175 
     
    190177      CALL crs_dom_ope( rn2b, 'VOL', 'W', tmask, rb2_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 ) 
    191178 
    192       !ssh !cbr pas utile ?????????????????????????????????????? 
     179      !ssh 
    193180      zfse3t(:,:,:) = 1._wp 
    194181      CALL crs_dom_ope( sshb , 'VOL', 'T', tmask, sshb_crs , p_e12=e1e2t, p_e3=zfse3t         , psgn=1.0 ) 
    195182 
    196183      !--------------------------------------------------------------------------------------------------- 
    197       !variables domaine au temps now :  
     184      !variables at now time :  
    198185      !--------------------------------------------------------------------------------------------------- 
    199186#if defined key_vvl 
     
    214201 
    215202#if defined key_vvl 
     203 
     204      ! surfaces 
    216205      CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=zfse3u ) 
    217206      CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=zfse3v ) 
     
    220209      CALL iom_put("e1e3v_crs",e1e3v_crs) 
    221210      CALL iom_put("e1e3v_msk",e1e3v_msk) 
    222       !                                                                                  
     211 
     212      ! vertical scale factors                                                                                  
    223213      CALL crs_dom_e3( e1t, e2t, zfse3t, p_sfc_3d_crs=e1e2w_crs, cd_type='T', p_mask=tmask, p_e3_crs=zs_crs, p_e3_max_crs=e3t_max_n_crs) 
    224214      CALL crs_dom_e3( e1t, e2t, zfse3w, p_sfc_3d_crs=e1e2w_crs, cd_type='W', p_mask=tmask, p_e3_crs=zs_crs, p_e3_max_crs=e3w_max_n_crs) 
     
    226216      CALL crs_dom_e3( e1v, e2v, zfse3v, p_sfc_2d_crs=e1v_crs  , cd_type='V', p_mask=vmask, p_e3_crs=zs_crs, p_e3_max_crs=e3v_max_n_crs) 
    227217 
    228      WHERE(e3t_max_n_crs == 0._wp) e3t_max_n_crs=r_inf 
    229      WHERE(e3u_max_n_crs == 0._wp) e3u_max_n_crs=r_inf 
    230      WHERE(e3v_max_n_crs == 0._wp) e3v_max_n_crs=r_inf 
    231      WHERE(e3w_max_n_crs == 0._wp) e3w_max_n_crs=r_inf 
    232  
     218      !cbr ??????????????????? faut pas mettre le profile 1d plutot ??????????? 
     219      WHERE(e3t_max_n_crs == 0._wp) e3t_max_n_crs=r_inf 
     220      WHERE(e3u_max_n_crs == 0._wp) e3u_max_n_crs=r_inf 
     221      WHERE(e3v_max_n_crs == 0._wp) e3v_max_n_crs=r_inf 
     222      WHERE(e3w_max_n_crs == 0._wp) e3w_max_n_crs=r_inf 
     223 
     224      ! depth 
    233225      CALL crs_dom_ope( gdepw_n, 'MAX', 'T', tmask, gdept_n_crs, p_e3=zfse3t, psgn=1.0 ) 
    234226      CALL crs_dom_ope( gdepw_n, 'MAX', 'W', tmask, gdepw_n_crs, p_e3=zfse3w, psgn=1.0 ) 
    235227 
     228      ! volume and facvol 
    236229      CALL crs_dom_facvol( tmask, 'T', e1t, e2t, zfse3t, ocean_volume_crs_t, facvol_t ) 
    237230      CALL iom_put("cvol_crs_t",ocean_volume_crs_t) 
     
    306299         CASE ( 4 ) 
    307300            CALL crs_dom_ope( avt, 'MED', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 ) 
    308          CASE ( 5 ) 
    309 #if defined key_zdftke 
    310             CALL crs_dom_ope( en        , 'VOL', 'W', tmask, en_crs   , p_e12=e1e2t, p_e3=zfse3w         , psgn=1.0 ) 
    311             CALL crs_dom_ope( taum      , 'SUM', 'T', tmask, taum_crs , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 ) 
    312             CALL crs_dom_ope( rn2(:,:,:), 'VOL', 'W', tmask, rn2_crs  , p_e12=e1e2t, p_e3=zfse3t         , psgn=1.0 ) 
    313             IF( kt==nit000 )CALL tke_avn_ini_crs 
    314             CALL tke_avn_crs 
    315             CALL zdf_evd_crs(kt) 
    316 #endif 
    317  
    318301      END SELECT 
    319302      ! 
     
    354337      CALL iom_put( "ssh"      , sshn_crs )   ! ssh output  
    355338 
    356       zmin=MINVAL(emp);zmax=MAXVAL(emp);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld emp",zmin,zmax  
    357       zmin=MINVAL(emp_b);zmax=MAXVAL(emp_b);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld emp_b",zmin,zmax  
    358       zmin=MINVAL(emp_crs);zmax=MAXVAL(emp_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld emp_crs",zmin,zmax  
    359       zmin=MINVAL(emp_b_crs);zmax=MAXVAL(emp_b_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld emp_b_crs",zmin,zmax  
    360339 
    361340#if defined key_vvl 
     
    364343      !--------------------------------------------------------------------------------------------------- 
    365344 
    366       !cbr ssha_crs utile ?????????????????? 
     345      !ssha 
    367346      zfse3t(:,:,:) = 1._wp 
    368347      zt(:,:,:) = tmask(:,:,:) 
    369348      ssha(:,:) = ssha(:,:) * tmask(:,:,1)  !cbr utile ?????????????????? 
    370349      CALL crs_dom_ope( ssha , 'VOL', 'T', zt, ssha_crs , p_e12=e1e2t,  p_e3=zfse3t , psgn=1.0 ) 
    371       !CALL crs_lbc_lnk( ssha_crs, 'T', 1.0 ) !!!!!!!!!!!!!!!!!!! pas utile !!!!!!!!!!!!!!!!!!!!!!!!! 
    372  
    373  
     350 
     351      !vertical scale factors 
    374352      zfse3t(:,:,:) = e3t_a(:,:,:) 
    375353      zfse3u(:,:,:) = e3u_a(:,:,:) 
     
    381359      CALL crs_dom_e3( e1u, e2u, zfse3u, p_sfc_2d_crs=e2u_crs  , cd_type='U', p_mask=umask, p_e3_crs=e3u_a_crs, p_e3_max_crs=zs_crs) 
    382360      CALL crs_dom_e3( e1v, e2v, zfse3v, p_sfc_2d_crs=e1v_crs  , cd_type='V', p_mask=vmask, p_e3_crs=e3v_a_crs, p_e3_max_crs=zs_crs) 
    383  
    384  
    385       !DO ji=1,jpi_crs 
    386       !   DO jj=1,jpj_crs 
    387       !      fse3t_a_crs(ji,jj,jk),fse3t_b_crs(ji,jj,jk)+fse3t_n_crs(ji,jj,jk)*(ssha_crs(ji,jj)-sshb_crs(ji,jj))/(ht_0_crs(ji,jj)+sshn_crs(ji,jj)) 
    388       !   ENDDO 
    389       !ENDDO 
    390       !CALL dom_vvl_interpol_crs( fse3t_a_crs(:,:,:), fse3u_a(:,:,:), 'U' ) 
    391       !CALL dom_vvl_interpol_crs( fse3t_a_crs(:,:,:), fse3v_a(:,:,:), 'V' ) 
    392       !CALL dom_vvl_interpol_crs( fse3t_a_crs(:,:,:), fse3w_a(:,:,:), 'W' ) 
    393  
    394       !CALL crs_dom_sfc( umask, 'U', zt_crs, zs_crs, p_e2=e2u, p_e3=zfse3u ) ! zt_crs=e2e3u_crs,zs_crs=e2e3u_msk ça sert à quoi ??????????????????????????????????????????? 
    395       !CALL crs_dom_sfc( vmask, 'V', zt_crs, zs_crs, p_e1=e2v, p_e3=zfse3v ) ! zt_crs=e1e3v_crs,zs_crs=e1e3v_msk ça sert à quoi ??????????????????????????????????????????? 
    396361 
    397362      DO jk = 1, jpk 
     
    405370        ENDDO 
    406371      ENDDO 
    407  
    408       zmin=MINVAL(e3t_b);zmax=MAXVAL(e3t_b);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_b",zmin,zmax  
    409       zmin=MINVAL(e3t_n);zmax=MAXVAL(e3t_n);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_n",zmin,zmax  
    410       zmin=MINVAL(e3t_a);zmax=MAXVAL(e3t_a);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_a",zmin,zmax  
    411       zmin=MINVAL(e3t_b_crs);zmax=MAXVAL(e3t_b_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_b_crs",zmin,zmax  
    412       zmin=MINVAL(e3t_n_crs);zmax=MAXVAL(e3t_n_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_n_crs",zmin,zmax  
    413       zmin=MINVAL(e3t_a_crs);zmax=MAXVAL(e3t_a_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld e3t_a_crs",zmin,zmax  
    414       zmin=MINVAL(sshb);zmax=MAXVAL(sshb);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld sshb",zmin,zmax  
    415       zmin=MINVAL(sshn);zmax=MAXVAL(sshn);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld sshn",zmin,zmax  
    416       zmin=MINVAL(ssha);zmax=MAXVAL(ssha);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld ssha",zmin,zmax  
    417       zmin=MINVAL(sshb_crs);zmax=MAXVAL(sshb_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld sshb_crs",zmin,zmax  
    418       zmin=MINVAL(sshn_crs);zmax=MAXVAL(sshn_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld sshn_crs",zmin,zmax  
    419       zmin=MINVAL(ssha_crs);zmax=MAXVAL(ssha_crs);CALL mpp_min(zmin);CALL mpp_max(zmax);IF(lwp)WRITE(numout,*)"crsfld ssha_crs",zmin,zmax  
    420372 
    421373      !zt_crs=ocean_volume_crs_t ; zs_crs=facvol_t after time !!! ça sert à quoi ??????????????????????????????????????????? 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90

    r7215 r7217  
    7373      REAL(wp), DIMENSION(:,:,:), POINTER :: zfse3t, zfse3u, zfse3v, zfse3w 
    7474 
    75       NAMELIST/namcrs/ nn_factx, nn_facty, nn_binref, nn_msh_crs, nn_crs_kz, ln_crs_wn, ln_crs_top 
     75      NAMELIST/namcrs/ nn_factx, nn_facty, nn_msh_crs, nn_crs_kz, ln_crs_wn, ln_crs_top 
    7676      !!---------------------------------------------------------------------- 
    7777      ! 
     
    102102        WRITE(numout,*) '   coarsening factor in i-direction      nn_factx   = ', nn_factx 
    103103        WRITE(numout,*) '   coarsening factor in j-direction      nn_facty   = ', nn_facty 
    104         WRITE(numout,*) '   bin centering preference              nn_binref  = ', nn_binref 
    105104        WRITE(numout,*) '   create (=1) a mesh file or not (=0)   nn_msh_crs = ', nn_msh_crs 
    106105        WRITE(numout,*) '   type of Kz coarsening (0,1,2)         nn_crs_kz  = ', nn_crs_kz 
     
    113112           CASE ( 3 ) ; WRITE(numout,*) '   coarsene KZ with MEANLOG(KZ)' 
    114113           CASE ( 4 ) ; WRITE(numout,*) '   coarsene KZ with MEDIANE(KZ)' 
    115            CASE ( 5 ) ; WRITE(numout,*) '   coarsene KZ with TKE coarsening' 
    116114       END SELECT 
    117115     ENDIF 
     
    129127     ! 3. Mask and Mesh 
    130128     !--------------------------------------------------------- 
    131  
    132      !     Set up the masks and meshes      
    133129 
    134130     !  3.a. Get the masks    
     
    201197     CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=zfse3v ) 
    202198 
    203      !cbr utile ???????????????????????????????? 
    204199     DO jk=1,jpk 
    205200        DO ji=1,jpi_crs 
     
    259254     ENDDO 
    260255 
    261 !cbr utile ???????? on le fait ds crsfld, nan ? 
    262256#if defined key_vvl 
    263257     e3t_b_crs(:,:,:) = e3t_0_crs(:,:,:) 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r5602 r7217  
    4343   INTEGER , PUBLIC ::   nn_closea       !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
    4444   INTEGER , PUBLIC ::   nn_euler        !: =0 start with forward time step or not (=1) 
    45    LOGICAL , PUBLIC ::   ln_crs          !: Apply grid coarsening to dynamical model output or online passive tracers 
    4645 
    4746   !! Time splitting parameters 
     
    314313 
    315314   !!---------------------------------------------------------------------- 
     315   !! coarsening for output and/or BCG  
     316   !!---------------------------------------------------------------------- 
     317#if defined key_crs 
     318   LOGICAL, PUBLIC, PARAMETER ::   lk_crs = .TRUE.    !: crs flag 
     319#else 
     320   LOGICAL, PUBLIC, PARAMETER ::   lk_crs = .FALSE.   !: crs flag 
     321#endif 
     322 
     323   !!---------------------------------------------------------------------- 
    316324   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
    317325   !! $Id$  
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r5602 r7217  
    141141      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
    142142         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
    143          &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    & 
     143         &             rn_rdtmax, rn_rdth     , nn_closea   ,  & 
    144144         &             jphgr_msh, & 
    145145         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
     
    273273         WRITE(numout,*) '                  depth of transition       rn_rdth   = ', rn_rdth 
    274274         WRITE(numout,*) '      suppression of closed seas (=0)       nn_closea = ', nn_closea 
    275          WRITE(numout,*) '      online coarsening of dynamical fields ln_crs    = ', ln_crs 
    276275         WRITE(numout,*) '      type of horizontal mesh jphgr_msh           = ', jphgr_msh 
    277276         WRITE(numout,*) '      longitude of first raw and column T-point ppglam0 = ', ppglam0 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r6101 r7217  
    2222                       gphiv, gphif, & 
    2323                       agrif_root, agrif_cfixed, lk_agrif, & 
    24                        rdt,rdttra, gdept_0, ln_crs, gdepw_0,  adatrj, fjulday, & 
     24                       rdt,rdttra, gdept_0, gdepw_0,  adatrj, fjulday, & 
    2525                       mikt 
    2626 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r7204 r7217  
    395395      IF( ln_ctl        )   CALL prt_ctl_init   ! Print control 
    396396 
    397       IF( ln_crs        )   CALL     crs_init   ! Domain initialization of coarsened grid 
     397      IF( lk_crs        )   CALL     crs_init   ! Domain initialization of coarsened grid 
    398398 
    399399                            CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
     
    410410                            CALL dyn_nept_init  ! simplified form of Neptune effect 
    411411      !      
    412       IF( ln_crs        )   CALL     eos_init_crs   ! Equation of state 
     412      IF( lk_crs        )   CALL     eos_init_crs   ! Equation of state 
    413413      ! 
    414414                                ! Ocean physics 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/step.F90

    r7204 r7217  
    9393         ! must be done after nemo_init for AGRIF+XIOS+OASIS 
    9494                      CALL iom_init(      cxios_context          )  ! iom_put initialization 
    95          IF( ln_crs ) CALL iom_init( TRIM(cxios_context)//"_crs" )  ! initialize context for coarse grid 
     95         IF( lk_crs ) CALL iom_init( TRIM(cxios_context)//"_crs" )  ! initialize context for coarse grid 
    9696      ENDIF 
    9797 
    9898      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
    9999                             CALL iom_setkt( kstp - nit000 + 1,      cxios_context          )   ! tell iom we are at time step kstp 
    100       IF( ln_crs     )       CALL iom_setkt( kstp - nit000 + 1, TRIM(cxios_context)//"_crs" )   ! tell iom we are at time step kstp 
     100      IF( lk_crs     )       CALL iom_setkt( kstp - nit000 + 1, TRIM(cxios_context)//"_crs" )   ! tell iom we are at time step kstp 
    101101 
    102102      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    236236                            CALL dia_wri( kstp )         ! ocean model: outputs 
    237237      ! 
    238       IF( ln_crs     )      CALL crs_fld( kstp )         ! ocean model: online field coarsening & output 
     238      IF( lk_crs     )      CALL crs_fld( kstp )         ! ocean model: online field coarsening & output 
    239239 
    240240      CALL wrk_alloc( jpi, jpj, jpk, zrhop, zrhd ) 
     
    249249      ! Passive Tracer Model 
    250250      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    251       IF( ln_crs )   THEN 
     251      IF( lk_crs )   THEN 
    252252                         CALL dom_grid_crs 
    253253 
     
    391391      IF( kstp == nitend .OR. indic < 0 ) THEN  
    392392                      CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    393          IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
     393         IF( lk_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
    394394      ENDIF 
    395395#endif 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90

    r6786 r7217  
    1414   USE trc         ! passive tracers common variables  
    1515   USE oce_trc 
    16    USE crs, ONLY : ln_crs,ln_crs_top,ahtt_crs,ahtu_crs,ahtv_crs,ahtw_crs,jpi_crs,jpj_crs 
     16   USE crs, ONLY : ln_crs_top !cbr ????,ahtt_crs,ahtu_crs,ahtv_crs,ahtw_crs,jpi_crs,jpj_crs 
    1717   USE iom, ONLY : iom_swap, iom_put 
    1818   USE ieee_arithmetic 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r7215 r7217  
    3434   USE zpshde          ! partial step: hor. derivative       (zps_hde routine) 
    3535   USE zpshde_crs      ! partial step: hor. derivative       (zps_hde routine) 
    36    USE dom_oce , ONLY : ln_crs, ln_isfcav 
     36   USE dom_oce , ONLY : ln_isfcav 
    3737   USE crs     , ONLY : jpi_crs,jpj_crs,wn_crs,ln_crs_top,sbc_trc_crs,sbc_trc_b_crs 
    3838   USE ldfslp_crs 
     
    7676      IF( .NOT. lk_c1d ) THEN 
    7777         ! 
    78          CALL test(kstp,1) 
    7978                               CALL trc_sbc( kstp ) 
    80          CALL test(kstp,2) 
    8179         IF( ln_crs_top ) THEN ;    CALL trc_bbl_crs( kstp ) 
    8280         ELSE              ;    CALL trc_bbl( kstp ) 
     
    8482         IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends 
    8583 
    86          CALL test(kstp,3) 
    8784         IF( ln_crs_top ) THEN ;    CALL trc_adv_crs( kstp ) 
    8885         ELSE              ;    CALL trc_adv( kstp ) 
    8986         ENDIF 
    9087 
    91          CALL test(kstp,4) 
    9288         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only 
    9389         IF( ln_crs_top ) THEN ;    CALL trc_ldf_crs( kstp ) 
    9490         ELSE              ;    CALL trc_ldf( kstp ) 
    9591         ENDIF 
    96          CALL test(kstp,5) 
    9792         IF( .NOT. lk_offline .AND. lk_zdfkpp )    & 
    9893            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes 
     
    10398         ELSE              ;    CALL trc_zdf( kstp ) 
    10499         ENDIF 
    105          CALL test(kstp,6) 
    106100 
    107101                                CALL trc_nxt( kstp )            ! tracer fields at next time step      
    108          CALL test(kstp,10) 
    109102         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
    110103 
     
    140133   END SUBROUTINE trc_trp 
    141134 
    142    SUBROUTINE test(kt,i) 
    143    INTEGER,INTENT(IN) :: kt,i 
    144    REAL(wp)::zmin,zmax 
    145    INTEGER :: ji,jj,jk 
    146    zmin=MINVAL( trb(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_min(zmin) 
    147    zmax=MAXVAL( trb(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_max(zmax) 
    148    IF(lwp)WRITE(numout,*)"trctrp b ",kt,i,zmin,zmax    
    149    zmin=MINVAL( trn(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_min(zmin) 
    150    zmax=MAXVAL( trn(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_max(zmax) 
    151    IF(lwp)WRITE(numout,*)"trctrp n ",kt,i,zmin,zmax    
    152    zmin=MINVAL( tra(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_min(zmin) 
    153    zmax=MAXVAL( tra(2:jpi-1,2:jpj-1,:,1),mask=(tmask(2:jpi-1,2:jpj-1,:)==1)) ; CALL mpp_max(zmax) 
    154    IF(lwp)WRITE(numout,*)"trctrp a ",kt,i,zmin,zmax    
    155  
    156    DO ji=1,jpi 
    157    DO jj=1,jpj 
    158    DO jk=1,jpk 
    159    IF( ieee_is_nan(tra(ji,jj,jk,1)))WRITE(narea+200,*)"test nan a",kt,i,ji,jj,jk,tmask(ji,jj,jk) 
    160    IF( ieee_is_nan(trn(ji,jj,jk,1)))WRITE(narea+200,*)"test nan n",kt,i,ji,jj,jk,tmask(ji,jj,jk) 
    161    IF( ieee_is_nan(trb(ji,jj,jk,1)))WRITE(narea+200,*)"test nan b",kt,i,ji,jj,jk,tmask(ji,jj,jk) 
    162    ENDDO 
    163    ENDDO 
    164    ENDDO 
    165  
    166    END SUBROUTINE test 
    167135#else 
    168136   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6101 r7217  
    3030   USE trcsub          ! variables to substep passive tracers 
    3131   USE lib_mpp         ! distribued memory computing library 
    32    USE crs    , ONLY : ln_crs 
     32   USE crs    , ONLY : ln_crs_top 
    3333   USE dom_oce, ONLY : nn_cla, ln_isfcav 
    3434   USE trcice          ! tracers in sea ice 
     
    148148  
    149149      tra(:,:,:,:) = 0._wp 
    150       IF( ln_crs )  THEN 
     150      IF( ln_crs_top)  THEN 
    151151         CALL zps_hde_crs( nit000, jptra, trn, gtru, gtrv ) 
    152152      ELSE 
Note: See TracChangeset for help on using the changeset viewer.