Ignore:
Timestamp:
2018-11-15T17:27:18+01:00 (23 months ago)
Author:
smasson
Message:

dev_r10164_HPC09_ESIWACE_PREP_MERGE: action 2: add generic glob_min/max/sum and locmin/max, complete timing and report (including bdy and icb), see #2133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcfwb.F90

    r10170 r10314  
    8686         IF( kn_fwb == 3 .AND. ln_isfcav    )   CALL ctl_stop( 'sbc_fwb: nn_fwb = 3 with ln_isfcav = .TRUE. not working, we stop ' ) 
    8787         ! 
    88          area = glob_sum( e1e2t(:,:) * tmask(:,:,1))           ! interior global domain surface 
     88         area = glob_sum( 'sbcfwb', e1e2t(:,:) * tmask(:,:,1))           ! interior global domain surface 
    8989         ! isf cavities are excluded because it can feedback to the melting with generation of inhibition of plumes 
    9090         ! and in case of no melt, it can generate HSSW. 
     
    102102         ! 
    103103         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    104             z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area   ! sum over the global domain 
     104            z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area   ! sum over the global domain 
    105105            zcoef = z_fwf * rcp 
    106106            emp(:,:) = emp(:,:) - z_fwf              * tmask(:,:,1) 
     
    127127            a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
    128128                                                      ! sum over the global domain 
    129             a_fwb   = glob_sum( e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 
     129            a_fwb   = glob_sum( 'sbcfwb', e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 
    130130            a_fwb   = a_fwb * 1.e+3 / ( area * rday * 365. )     ! convert in Kg/m3/s = mm/s 
    131131!!gm        !                                                      !!bug 365d year  
     
    155155            ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 
    156156            ! 
    157             zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp  
    158             zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) ) 
     157            zsurf_neg = glob_sum( 'sbcfwb', e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp  
     158            zsurf_pos = glob_sum( 'sbcfwb', e1e2t(:,:)*ztmsk_pos(:,:) ) 
    159159            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges)  
    160             z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
     160            z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
    161161            !             
    162162            IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation 
     
    168168            ENDIF 
    169169            ! 
    170             zsum_fwf   = glob_sum( e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area 
     170            zsum_fwf   = glob_sum( 'sbcfwb', e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area 
    171171!!gm :  zsum_fwf   = z_fwf * area   ???  it is right?  I think so.... 
    172172            z_fwf_nsrf =  zsum_fwf / ( zsurf_tospread + rsmall ) 
    173173            !                                                  ! weight to respect erp field 2D structure  
    174             zsum_erp   = glob_sum( ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) ) 
     174            zsum_erp   = glob_sum( 'sbcfwb', ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) ) 
    175175            z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( zsum_erp + rsmall ) 
    176176            !                                                  ! final correction term to apply 
Note: See TracChangeset for help on using the changeset viewer.