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 5956 for branches/2015/dev_r5151_UKMO_ISF/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90 – NEMO

Ignore:
Timestamp:
2015-11-30T20:55:41+01:00 (8 years ago)
Author:
mathiot
Message:

ISF : merged trunk (5936) into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5151_UKMO_ISF/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r5621 r5956  
    1414 
    1515   !!---------------------------------------------------------------------- 
    16    !!   'key_asminc'   : Switch on the assimilation increment interface 
    17    !!---------------------------------------------------------------------- 
    1816   !!   asm_inc_init   : Initialize the increment arrays and IAU weights 
    1917   !!   calc_date      : Compute the calendar date YYYYMMDD on a given step 
     
    2826   USE domvvl           ! domain: variable volume level 
    2927   USE oce              ! Dynamics and active tracers defined in memory 
    30    USE ldfdyn_oce       ! ocean dynamics: lateral physics 
     28   USE ldfdyn           ! lateral diffusion: eddy viscosity coefficients 
    3129   USE eosbn2           ! Equation of state - in situ and potential density 
    3230   USE zpshde           ! Partial step : Horizontal Derivative 
     
    5654    LOGICAL, PUBLIC, PARAMETER :: lk_asminc = .FALSE.  !: No assimilation increments 
    5755#endif 
    58    LOGICAL, PUBLIC :: ln_bkgwri = .FALSE.      !: No output of the background state fields 
    59    LOGICAL, PUBLIC :: ln_asmiau = .FALSE.      !: No applying forcing with an assimilation increment 
    60    LOGICAL, PUBLIC :: ln_asmdin = .FALSE.      !: No direct initialization 
    61    LOGICAL, PUBLIC :: ln_trainc = .FALSE.      !: No tracer (T and S) assimilation increments 
    62    LOGICAL, PUBLIC :: ln_dyninc = .FALSE.      !: No dynamics (u and v) assimilation increments 
    63    LOGICAL, PUBLIC :: ln_sshinc = .FALSE.      !: No sea surface height assimilation increment 
    64    LOGICAL, PUBLIC :: ln_seaiceinc             !: No sea ice concentration increment 
    65    LOGICAL, PUBLIC :: ln_salfix = .FALSE.      !: Apply minimum salinity check 
     56   LOGICAL, PUBLIC :: ln_bkgwri     !: No output of the background state fields 
     57   LOGICAL, PUBLIC :: ln_asmiau     !: No applying forcing with an assimilation increment 
     58   LOGICAL, PUBLIC :: ln_asmdin     !: No direct initialization 
     59   LOGICAL, PUBLIC :: ln_trainc     !: No tracer (T and S) assimilation increments 
     60   LOGICAL, PUBLIC :: ln_dyninc     !: No dynamics (u and v) assimilation increments 
     61   LOGICAL, PUBLIC :: ln_sshinc     !: No sea surface height assimilation increment 
     62   LOGICAL, PUBLIC :: ln_seaiceinc  !: No sea ice concentration increment 
     63   LOGICAL, PUBLIC :: ln_salfix     !: Apply minimum salinity check 
    6664   LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing 
    67    INTEGER, PUBLIC :: nn_divdmp                !: Apply divergence damping filter nn_divdmp times 
     65   INTEGER, PUBLIC :: nn_divdmp     !: Apply divergence damping filter nn_divdmp times 
    6866 
    6967   REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::   t_bkg   , s_bkg      !: Background temperature and salinity 
     
    9088   !! * Substitutions 
    9189#  include "domzgr_substitute.h90" 
    92 #  include "ldfdyn_substitute.h90" 
    9390#  include "vectopt_loop_substitute.h90" 
    9491   !!---------------------------------------------------------------------- 
     
    139136      ! Read Namelist nam_asminc : assimilation increment interface 
    140137      !----------------------------------------------------------------------- 
    141       ln_seaiceinc = .FALSE. 
     138      ln_seaiceinc   = .FALSE. 
    142139      ln_temnofreeze = .FALSE. 
    143140 
     
    428425 
    429426      IF ( ln_dyninc .AND. nn_divdmp > 0 ) THEN 
    430  
    431          CALL wrk_alloc(jpi,jpj,hdiv)  
    432  
    433          DO  jt = 1, nn_divdmp 
    434  
     427         ! 
     428         CALL wrk_alloc( jpi,jpj,   hdiv )  
     429         ! 
     430         DO jt = 1, nn_divdmp 
     431            ! 
    435432            DO jk = 1, jpkm1 
    436  
    437433               hdiv(:,:) = 0._wp 
    438  
    439434               DO jj = 2, jpjm1 
    440435                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    444439                         + e1v(ji  ,jj  ) * fse3v(ji  ,jj  ,jk) * v_bkginc(ji  ,jj  ,jk)     & 
    445440                         - e1v(ji  ,jj-1) * fse3v(ji  ,jj-1,jk) * v_bkginc(ji  ,jj-1,jk)  )  & 
    446                          / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) 
     441                         / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) ) 
    447442                  END DO 
    448443               END DO 
    449  
    450444               CALL lbc_lnk( hdiv, 'T', 1. )   ! lateral boundary cond. (no sign change) 
    451  
     445               ! 
    452446               DO jj = 2, jpjm1 
    453447                  DO ji = fs_2, fs_jpim1   ! vector opt. 
    454                      u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2_wp * ( e1t(ji+1,jj)*e2t(ji+1,jj) * hdiv(ji+1,jj)   & 
    455                                                                         - e1t(ji  ,jj)*e2t(ji  ,jj) * hdiv(ji  ,jj) ) & 
    456                                                                       / e1u(ji,jj) * umask(ji,jj,jk)  
    457                      v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2_wp * ( e1t(ji,jj+1)*e2t(ji,jj+1) * hdiv(ji,jj+1)   & 
    458                                                                         - e1t(ji,jj  )*e2t(ji,jj  ) * hdiv(ji,jj  ) ) & 
    459                                                                       / e2v(ji,jj) * vmask(ji,jj,jk)  
     448                     u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji+1,jj) * hdiv(ji+1,jj)   & 
     449                        &                                               - e1e2t(ji  ,jj) * hdiv(ji  ,jj) ) & 
     450                        &                                             * r1_e1u(ji,jj) * umask(ji,jj,jk)  
     451                     v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji,jj+1) * hdiv(ji,jj+1)   & 
     452                        &                                               - e1e2t(ji,jj  ) * hdiv(ji,jj  ) ) & 
     453                        &                                             * r1_e2v(ji,jj) * vmask(ji,jj,jk)  
    460454                  END DO 
    461455               END DO 
    462  
    463456            END DO 
    464  
     457            ! 
    465458         END DO 
    466  
    467          CALL wrk_dealloc(jpi,jpj,hdiv)  
    468  
     459         ! 
     460         CALL wrk_dealloc( jpi,jpj,   hdiv )  
     461         ! 
    469462      ENDIF 
    470  
    471  
    472463 
    473464      !----------------------------------------------------------------------- 
     
    476467 
    477468      IF ( ln_asmdin ) THEN 
    478  
     469         ! 
    479470         ALLOCATE( t_bkg(jpi,jpj,jpk) ) 
    480471         ALLOCATE( s_bkg(jpi,jpj,jpk) ) 
     
    482473         ALLOCATE( v_bkg(jpi,jpj,jpk) ) 
    483474         ALLOCATE( ssh_bkg(jpi,jpj)   ) 
    484  
    485          t_bkg(:,:,:) = 0.0 
    486          s_bkg(:,:,:) = 0.0 
    487          u_bkg(:,:,:) = 0.0 
    488          v_bkg(:,:,:) = 0.0 
    489          ssh_bkg(:,:) = 0.0 
    490  
     475         ! 
     476         t_bkg(:,:,:) = 0._wp 
     477         s_bkg(:,:,:) = 0._wp 
     478         u_bkg(:,:,:) = 0._wp 
     479         v_bkg(:,:,:) = 0._wp 
     480         ssh_bkg(:,:) = 0._wp 
     481         ! 
    491482         !-------------------------------------------------------------------- 
    492483         ! Read from file the background state at analysis time 
    493484         !-------------------------------------------------------------------- 
    494  
     485         ! 
    495486         CALL iom_open( c_asmdin, inum ) 
    496  
     487         ! 
    497488         CALL iom_get( inum, 'rdastp', zdate_bkg )  
    498          
     489         ! 
    499490         IF(lwp) THEN 
    500491            WRITE(numout,*)  
    501             WRITE(numout,*) 'asm_inc_init : Assimilation background state valid at : ', & 
    502                &  NINT( zdate_bkg ) 
     492            WRITE(numout,*) 'asm_inc_init : Assimilation background state valid at : ', NINT( zdate_bkg ) 
    503493            WRITE(numout,*) '~~~~~~~~~~~~' 
    504494         ENDIF 
    505  
     495         ! 
    506496         IF ( NINT( zdate_bkg ) /= iitdin_date ) & 
    507497            & CALL ctl_warn( ' Validity time of assimilation background state does', & 
    508498            &                ' not agree with Direct Initialization time' ) 
    509  
     499         ! 
    510500         IF ( ln_trainc ) THEN    
    511501            CALL iom_get( inum, jpdom_autoglo, 'tn', t_bkg ) 
     
    514504            s_bkg(:,:,:) = s_bkg(:,:,:) * tmask(:,:,:) 
    515505         ENDIF 
    516  
     506         ! 
    517507         IF ( ln_dyninc ) THEN    
    518508            CALL iom_get( inum, jpdom_autoglo, 'un', u_bkg ) 
     
    521511            v_bkg(:,:,:) = v_bkg(:,:,:) * vmask(:,:,:) 
    522512         ENDIF 
    523          
     513         ! 
    524514         IF ( ln_sshinc ) THEN 
    525515            CALL iom_get( inum, jpdom_autoglo, 'sshn', ssh_bkg ) 
    526516            ssh_bkg(:,:) = ssh_bkg(:,:) * tmask(:,:,1) 
    527517         ENDIF 
    528  
     518         ! 
    529519         CALL iom_close( inum ) 
    530  
     520         ! 
    531521      ENDIF 
    532522      ! 
     
    574564      ! If kt = kit000 - 1 then set the date to the restart date 
    575565      IF ( kt == kit000 - 1 ) THEN 
    576  
    577566         kdate = ndastp 
    578567         RETURN 
    579  
    580568      ENDIF 
    581569 
     
    646634      !! ** Action  :  
    647635      !!---------------------------------------------------------------------- 
    648       INTEGER, INTENT(IN) :: kt               ! Current time step 
    649       ! 
    650       INTEGER :: ji,jj,jk 
    651       INTEGER :: it 
     636      INTEGER, INTENT(IN) ::   kt   ! Current time step 
     637      ! 
     638      INTEGER  :: ji, jj, jk 
     639      INTEGER  :: it 
    652640      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    653641      REAL (wp), DIMENSION(jpi,jpj,jpk) :: fzptnz ! 3d freezing point values 
    654642      !!---------------------------------------------------------------------- 
    655  
     643      ! 
    656644      ! freezing point calculation taken from oc_fz_pt (but calculated for all depths)  
    657645      ! used to prevent the applied increments taking the temperature below the local freezing point  
    658  
    659646      DO jk = 1, jpkm1 
    660647        CALL eos_fzp( tsn(:,:,jk,jp_sal), fzptnz(:,:,jk), fsdept(:,:,jk) ) 
    661648      END DO 
    662  
    663       IF ( ln_asmiau ) THEN 
    664  
    665          !-------------------------------------------------------------------- 
    666          ! Incremental Analysis Updating 
    667          !-------------------------------------------------------------------- 
    668  
     649         ! 
     650         !                             !-------------------------------------- 
     651      IF ( ln_asmiau ) THEN            ! Incremental Analysis Updating 
     652         !                             !-------------------------------------- 
     653         ! 
    669654         IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 
    670  
     655            ! 
    671656            it = kt - nit000 + 1 
    672657            zincwgt = wgtiau(it) / rdt   ! IAU weight for the current time step 
    673  
     658            ! 
    674659            IF(lwp) THEN 
    675660               WRITE(numout,*)  
     
    677662               WRITE(numout,*) '~~~~~~~~~~~~' 
    678663            ENDIF 
    679  
     664            ! 
    680665            ! Update the tracer tendencies 
    681666            DO jk = 1, jpkm1 
     
    700685               ENDIF 
    701686            END DO 
    702  
    703          ENDIF 
    704  
     687            ! 
     688         ENDIF 
     689         ! 
    705690         IF ( kt == nitiaufin_r + 1  ) THEN   ! For bias crcn to work 
    706691            DEALLOCATE( t_bkginc ) 
    707692            DEALLOCATE( s_bkginc ) 
    708693         ENDIF 
    709  
    710  
    711       ELSEIF ( ln_asmdin ) THEN 
    712  
    713          !-------------------------------------------------------------------- 
    714          ! Direct Initialization 
    715          !-------------------------------------------------------------------- 
    716              
     694         !                             !-------------------------------------- 
     695      ELSEIF ( ln_asmdin ) THEN        ! Direct Initialization 
     696         !                             !-------------------------------------- 
     697         !             
    717698         IF ( kt == nitdin_r ) THEN 
    718  
     699            ! 
    719700            neuler = 0  ! Force Euler forward step 
    720  
     701            ! 
    721702            ! Initialize the now fields with the background + increment 
    722703            IF (ln_temnofreeze) THEN 
     
    745726!!gm 
    746727 
    747  
    748728            IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav)      & 
    749729               &  CALL zps_hde    ( kt, jpts, tsb, gtsu, gtsv,        &  ! Partial steps: before horizontal gradient 
     
    766746      ENDIF 
    767747      ! Perhaps the following call should be in step 
    768       IF   ( ln_seaiceinc  )   CALL seaice_asm_inc ( kt )   ! apply sea ice concentration increment 
     748      IF ( ln_seaiceinc  )   CALL seaice_asm_inc ( kt )   ! apply sea ice concentration increment 
    769749      ! 
    770750   END SUBROUTINE tra_asm_inc 
     
    787767      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    788768      !!---------------------------------------------------------------------- 
    789  
    790       IF ( ln_asmiau ) THEN 
    791  
    792          !-------------------------------------------------------------------- 
    793          ! Incremental Analysis Updating 
    794          !-------------------------------------------------------------------- 
    795  
     769      ! 
     770      !                          !-------------------------------------------- 
     771      IF ( ln_asmiau ) THEN      ! Incremental Analysis Updating 
     772         !                       !-------------------------------------------- 
     773         ! 
    796774         IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 
    797  
     775            ! 
    798776            it = kt - nit000 + 1 
    799777            zincwgt = wgtiau(it) / rdt   ! IAU weight for the current time step 
    800  
     778            ! 
    801779            IF(lwp) THEN 
    802780               WRITE(numout,*)  
    803                WRITE(numout,*) 'dyn_asm_inc : Dynamics IAU at time step = ', & 
    804                   &  kt,' with IAU weight = ', wgtiau(it) 
     781               WRITE(numout,*) 'dyn_asm_inc : Dynamics IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 
    805782               WRITE(numout,*) '~~~~~~~~~~~~' 
    806783            ENDIF 
    807  
     784            ! 
    808785            ! Update the dynamic tendencies 
    809786            DO jk = 1, jpkm1 
     
    811788               va(:,:,jk) = va(:,:,jk) + v_bkginc(:,:,jk) * zincwgt 
    812789            END DO 
    813             
     790            ! 
    814791            IF ( kt == nitiaufin_r ) THEN 
    815792               DEALLOCATE( u_bkginc ) 
    816793               DEALLOCATE( v_bkginc ) 
    817794            ENDIF 
    818  
    819          ENDIF 
    820  
    821       ELSEIF ( ln_asmdin ) THEN  
    822  
    823          !-------------------------------------------------------------------- 
    824          ! Direct Initialization 
    825          !-------------------------------------------------------------------- 
    826           
     795            ! 
     796         ENDIF 
     797         !                          !----------------------------------------- 
     798      ELSEIF ( ln_asmdin ) THEN     ! Direct Initialization 
     799         !                          !----------------------------------------- 
     800         !          
    827801         IF ( kt == nitdin_r ) THEN 
    828  
     802            ! 
    829803            neuler = 0                    ! Force Euler forward step 
    830  
     804            ! 
    831805            ! Initialize the now fields with the background + increment 
    832806            un(:,:,:) = u_bkg(:,:,:) + u_bkginc(:,:,:) 
    833807            vn(:,:,:) = v_bkg(:,:,:) + v_bkginc(:,:,:)   
    834  
     808            ! 
    835809            ub(:,:,:) = un(:,:,:)         ! Update before fields 
    836810            vb(:,:,:) = vn(:,:,:) 
    837   
     811            ! 
    838812            DEALLOCATE( u_bkg    ) 
    839813            DEALLOCATE( v_bkg    ) 
     
    863837      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    864838      !!---------------------------------------------------------------------- 
    865  
    866       IF ( ln_asmiau ) THEN 
    867  
    868          !-------------------------------------------------------------------- 
    869          ! Incremental Analysis Updating 
    870          !-------------------------------------------------------------------- 
    871  
     839      ! 
     840      !                             !----------------------------------------- 
     841      IF ( ln_asmiau ) THEN         ! Incremental Analysis Updating 
     842         !                          !----------------------------------------- 
     843         ! 
    872844         IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 
    873  
     845            ! 
    874846            it = kt - nit000 + 1 
    875847            zincwgt = wgtiau(it) / rdt   ! IAU weight for the current time step 
    876  
     848            ! 
    877849            IF(lwp) THEN 
    878850               WRITE(numout,*)  
     
    881853               WRITE(numout,*) '~~~~~~~~~~~~' 
    882854            ENDIF 
    883  
     855            ! 
    884856            ! Save the tendency associated with the IAU weighted SSH increment 
    885857            ! (applied in dynspg.*) 
     
    890862               DEALLOCATE( ssh_bkginc ) 
    891863            ENDIF 
    892  
    893          ENDIF 
    894  
    895       ELSEIF ( ln_asmdin ) THEN 
    896  
    897          !-------------------------------------------------------------------- 
    898          ! Direct Initialization 
    899          !-------------------------------------------------------------------- 
    900  
     864            ! 
     865         ENDIF 
     866         !                          !----------------------------------------- 
     867      ELSEIF ( ln_asmdin ) THEN     ! Direct Initialization 
     868         !                          !----------------------------------------- 
     869         ! 
    901870         IF ( kt == nitdin_r ) THEN 
    902  
    903             neuler = 0                    ! Force Euler forward step 
    904  
    905             ! Initialize the now fields the background + increment 
    906             sshn(:,:) = ssh_bkg(:,:) + ssh_bkginc(:,:)   
    907  
    908             ! Update before fields 
    909             sshb(:,:) = sshn(:,:)          
    910  
     871            ! 
     872            neuler = 0                                   ! Force Euler forward step 
     873            ! 
     874            sshn(:,:) = ssh_bkg(:,:) + ssh_bkginc(:,:)   ! Initialize the now fields the background + increment 
     875            ! 
     876            sshb(:,:) = sshn(:,:)                        ! Update before fields 
     877            ! 
    911878            IF( lk_vvl ) THEN 
    912879               DO jk = 1, jpk 
     
    914881               END DO 
    915882            ENDIF 
    916  
     883            ! 
    917884            DEALLOCATE( ssh_bkg    ) 
    918885            DEALLOCATE( ssh_bkginc ) 
    919  
     886            ! 
    920887         ENDIF 
    921888         ! 
     
    936903      !! 
    937904      !!---------------------------------------------------------------------- 
    938       IMPLICIT NONE 
    939       ! 
    940       INTEGER, INTENT(in)           ::   kt   ! Current time step 
     905      INTEGER, INTENT(in)           ::   kt       ! Current time step 
    941906      INTEGER, INTENT(in), OPTIONAL ::   kindic   ! flag for disabling the deallocation 
    942907      ! 
     
    948913#endif 
    949914      !!---------------------------------------------------------------------- 
    950  
    951       IF ( ln_asmiau ) THEN 
    952  
    953          !-------------------------------------------------------------------- 
    954          ! Incremental Analysis Updating 
    955          !-------------------------------------------------------------------- 
    956  
     915      ! 
     916      !                             !----------------------------------------- 
     917      IF ( ln_asmiau ) THEN         ! Incremental Analysis Updating 
     918         !                          !----------------------------------------- 
     919         ! 
    957920         IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 
    958  
     921            ! 
    959922            it = kt - nit000 + 1 
    960923            zincwgt = wgtiau(it)      ! IAU weight for the current time step  
    961924            ! note this is not a tendency so should not be divided by rdt (as with the tracer and other increments) 
    962  
     925            ! 
    963926            IF(lwp) THEN 
    964927               WRITE(numout,*)  
    965                WRITE(numout,*) 'seaice_asm_inc : sea ice conc IAU at time step = ', & 
    966                   &  kt,' with IAU weight = ', wgtiau(it) 
     928               WRITE(numout,*) 'seaice_asm_inc : sea ice conc IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 
    967929               WRITE(numout,*) '~~~~~~~~~~~~' 
    968930            ENDIF 
    969  
     931            ! 
    970932            ! Sea-ice : LIM-3 case (to add) 
    971  
     933            ! 
    972934#if defined key_lim2 
    973935            ! Sea-ice : LIM-2 case 
     
    1007969 
    1008970#if defined key_cice && defined key_asminc 
    1009             ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
    1010             ndaice_da(:,:) = 0.0_wp 
    1011 #endif 
    1012  
    1013          ENDIF 
    1014  
    1015       ELSEIF ( ln_asmdin ) THEN 
    1016  
    1017          !-------------------------------------------------------------------- 
    1018          ! Direct Initialization 
    1019          !-------------------------------------------------------------------- 
    1020  
     971            ndaice_da(:,:) = 0._wp        ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
     972#endif 
     973 
     974         ENDIF 
     975         !                          !----------------------------------------- 
     976      ELSEIF ( ln_asmdin ) THEN     ! Direct Initialization 
     977         !                          !----------------------------------------- 
     978         ! 
    1021979         IF ( kt == nitdin_r ) THEN 
    1022  
     980            ! 
    1023981            neuler = 0                    ! Force Euler forward step 
    1024  
     982            ! 
    1025983            ! Sea-ice : LIM-3 case (to add) 
    1026  
     984            ! 
    1027985#if defined key_lim2 
    1028986            ! Sea-ice : LIM-2 case. 
     
    1040998               zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt     
    1041999            ELSEWHERE 
    1042                zhicifinc(:,:) = 0.0_wp 
     1000               zhicifinc(:,:) = 0._wp 
    10431001            END WHERE 
    10441002            ! 
     
    10491007            ! seaice salinity balancing (to add) 
    10501008#endif 
    1051   
     1009            ! 
    10521010#if defined key_cice && defined key_asminc 
    10531011            ! Sea-ice : CICE case. Pass ice increment tendency into CICE 
    10541012           ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 
    10551013#endif 
    1056            IF ( .NOT. PRESENT(kindic) ) THEN 
    1057               DEALLOCATE( seaice_bkginc ) 
    1058            END IF 
    1059  
     1014            IF ( .NOT. PRESENT(kindic) ) THEN 
     1015               DEALLOCATE( seaice_bkginc ) 
     1016            END IF 
     1017            ! 
    10601018         ELSE 
    1061  
     1019            ! 
    10621020#if defined key_cice && defined key_asminc 
    1063             ! Sea-ice : CICE case. Zero ice increment tendency into CICE  
    1064             ndaice_da(:,:) = 0.0_wp 
    1065 #endif 
    1066           
     1021            ndaice_da(:,:) = 0._wp     ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
     1022 
     1023#endif 
     1024            ! 
    10671025         ENDIF 
    10681026 
     
    11411099! 
    11421100!#endif 
    1143  
     1101         ! 
    11441102      ENDIF 
    1145  
     1103      ! 
    11461104   END SUBROUTINE seaice_asm_inc 
    11471105    
Note: See TracChangeset for help on using the changeset viewer.