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 3211 for branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90 – NEMO

Ignore:
Timestamp:
2011-12-11T16:00:26+01:00 (13 years ago)
Author:
spickles2
Message:

Stephen Pickles, 11 Dec 2011

Commit to bring the rest of the DCSE NEMO development branch
in line with the latest development version. This includes
array index re-ordering of all OPA_SRC/.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90

    r2715 r3211  
    7979   REAL(wp) ::   eps20  = 1.e-20   ! constant values 
    8080    
     81   !! * Control permutation of array indices 
     82#  include "oce_ftrans.h90" 
     83#  include "dom_oce_ftrans.h90" 
     84#  include "sbc_oce_ftrans.h90" 
     85 
    8186   !! * Substitutions 
    8287#  include "vectopt_loop_substitute.h90" 
     
    308313            !-------------------------------------------------- 
    309314            !                                                          ! vapour pressure at saturation of ocean 
     315#if defined key_z_first 
     316            zeso =  611.0 * EXP ( 17.2693884 * ( zsst - rtt ) * tmask_1(ji,jj) / ( zsst - 35.86 ) ) 
     317#else 
    310318            zeso =  611.0 * EXP ( 17.2693884 * ( zsst - rtt ) * tmask(ji,jj,1) / ( zsst - 35.86 ) ) 
     319#endif 
    311320 
    312321            zqsato = ( 0.622 * zeso ) / ( zpatm - 0.378 * zeso )       ! humidity close to the ocean surface (at saturation) 
     
    369378 
    370379!CDIR COLLAPSE 
     380#if defined key_z_first 
     381      emp (:,:) = zqla(:,:) / cevap - sf(jp_prec)%fnow(:,:,1) / rday * tmask_1(:,:) 
     382#else 
    371383      emp (:,:) = zqla(:,:) / cevap - sf(jp_prec)%fnow(:,:,1) / rday * tmask(:,:,1) 
     384#endif 
    372385      qns (:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)         ! Downward Non Solar flux 
    373386      emps(:,:) = emp(:,:) 
     
    560573 
    561574               ! vapour pressure at saturation of ice (tmask to avoid overflow in the exponential) 
     575#if defined key_z_first 
     576               zesi =  611.0 * EXP( 21.8745587 * tmask_1(ji,jj) * ( pst(ji,jj,jl) - rtt )/ ( pst(ji,jj,jl) - 7.66 ) ) 
     577#else 
    562578               zesi =  611.0 * EXP( 21.8745587 * tmask(ji,jj,1) * ( pst(ji,jj,jl) - rtt )/ ( pst(ji,jj,jl) - 7.66 ) ) 
     579#endif 
    563580               ! humidity close to the ice surface (at saturation) 
    564581               zqsati   = ( 0.622 * zesi ) / ( zpatm - 0.378 * zesi ) 
     
    619636!!gm : mask is not required on forcing 
    620637      DO jl = 1, ijpl 
     638#if defined key_z_first 
     639         p_qns (:,:,jl) = p_qns (:,:,jl) * tmask_1(:,:) 
     640         p_qla (:,:,jl) = p_qla (:,:,jl) * tmask_1(:,:) 
     641         p_dqns(:,:,jl) = p_dqns(:,:,jl) * tmask_1(:,:) 
     642         p_dqla(:,:,jl) = p_dqla(:,:,jl) * tmask_1(:,:) 
     643#else 
    621644         p_qns (:,:,jl) = p_qns (:,:,jl) * tmask(:,:,1) 
    622645         p_qla (:,:,jl) = p_qla (:,:,jl) * tmask(:,:,1) 
    623646         p_dqns(:,:,jl) = p_dqns(:,:,jl) * tmask(:,:,1) 
    624647         p_dqla(:,:,jl) = p_dqla(:,:,jl) * tmask(:,:,1) 
     648#endif 
    625649      END DO 
    626650 
     
    787811            zcldcor  = MIN(  1.e0, ( 1.e0 - 0.62 * sf(jp_ccov)%fnow(ji,jj,1)   &     ! cloud correction (Reed 1977) 
    788812               &                          + 0.0019 * zlmunoon )                 ) 
     813#if defined key_z_first 
     814            pqsr_oce(ji,jj) = zcoef1 * zcldcor * pqsr_oce(ji,jj) * tmask_1(ji,jj)    ! and zcoef1: ellipsity 
     815#else 
    789816            pqsr_oce(ji,jj) = zcoef1 * zcldcor * pqsr_oce(ji,jj) * tmask(ji,jj,1)    ! and zcoef1: ellipsity 
     817#endif 
    790818         END DO 
    791819      END DO 
     
    925953         ! 
    926954         ! Correction : Taking into account the ellipsity of the earth orbit 
     955#if defined key_z_first 
     956         pqsr_ice(:,:,jl) = pqsr_ice(:,:,jl) * zcoef1 * tmask_1(:,:) 
     957#else 
    927958         pqsr_ice(:,:,jl) = pqsr_ice(:,:,jl) * zcoef1 * tmask(:,:,1) 
     959#endif 
    928960         ! 
    929961         !                 !--------------------------------!  
Note: See TracChangeset for help on using the changeset viewer.