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 15540 for NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/CRS/crsini.F90 – NEMO

Ignore:
Timestamp:
2021-11-26T12:27:56+01:00 (3 years ago)
Author:
sparonuz
Message:

Mixed precision version, tested up to 30 years on ORCA2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/CRS/crsini.F90

    r14219 r15540  
    7676      INTEGER  :: ierr                                ! allocation error status 
    7777      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    78       REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, ze3u, ze3v, ze3w 
     78      REAL(dp), DIMENSION(jpi,jpj,jpk) :: ze3t, ze3u, ze3v, ze3w 
    7979 
    8080      NAMELIST/namcrs/ nn_factx, nn_facty, nn_binref, ln_msh_crs, nn_crs_kz, ln_crs_wn 
     
    128128     !       
    129129     IF ( nresty /= 0 .AND. nrestx /= 0 ) THEN 
    130         CALL crs_dom_coordinates( CASTWP(gphit), CASTWP(glamt), 'T', gphit_crs, glamt_crs )  
     130        CALL crs_dom_coordinates( gphit, glamt, 'T', gphit_crs, glamt_crs )  
    131131        CALL crs_dom_coordinates( gphiu, glamu, 'U', gphiu_crs, glamu_crs )        
    132132        CALL crs_dom_coordinates( gphiv, glamv, 'V', gphiv_crs, glamv_crs )  
    133         CALL crs_dom_coordinates( CASTWP(gphif), CASTWP(glamf), 'F', gphif_crs, glamf_crs )  
     133        CALL crs_dom_coordinates( gphif, glamf, 'F', gphif_crs, glamf_crs )  
    134134     ELSEIF ( nresty /= 0 .AND. nrestx == 0 ) THEN 
    135135        CALL crs_dom_coordinates( gphiu, glamu, 'T', gphit_crs, glamt_crs ) 
    136136        CALL crs_dom_coordinates( gphiu, glamu, 'U', gphiu_crs, glamu_crs ) 
    137         CALL crs_dom_coordinates( CASTWP(gphif), CASTWP(glamf), 'V', gphiv_crs, glamv_crs ) 
    138         CALL crs_dom_coordinates( CASTWP(gphif), CASTWP(glamf), 'F', gphif_crs, glamf_crs ) 
     137        CALL crs_dom_coordinates( gphif, glamf, 'V', gphiv_crs, glamv_crs ) 
     138        CALL crs_dom_coordinates( gphif, glamf, 'F', gphif_crs, glamf_crs ) 
    139139     ELSEIF ( nresty == 0 .AND. nrestx /= 0 ) THEN 
    140140        CALL crs_dom_coordinates( gphiv, glamv, 'T', gphit_crs, glamt_crs ) 
    141         CALL crs_dom_coordinates( CASTWP(gphif), CASTWP(glamf), 'U', gphiu_crs, glamu_crs ) 
     141        CALL crs_dom_coordinates( gphif, glamf, 'U', gphiu_crs, glamu_crs ) 
    142142        CALL crs_dom_coordinates( gphiv, glamv, 'V', gphiv_crs, glamv_crs ) 
    143         CALL crs_dom_coordinates( CASTWP(gphif), CASTWP(glamf), 'F', gphif_crs, glamf_crs ) 
     143        CALL crs_dom_coordinates( gphif, glamf, 'F', gphif_crs, glamf_crs ) 
    144144     ELSE  
    145         CALL crs_dom_coordinates(CASTWP(gphif),CASTWP(glamf), 'T', gphit_crs, glamt_crs ) 
    146         CALL crs_dom_coordinates(CASTWP(gphif),CASTWP(glamf), 'U', gphiu_crs, glamu_crs ) 
    147         CALL crs_dom_coordinates(CASTWP(gphif),CASTWP(glamf), 'V', gphiv_crs, glamv_crs ) 
    148         CALL crs_dom_coordinates(CASTWP(gphif),CASTWP(glamf), 'F', gphif_crs, glamf_crs ) 
     145        CALL crs_dom_coordinates(gphif,glamf, 'T', gphit_crs, glamt_crs ) 
     146        CALL crs_dom_coordinates(gphif,glamf, 'U', gphiu_crs, glamu_crs ) 
     147        CALL crs_dom_coordinates(gphif,glamf, 'V', gphiv_crs, glamv_crs ) 
     148        CALL crs_dom_coordinates(gphif,glamf, 'F', gphif_crs, glamf_crs ) 
    149149     ENDIF 
    150150 
     
    154154     !      3.c.1 Horizontal scale factors 
    155155 
    156      CALL crs_dom_hgr( CASTWP(e1t), CASTWP(e2t), 'T', e1t_crs, e2t_crs ) 
    157      CALL crs_dom_hgr( CASTWP(e1u), e2u, 'U', e1u_crs, e2u_crs ) 
    158      CALL crs_dom_hgr( e1v, CASTWP(e2v), 'V', e1v_crs, e2v_crs ) 
    159      CALL crs_dom_hgr( CASTWP(e1f), CASTWP(e2f), 'F', e1f_crs, e2f_crs ) 
     156     CALL crs_dom_hgr( e1t, e2t, 'T', e1t_crs, e2t_crs ) 
     157     CALL crs_dom_hgr( e1u, e2u, 'U', e1u_crs, e2u_crs ) 
     158     CALL crs_dom_hgr( e1v, e2v, 'V', e1v_crs, e2v_crs ) 
     159     CALL crs_dom_hgr( e1f, e2f, 'F', e1f_crs, e2f_crs ) 
    160160 
    161161     e1e2t_crs(:,:) = e1t_crs(:,:) * e2t_crs(:,:) 
     
    185185 
    186186     !    3.d.2   Surfaces  
    187      CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=CASTWP(e1t), p_e2=CASTWP(e2t)  ) 
     187     CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=e1t, p_e2=e2t  ) 
    188188     CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=ze3u ) 
    189189     CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=ze3v ) 
     
    194194     !    3.d.3   Vertical scale factors 
    195195     ! 
    196      CALL crs_dom_e3( CASTWP(e1t), CASTWP(e2t), ze3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs) 
    197      CALL crs_dom_e3( CASTWP(e1u), e2u, ze3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs) 
    198      CALL crs_dom_e3( e1v, CASTWP(e2v), ze3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs) 
    199      CALL crs_dom_e3( CASTWP(e1t), CASTWP(e2t), ze3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs) 
     196     CALL crs_dom_e3( e1t, e2t, ze3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs) 
     197     CALL crs_dom_e3( e1u, e2u, ze3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs) 
     198     CALL crs_dom_e3( e1v, e2v, ze3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs) 
     199     CALL crs_dom_e3( e1t, e2t, ze3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs) 
    200200 
    201201     ! Replace 0 by e3t_0 or e3w_0 
     
    220220     !--------------------------------------------------------- 
    221221     ! 4.a. Ocean volume or area unmasked and masked 
    222      CALL crs_dom_facvol( tmask, 'T', CASTWP(e1t), CASTWP(e2t), ze3t, ocean_volume_crs_t, facvol_t ) 
     222     CALL crs_dom_facvol( tmask, 'T', e1t, e2t, ze3t, ocean_volume_crs_t, facvol_t ) 
    223223     ! 
    224224     bt_crs(:,:,:) = ocean_volume_crs_t(:,:,:) * facvol_t(:,:,:) 
     
    227227     WHERE( bt_crs /= 0._wp ) r1_bt_crs(:,:,:) = 1._wp / bt_crs(:,:,:) 
    228228 
    229      CALL crs_dom_facvol( tmask, 'W', CASTWP(e1t), CASTWP(e2t), ze3w, ocean_volume_crs_w, facvol_w ) 
     229     CALL crs_dom_facvol( tmask, 'W', e1t, e2t, ze3w, ocean_volume_crs_w, facvol_w ) 
    230230     ! 
    231231     !--------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.