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 12399 – NEMO

Changeset 12399


Ignore:
Timestamp:
2020-02-18T12:40:31+01:00 (4 years ago)
Author:
clem
Message:

apply the same improvement (as for bdy) to the init of ice. See revision r12395

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/iceistate.F90

    r12377 r12399  
    189189            IF( TRIM(si(jp_smi)%clrootname) == 'NOT USED' ) & 
    190190               &     si(jp_smi)%fnow(:,:,1) = ( rn_smi_ini_n * zswitch + rn_smi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    191             zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 
    192             ! 
    193             ! ice temperature 
    194             IF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) & 
    195                &     si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    196             ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 
    197             ! 
    198             ! surface temperature => set to ice temperature if it exists 
    199             IF    ( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
    200                      si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    201             ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
    202                      si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     191            ! 
     192            ! temperatures 
     193            IF    ( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. & 
     194               &    TRIM(si(jp_tms)%clrootname) == 'NOT USED' ) THEN 
     195               si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     196               si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     197               si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     198            ELSEIF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tms)%clrootname) /= 'NOT USED' ) THEN ! if T_s is read and not T_i, set T_i = (T_s + T_freeze)/2 
     199               si(jp_tmi)%fnow(:,:,1) = 0.5_wp * ( si(jp_tms)%fnow(:,:,1) + 271.15 ) 
     200            ELSEIF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tsu)%clrootname) /= 'NOT USED' ) THEN ! if T_su is read and not T_i, set T_i = (T_su + T_freeze)/2 
     201               si(jp_tmi)%fnow(:,:,1) = 0.5_wp * ( si(jp_tsu)%fnow(:,:,1) + 271.15 ) 
     202            ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tms)%clrootname) /= 'NOT USED' ) THEN ! if T_s is read and not T_su, set T_su = T_s 
     203               si(jp_tsu)%fnow(:,:,1) = si(jp_tms)%fnow(:,:,1) 
     204            ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN ! if T_i is read and not T_su, set T_su = T_i 
     205               si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     206            ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tsu)%clrootname) /= 'NOT USED' ) THEN ! if T_su is read and not T_s, set T_s = T_su 
     207               si(jp_tms)%fnow(:,:,1) = si(jp_tsu)%fnow(:,:,1) 
     208            ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN ! if T_i is read and not T_s, set T_s = T_i 
     209               si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
    203210            ENDIF 
    204             zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 
    205             ! 
    206             ! snow temperature => set to ice temperature if it exists 
    207             IF    ( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
    208                      si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    209             ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
    210                      si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
    211             ENDIF 
    212             ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 
    213211            ! 
    214212            ! pond concentration 
     
    216214               &     si(jp_apd)%fnow(:,:,1) = ( rn_apd_ini_n * zswitch + rn_apd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) & ! rn_apd = pond fraction => rn_apnd * a_i = pond conc. 
    217215               &                              * si(jp_ati)%fnow(:,:,1)  
    218             zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 
    219216            ! 
    220217            ! pond depth 
    221218            IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) & 
    222219               &     si(jp_hpd)%fnow(:,:,1) = ( rn_hpd_ini_n * zswitch + rn_hpd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     220            ! 
     221            zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 
     222            ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 
     223            zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 
     224            ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 
     225            zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 
    223226            zhpnd_ini(:,:) = si(jp_hpd)%fnow(:,:,1) 
    224227            ! 
Note: See TracChangeset for help on using the changeset viewer.