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

Changeset 12398


Ignore:
Timestamp:
2020-02-18T12:40:11+01:00 (5 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/releases/release-4.0-HEAD/src/ICE/iceistate.F90

    r11536 r12398  
    181181 
    182182            ! -- optional fields -- ! 
    183             !    if fields do not exist then set them to the values present in the namelist (except for snow and surface temperature) 
     183            !    if fields do not exist then set them to the values present in the namelist (except for temperatures) 
    184184            ! 
    185185            ! ice salinity 
    186186            IF( TRIM(si(jp_smi)%clrootname) == 'NOT USED' ) & 
    187187               &     si(jp_smi)%fnow(:,:,1) = ( rn_smi_ini_n * zswitch + rn_smi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    188             zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 
    189             ! 
    190             ! ice temperature 
    191             IF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) & 
    192                &     si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    193             ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 
    194             ! 
    195             ! surface temperature => set to ice temperature if it exists 
    196             IF    ( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
    197                      si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    198             ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
    199                      si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     188            ! 
     189            ! temperatures 
     190            IF    ( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. & 
     191               &    TRIM(si(jp_tms)%clrootname) == 'NOT USED' ) THEN 
     192               si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     193               si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     194               si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     195            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 
     196               si(jp_tmi)%fnow(:,:,1) = 0.5_wp * ( si(jp_tms)%fnow(:,:,1) + 271.15 ) 
     197            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 
     198               si(jp_tmi)%fnow(:,:,1) = 0.5_wp * ( si(jp_tsu)%fnow(:,:,1) + 271.15 ) 
     199            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 
     200               si(jp_tsu)%fnow(:,:,1) = si(jp_tms)%fnow(:,:,1) 
     201            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 
     202               si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
     203            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 
     204               si(jp_tms)%fnow(:,:,1) = si(jp_tsu)%fnow(:,:,1) 
     205            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 
     206               si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
    200207            ENDIF 
    201             zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 
    202             ! 
    203             ! snow temperature => set to ice temperature if it exists 
    204             IF    ( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 
    205                      si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
    206             ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 
    207                      si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 
    208             ENDIF 
    209             ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 
    210208            ! 
    211209            ! pond concentration 
     
    213211               &     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. 
    214212               &                              * si(jp_ati)%fnow(:,:,1)  
    215             zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 
    216213            ! 
    217214            ! pond depth 
    218215            IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) & 
    219216               &     si(jp_hpd)%fnow(:,:,1) = ( rn_hpd_ini_n * zswitch + rn_hpd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 
     217            ! 
     218            zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 
     219            ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 
     220            zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 
     221            ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 
     222            zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 
    220223            zhpnd_ini(:,:) = si(jp_hpd)%fnow(:,:,1) 
    221224            ! 
Note: See TracChangeset for help on using the changeset viewer.