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 8879 for branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/ASM – NEMO

Ignore:
Timestamp:
2017-12-01T14:53:57+01:00 (6 years ago)
Author:
frrh
Message:

Merge in http://fcm3/projects/NEMO.xm/log/branches/UKMO/dev_r8183_ICEMODEL_svn_removed
revisions 8738:8847 inclusive.

Location:
branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/ASM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90

    r8877 r8879  
    3838   USE asmpar             ! Parameters for the assmilation interface 
    3939   USE zdfmxl             ! mixed layer depth 
    40 #if defined key_lim2 
    41    USE ice_2 
    42 #endif 
    4340#if defined key_lim3 
    4441   USE ice 
     
    148145            CALL iom_rstput( kt, nitdin_r, inum, 'sn'     , tsn(:,:,:,jp_sal) ) 
    149146            CALL iom_rstput( kt, nitdin_r, inum, 'sshn'   , sshn              ) 
    150 #if defined key_lim2 || defined key_lim3 
    151             IF( nn_ice == 2  .OR.  nn_ice == 3 ) THEN 
    152                IF( ALLOCATED(frld) ) THEN 
    153                   CALL iom_rstput( kt, nitdin_r, inum, 'iceconc', 1._wp - frld(:,:)   ) 
     147#if defined key_lim3 
     148            IF( nn_ice == 2 ) THEN 
     149               IF( ALLOCATED(at_i) ) THEN 
     150                  CALL iom_rstput( kt, nitdin_r, inum, 'iceconc', at_i(:,:)   ) 
    154151               ELSE 
    155                   CALL ctl_warn('Ice concentration not written to background as ice variable frld not allocated on this timestep') 
     152                  CALL ctl_warn('Ice concentration not written to background as ice variable at_i not allocated on this timestep') 
    156153               ENDIF 
    157154            ENDIF 
  • branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r8877 r8879  
    3535   USE in_out_manager   ! I/O manager 
    3636   USE lib_mpp          ! MPP library 
    37 #if defined key_lim2 
    38    USE ice_2            ! LIM2 
     37#if defined key_lim3 
     38   USE ice,   ONLY: hm_i, at_i, at_i_b 
    3939#endif 
    4040   USE sbc_oce          ! Surface boundary condition variables. 
     
    809809      INTEGER  ::   it 
    810810      REAL(wp) ::   zincwgt   ! IAU weight for current time step 
    811 #if defined key_lim2 
     811#if defined key_lim3 
    812812      REAL(wp), DIMENSION(jpi,jpj) ::   zofrld, zohicif, zseaicendg, zhicifinc  ! LIM 
    813813      REAL(wp) ::   zhicifmin = 0.5_wp      ! ice minimum depth in metres 
     
    831831            ENDIF 
    832832            ! 
    833             ! Sea-ice : LIM-3 case (to add) 
    834             ! 
    835 #if defined key_lim2 
    836             ! Sea-ice : LIM-2 case 
    837             zofrld (:,:) = frld(:,:) 
    838             zohicif(:,:) = hicif(:,:) 
    839             ! 
    840             frld  = MIN( MAX( frld (:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
    841             pfrld = MIN( MAX( pfrld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
    842             fr_i(:,:) = 1.0_wp - frld(:,:)        ! adjust ice fraction 
    843             ! 
    844             zseaicendg(:,:) = zofrld(:,:) - frld(:,:)   ! find out actual sea ice nudge applied 
     833            ! Sea-ice : LIM-3 case 
     834            ! 
     835#if defined key_lim3 
     836            zofrld (:,:) = 1._wp - at_i(:,:) 
     837            zohicif(:,:) = hm_i(:,:) 
     838            ! 
     839            at_i  (:,:) = 1. - MIN( MAX( 1.-at_i  (:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
     840            at_i_b(:,:) = 1. - MIN( MAX( 1.-at_i_b(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
     841            fr_i(:,:) = at_i(:,:)        ! adjust ice fraction 
     842            ! 
     843            zseaicendg(:,:) = zofrld(:,:) - (1. - at_i(:,:))   ! find out actual sea ice nudge applied 
    845844            ! 
    846845            ! Nudge sea ice depth to bring it up to a required minimum depth 
    847             WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin )  
    848                zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt     
     846            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(:,:) < zhicifmin )  
     847               zhicifinc(:,:) = (zhicifmin - hm_i(:,:)) * zincwgt     
    849848            ELSEWHERE 
    850849               zhicifinc(:,:) = 0.0_wp 
     
    852851            ! 
    853852            ! nudge ice depth 
    854             hicif (:,:) = hicif (:,:) + zhicifinc(:,:) 
    855             phicif(:,:) = phicif(:,:) + zhicifinc(:,:)        
     853            hm_i (:,:) = hm_i (:,:) + zhicifinc(:,:) 
    856854            ! 
    857855            ! seaice salinity balancing (to add) 
     
    882880            neuler = 0                    ! Force Euler forward step 
    883881            ! 
    884             ! Sea-ice : LIM-3 case (to add) 
    885             ! 
    886 #if defined key_lim2 
    887             ! Sea-ice : LIM-2 case. 
    888             zofrld(:,:)=frld(:,:) 
    889             zohicif(:,:)=hicif(:,:) 
     882            ! Sea-ice : LIM-3 case 
     883            ! 
     884#if defined key_lim3 
     885            zofrld (:,:) = 1._wp - at_i(:,:) 
     886            zohicif(:,:) = hm_i(:,:) 
    890887            !  
    891888            ! Initialize the now fields the background + increment 
    892             frld (:,:) = MIN( MAX( frld(:,:) - seaice_bkginc(:,:), 0.0_wp), 1.0_wp) 
    893             pfrld(:,:) = frld(:,:)  
    894             fr_i (:,:) = 1.0_wp - frld(:,:)                ! adjust ice fraction 
    895             zseaicendg(:,:) = zofrld(:,:) - frld(:,:)      ! find out actual sea ice nudge applied 
     889            at_i(:,:) = 1. - MIN( MAX( 1.-at_i(:,:) - seaice_bkginc(:,:), 0.0_wp), 1.0_wp) 
     890            at_i_b(:,:) = at_i(:,:)  
     891            fr_i(:,:) = at_i(:,:)        ! adjust ice fraction 
     892            ! 
     893            zseaicendg(:,:) = zofrld(:,:) - (1. - at_i(:,:))   ! find out actual sea ice nudge applied 
    896894            ! 
    897895            ! Nudge sea ice depth to bring it up to a required minimum depth 
    898             WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin )  
    899                zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt     
     896            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(:,:) < zhicifmin )  
     897               zhicifinc(:,:) = (zhicifmin - hm_i(:,:)) * zincwgt     
    900898            ELSEWHERE 
    901                zhicifinc(:,:) = 0._wp 
     899               zhicifinc(:,:) = 0.0_wp 
    902900            END WHERE 
    903901            ! 
    904902            ! nudge ice depth 
    905             hicif (:,:) = hicif (:,:) + zhicifinc(:,:) 
    906             phicif(:,:) = phicif(:,:)        
     903            hm_i (:,:) = hm_i (:,:) + zhicifinc(:,:) 
    907904            ! 
    908905            ! seaice salinity balancing (to add) 
     
    926923         ENDIF 
    927924 
    928 !#if defined defined key_lim2 || defined key_cice 
     925!#if defined defined key_lim3 || defined key_cice 
    929926! 
    930927!            IF (ln_seaicebal ) THEN        
Note: See TracChangeset for help on using the changeset viewer.