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 8894 for branches/2015 – NEMO

Changeset 8894 for branches/2015


Ignore:
Timestamp:
2017-12-04T18:06:36+01:00 (6 years ago)
Author:
cbricaud
Message:

crs improvments

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

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90

    r8753 r8894  
    2828   USE crslbclnk 
    2929   USE iom 
    30    USE zdfmxl_crs 
    3130   USE eosbn2 
    3231   USE zdftke 
     
    292291 
    293292      !2D fields 
    294       CALL crs_dom_ope( rnf  , 'SUM', 'T', tmask, rnf_crs  , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 ) 
    295       CALL crs_dom_ope( h_rnf, 'MAX', 'T', tmask, h_rnf_crs                                   , psgn=1.0 ) 
     293      CALL crs_dom_ope( rnf  , 'SUM', 'T', tmask, rnf_crs  , p_e12=e1e2t, p_surf_crs=e1e2w_msk(:,:,1), psgn=1.0 ) 
     294      CALL crs_dom_ope( h_rnf, 'MAX', 'T', tmask, h_rnf_crs                                          , psgn=1.0 ) 
    296295 
    297296      z2d=REAL(nk_rnf,wp) 
    298       CALL crs_dom_ope( z2d  , 'MAX', 'T', tmask, z2d_crs  , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 ) 
     297      !cbr CALL crs_dom_ope( z2d  , 'MAX', 'T', tmask, z2d_crs  , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 ) 
     298      CALL crs_dom_ope( z2d  , 'MAX', 'T', tmask, z2d_crs , psgn=1.0 ) 
    299299      nk_rnf_crs=INT(z2d_crs) 
    300300 
     
    308308 
    309309      z2d=REAL(nmln,wp) 
    310       CALL crs_dom_ope( z2d , 'MAX', 'T', tmask, z2d_crs , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 ) 
     310      !cbr CALL crs_dom_ope( z2d  , 'SUM', 'T', tmask, z2d_crs   , p_e12=e1e2t, p_surf_crs=e1e2w_msk(:,:,1), psgn=1.0 ) 
     311      CALL crs_dom_ope( z2d  , 'MAX', 'T', tmask, z2d_crs  ,  psgn=1.0 ) 
    311312      nmln_crs=INT(z2d_crs)  
    312       nmln_crs=MAX(nlb10,nmln_crs)     
     313      !cbr nmln_crs=MAX(nlb10,nmln_crs)     
     314 
     315      !cbr CALL crs_dom_ope( hmld , 'SUM', 'T', tmask, hmld_crs , p_e12=e1e2t, p_surf_crs=e1e2w_msk(:,:,1), psgn=1.0 ) 
     316      CALL crs_dom_ope( hmld , 'MAX', 'T', tmask, hmld_crs ,  psgn=1.0 ) 
     317      CALL crs_dom_ope( hmlp , 'SUM', 'T', tmask, hmlp_crs , p_e12=e1e2t, p_surf_crs=e1e2w_msk(:,:,1), psgn=1.0 ) 
     318      CALL crs_dom_ope( hmlpt, 'SUM', 'T', tmask, hmlpt_crs, p_e12=e1e2t, p_surf_crs=e1e2w_msk(:,:,1), psgn=1.0 ) 
     319 
     320      CALL iom_put( "mldkz5"   , hmld_crs ) 
    313321 
    314322      CALL iom_put( "utau"     , utau_crs )   ! i-tau output  
     
    316324      CALL iom_put( "wspd"     , wndm_crs )   ! wind speed output  
    317325      CALL iom_put( "runoffs"  , rnf_crs  )   ! runoff output  
     326 
    318327      CALL iom_put( "qsr"      , qsr_crs  )   ! qsr output  
    319       CALL iom_put( "empmr"    , emp_crs  )   ! water flux output  
    320       CALL iom_put( "saltflx"  , fmmflx_crs  )   ! salt flux output  
     328      CALL iom_put( "empmr"    , emp_crs - rnf_crs  )   ! water flux output  
     329      !CALL iom_put( "saltflx"  , fmmflx_crs  )   ! salt flux output  
     330      CALL iom_put( "fmmflx", fmmflx_crs  )                      ! Freezing-melting water flux 
    321331      CALL iom_put( "ice_cover", fr_i_crs )   ! ice cover output  
    322332 
     
    370380               &                          + z1_2dt * e1e2w_crs(:,:,jk) * ( e3t_a_crs(:,:,jk) - e3t_b_crs(:,:,jk) ) ) * tmask_crs(:,:,jk) 
    371381         WHERE( e1e2w_msk(:,:,jk) .NE. 0._wp )  wn_crs(:,:,jk) =  wn_crs(:,:,jk) /e1e2w_msk(:,:,jk) 
     382 
    372383 
    373384      ENDDO 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp_crs.F90

    r7256 r8894  
    2626   USE ldfdyn_oce      ! lateral diffusion: dynamics 
    2727   USE phycst          ! physical constants 
    28    USE zdfmxl_crs      ! mixed layer depth 
    2928   USE eosbn2_crs      ! equation of states 
    3029   USE crslbclnk       ! ocean lateral boundary conditions (or mpp link) 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r7520 r8894  
    2424   USE lbclnk          ! ocean lateral boundary conditions (C1D case) 
    2525   USE ioipsl, ONLY  : ymds2ju, ju2ymds   ! for calendar 
    26    USE sbc_oce, ONLY : nn_components,nn_lsm,jp_iam_sas 
     26   USE sbc_oce, ONLY : nn_components,nn_lsm,jp_iam_sas,nn_fsbc 
    2727    
    2828   IMPLICIT NONE 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/step.F90

    r7806 r8894  
    242242      IF( lk_crs     )      CALL crs_fld( kstp )         ! ocean model: online field coarsening & output 
    243243 
    244       CALL wrk_alloc( jpi, jpj, jpk, zrhop, zrhd ) 
    245       CALL eos( tsn, zrhd, zrhop, fsdept_n(:,:,:) )                 ! now in situ and potential density 
    246       zrhop(:,:,jpk) = 0._wp 
    247       CALL iom_put( 'rhop', zrhop ) 
    248  
    249       CALL wrk_dealloc( jpi, jpj, jpk, zrhop, zrhd ) 
    250  
    251244#if defined key_top 
    252245      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    256249                         CALL dom_grid_crs 
    257250 
    258                          CALL zdf_mxl_crs(kstp) 
    259251                         CALL eos_crs ( tsn_crs, rhd_crs, rhop_crs, fsdept_crs(:,:,:) ) ! now in situ density for hpg computation 
    260252 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/step_oce.F90

    r7806 r8894  
    101101   USE crs 
    102102   USE crsfld           ! Standard output on coarse grid   (crs_fld routine) 
    103    USE zdfmxl_crs 
    104103   USE eosbn2_crs 
    105104   USE zpshde_crs 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    r5602 r8894  
    1414   USE dom_oce         ! ocean space and time domain 
    1515   USE lib_mpp         ! MPP library 
    16  
     16#if defined key_crs 
     17   USE crs, ONLY: tmask_crs, gdepw_n_crs 
     18#endif 
    1719   IMPLICIT NONE 
    1820   PRIVATE 
     
    2123   PUBLIC   trc_oce_rgb_read   ! routine called by traqsr.F90 
    2224   PUBLIC   trc_oce_ext_lev    ! function called by traqsr.F90 at least 
    23    PUBLIC   trc_oce_alloc      ! function called by nemogcm.F90 
     25   PUBLIC   trc_oce_alloc 
     26#if defined key_crs 
     27   PUBLIC   trc_oce_ext_lev_crs    ! function called by traqsr.F90 at least 
     28#endif 
    2429 
    2530   INTEGER , PUBLIC                                      ::   nn_dttrc      !: frequency of step on passive tracers 
     
    285290   END FUNCTION trc_oce_ext_lev 
    286291 
     292 
     293#if defined key_crs 
     294   FUNCTION trc_oce_ext_lev_crs( prldex, pqsr_frc ) RESULT( pjl ) 
     295      !!---------------------------------------------------------------------- 
     296      !!                 ***  ROUTINE trc_oce_ext_lev  *** 
     297      !!        
     298      !! ** Purpose :   compute max. level for light penetration 
     299      !!           
     300      !! ** Method  :   the function provides the level at which irradiance  
     301      !!                becomes negligible (i.e. = 1.e-15 W/m2) for 3 or 2 bands light 
     302      !!                penetration: I(z) = pqsr_frc * EXP(hext/prldex) = 1.e-15 W/m2 
     303      !!                # prldex is the longest depth of extinction: 
     304      !!                   - prldex = 23 m (2 bands case) 
     305      !!                   - prldex = 62 m (3 bands case: blue waveband & 0.01 mg/m2 for the chlorophyll) 
     306      !!                # pqsr_frc is the fraction of solar radiation which penetrates, 
     307      !!                considering Qsr=240 W/m2 and rn_abs = 0.58: 
     308      !!                   - pqsr_frc = Qsr * (1-rn_abs)   = 1.00e2 W/m2 (2 bands case) 
     309      !!                   - pqsr_frc = Qsr * (1-rn_abs)/3 = 0.33e2 W/m2 (3 bands case & equi-partition) 
     310      !! 
     311      !!---------------------------------------------------------------------- 
     312      REAL(wp), INTENT(in) ::   prldex    ! longest depth of extinction 
     313      REAL(wp), INTENT(in) ::   pqsr_frc  ! frac. solar radiation which penetrates  
     314      !! 
     315      INTEGER  ::   jk, pjl            ! levels 
     316      REAL(wp) ::   zhext              ! deepest level till which light penetrates 
     317      REAL(wp) ::   zprec = 15._wp     ! precision to reach -LOG10(1.e-15) 
     318      REAL(wp) ::   zem                ! temporary scalar  
     319      !!---------------------------------------------------------------------- 
     320      ! 
     321      ! It is not necessary to compute anything below the following depth 
     322      zhext = prldex * ( LOG(10._wp) * zprec + LOG(pqsr_frc) ) 
     323      ! 
     324      ! Level of light extinction 
     325      pjl = jpkm1 
     326      DO jk = jpkm1, 1, -1 
     327         IF(SUM(tmask_crs(:,:,jk)) > 0 ) THEN 
     328            zem = MAXVAL( gdepw_n_crs(:,:,jk+1) * tmask_crs(:,:,jk) ) 
     329            IF( zem >= zhext )   pjl = jk                       ! last T-level reached by Qsr 
     330         ELSE 
     331            pjl = jk                                            ! or regional sea-bed depth  
     332         ENDIF 
     333      END DO 
     334      ! 
     335   END FUNCTION trc_oce_ext_lev_crs 
     336 
     337#endif  
    287338   !!====================================================================== 
    288339END MODULE trc_oce 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf_crs.F90

    r8088 r8894  
    2121   USE ldftra_oce,ONLY: ln_traldf_grif,rn_aht_0,rn_ahtb_0,lk_traldf_eiv     ! lateral diffusion coefficient on tracers 
    2222   USE ldfslp          ! ??? 
    23    USE traldf_bilapg   ! lateral mixing            (tra_ldf_bilapg routine) 
    24    USE traldf_bilap    ! lateral mixing            (tra_ldf_bilap routine) 
    2523   USE traldf_iso_crs      ! lateral mixing            (tra_ldf_iso routine) 
    26    USE traldf_iso_grif ! lateral mixing          (tra_ldf_iso_grif routine) 
    27    USE traldf_lap_crs      ! lateral mixing            (tra_ldf_lap routine) 
    2824   USE trd_oce 
    2925   USE trdtra 
     
    8884      ENDIF 
    8985 
    90 !      WRITE(numout,*) 'nldf', nldf 
    9186      SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
    92       CASE ( 0 )   ;   CALL tra_ldf_lap_crs   ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra            )  ! iso-level laplacian 
    9387      CASE ( 1 )                                                                                            ! rotated laplacian 
    94                        IF( ln_traldf_grif ) THEN 
    95                           CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    96                        ELSE 
    97                           CALL tra_ldf_iso_crs     ( kt, nittrc000, 'TRC', gtru ,gtrv , trb, tra, jptra, rn_ahtb_0 ) 
    98                        ENDIF 
    99       CASE ( 2 )   ;   CALL tra_ldf_bilap ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra            )  ! iso-level bilaplacian 
    100       CASE ( 3 )   ;   CALL tra_ldf_bilapg( kt, nittrc000, 'TRC',             trb, tra, jptra            )  ! s-coord. horizontal bilaplacian 
     88                        CALL tra_ldf_iso_crs     ( kt, nittrc000, 'TRC', gtru ,gtrv , trb, tra, jptra, rn_ahtb_0 ) 
    10189         ! 
    10290      CASE ( -1 )                                     ! esopa: test all possibility with control print 
    103          CALL tra_ldf_lap_crs   ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra            ) 
    104          WRITE(charout, FMT="('ldf0 ')") ;  CALL prt_ctl_trc_info(charout) 
    10591                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    106          IF( ln_traldf_grif ) THEN 
    107             CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    108          ELSE 
    109             CALL tra_ldf_iso_crs     ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    110          ENDIF 
     92         CALL tra_ldf_iso_crs     ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    11193         WRITE(charout, FMT="('ldf1 ')") ;  CALL prt_ctl_trc_info(charout) 
    112                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    113          CALL tra_ldf_bilap ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra            ) 
    114          WRITE(charout, FMT="('ldf2 ')") ;  CALL prt_ctl_trc_info(charout) 
    115                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    116          CALL tra_ldf_bilapg( kt, nittrc000, 'TRC',             trb, tra, jptra            ) 
    117          WRITE(charout, FMT="('ldf3 ')") ;  CALL prt_ctl_trc_info(charout) 
    11894                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    11995      END SELECT 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90

    r8089 r8894  
    6666   USE par_oce , ONLY :   jp_tem   =>   jp_tem     !: indice for temperature 
    6767   USE par_oce , ONLY :   jp_sal   =>   jp_sal     !: indice for salinity 
     68 
     69   USE trc_oce    , ONLY : trc_oce_ext_lev_crs 
    6870 
    6971   !* IO manager * 
     
    142144   USE crs , ONLY :   e2t        =>   e2t_crs        !: horizontal scale factors at t-point (m)    
    143145   USE crs , ONLY :   e1e2t      =>   e1e2t_crs      !: cell surface at t-point (m2) 
     146   USE crs , ONLY :   e1e2w_msk  =>   e1e2w_msk      !: cell surface at t-point (m2) 
    144147   USE crs , ONLY :   e1u        =>   e1u_crs        !: horizontal scale factors at u-point (m) 
    145148   USE crs , ONLY :   e2u        =>   e2u_crs        !: horizontal scale factors at u-point (m) 
     
    342345   USE dom_oce , ONLY :   gdepw_0    =>  gdepw_0         !: f-points (m) 
    343346   USE dom_oce , ONLY :   gdept_1d   => gdept_1d          !: f-points (m) 
     347   USE dom_oce , ONLY :   e3t_1d     => e3t_1d          !: f-points (m) 
    344348   USE dom_oce , ONLY :   tmask      => tmask          !: f-points (m) 
    345349   USE dom_oce , ONLY :   umask      => umask          !: f-points (m) 
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/trcdia.F90

    r5105 r8894  
    2020   !! trcdib_wr   : outputs of biological fields 
    2121   !!---------------------------------------------------------------------- 
    22    USE trc_oce, ONLY : lk_offline ! offline flag 
     22   USE trc_oce, ONLY : lk_offline,nn_dttrc ! offline flag 
    2323   USE trc 
    2424   USE par_trc 
Note: See TracChangeset for help on using the changeset viewer.