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 11605 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src – NEMO

Ignore:
Timestamp:
2019-09-26T21:23:26+02:00 (5 years ago)
Author:
jamesharle
Message:

#2222, tidy _wp for some variables. There are small difference in
simulations of the AGRIF_DEMO config with Pacific only nest (same
vertical grid) with and without key_vertical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/vremap.F90

    r11603 r11605  
    7373 
    7474      DO jk = 2, kjpk_in 
    75          zwork(jk,1)=1./(phin(jk-1)+phin(jk)) 
     75         zwork(jk,1)=1._wp/(phin(jk-1)+phin(jk)) 
    7676      END DO 
    7777         
     
    9393            q001 = phin(jk)*zwork2(jk+1,1) 
    9494            q002 = phin(jk)*zwork2(jk,1)         
    95             IF (q001*q002 < 0) then 
     95            IF (q001*q002 < 0._wp) then 
    9696               q001 = 0._wp 
    9797               q002 = 0._wp 
     
    129129         END DO 
    130130         
    131          zwork2(1,3) = 2*coeffremap(1,1)-zwork2(2,3) 
    132          zwork2(kjpk_in+1,3)=2*coeffremap(kjpk_in,1)-zwork2(kjpk_in,3) 
     131         zwork2(1,3) = 2._wp*coeffremap(1,1)-zwork2(2,3) 
     132         zwork2(kjpk_in+1,3)=2._wp*coeffremap(kjpk_in,1)-zwork2(kjpk_in,3) 
    133133  
    134134         DO jk = 1, kjpk_in 
    135135            q01=zwork2(jk+1,3)-coeffremap(jk,1) 
    136136            q02=coeffremap(jk,1)-zwork2(jk,3) 
    137             q001=2.*q01 
    138             q002=2.*q02 
    139             IF (q01*q02<0) then 
     137            q001=2._wp*q01 
     138            q002=2._wp*q02 
     139            IF (q01*q02<0._wp) then 
    140140               q01=0._wp 
    141141               q02=0._wp 
     
    190190                        q001 = (zbox-z_win(kbox))/phin(kbox) 
    191191                        q002 = (ztop-z_win(kbox))/phin(kbox) 
    192                         q01=q001**2+q002**2+q001*q002+1.-2.*(q001+q002) 
    193                         q02=q01-1.+(q001+q002) 
     192                        q01=q001**2+q002**2+q001*q002+1._wp-2._wp*(q001+q002) 
     193                        q02=q01-1._wp+(q001+q002) 
    194194                        q0=1._wp-q01-q02 
    195195                     ELSE 
Note: See TracChangeset for help on using the changeset viewer.