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 13472 for NEMO/trunk/src/ICE/icerst.F90 – NEMO

Ignore:
Timestamp:
2020-09-16T15:05:19+02:00 (4 years ago)
Author:
smasson
Message:

trunk: commit changes from r4.0-HEAD from 13284 to 13449, see #2523

File:
1 edited

Legend:

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

    r13286 r13472  
    1818   USE phycst  , ONLY : rt0 
    1919   USE sbc_oce , ONLY : nn_fsbc, ln_cpl 
     20   USE sbc_oce , ONLY : nn_components, jp_iam_sas   ! SAS ss[st]_m init 
     21   USE sbc_oce , ONLY : sst_m, sss_m                ! SAS ss[st]_m init 
     22   USE oce     , ONLY : ts                          ! SAS ss[st]_m init 
     23   USE eosbn2  , ONLY : l_useCT, eos_pt_from_ct     ! SAS ss[st]_m init 
    2024   USE iceistate      ! sea-ice: initial state 
    2125   USE icectl         ! sea-ice: control 
     
    132136      CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip  ) 
    133137      CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip  ) 
     138      CALL iom_rstput( iter, nitrst, numriw, 'v_il' , v_il  ) 
    134139      ! Snow enthalpy 
    135140      DO jk = 1, nlay_s  
     
    172177      INTEGER           ::   jk 
    173178      LOGICAL           ::   llok 
    174       INTEGER           ::   id0, id1, id2, id3, id4   ! local integer 
     179      INTEGER           ::   id0, id1, id2, id3, id4, id5   ! local integer 
    175180      CHARACTER(len=25) ::   znam 
    176181      CHARACTER(len=2)  ::   zchar, zchar1 
     
    251256            v_ip(:,:,:) = 0._wp 
    252257         ENDIF 
     258         ! melt pond lids 
     259         id3 = iom_varid( numrir, 'v_il' , ldstop = .FALSE. ) 
     260         IF( id3 > 0 ) THEN 
     261            CALL iom_get( numrir, jpdom_auto, 'v_il', v_il) 
     262         ELSE 
     263            IF(lwp) WRITE(numout,*) '   ==>>   previous run without melt ponds lids output then set it to zero' 
     264            v_il(:,:,:) = 0._wp 
     265         ENDIF 
    253266         ! fields needed for Met Office (Jules) coupling 
    254267         IF( ln_cpl ) THEN 
    255             id3 = iom_varid( numrir, 'cnd_ice' , ldstop = .FALSE. ) 
    256             id4 = iom_varid( numrir, 't1_ice'  , ldstop = .FALSE. ) 
    257             IF( id3 > 0 .AND. id4 > 0 ) THEN         ! fields exist 
     268            id4 = iom_varid( numrir, 'cnd_ice' , ldstop = .FALSE. ) 
     269            id5 = iom_varid( numrir, 't1_ice'  , ldstop = .FALSE. ) 
     270            IF( id4 > 0 .AND. id5 > 0 ) THEN         ! fields exist 
    258271               CALL iom_get( numrir, jpdom_auto, 'cnd_ice', cnd_ice ) 
    259272               CALL iom_get( numrir, jpdom_auto, 't1_ice' , t1_ice  ) 
     
    270283      ELSE                 ! == case of a simplified restart == ! 
    271284         !                 ! ---------------------------------- ! 
    272          CALL ctl_warn('ice_rst_read: you are using a simplified ice restart') 
     285         CALL ctl_warn('ice_rst_read: you are attempting to use an unsuitable ice restart') 
    273286         ! 
    274          CALL ice_istate_init 
     287         IF( .NOT. ln_iceini .OR. nn_iceini_file == 2 ) THEN 
     288            CALL ctl_stop('STOP', 'ice_rst_read: you need ln_ice_ini=T and nn_iceini_file=0 or 1') 
     289         ELSE 
     290            CALL ctl_warn('ice_rst_read: using ice_istate to set initial conditions instead') 
     291         ENDIF 
     292         ! 
     293         IF( nn_components == jp_iam_sas ) THEN   ! SAS case: ss[st]_m were not initialized by sbc_ssm_init 
     294            ! 
     295            IF(lwp) WRITE(numout,*) '  SAS: default initialisation of ss[st]_m arrays used in ice_istate' 
     296            IF( l_useCT )  THEN    ;   sst_m(:,:) = eos_pt_from_ct( ts(:,:,1,jp_tem, Kmm), ts(:,:,1,jp_sal, Kmm) ) 
     297            ELSE                   ;   sst_m(:,:) = ts(:,:,1,jp_tem, Kmm) 
     298            ENDIF 
     299            sss_m(:,:) = ts(:,:,1,jp_sal, Kmm) 
     300         ENDIF 
     301         ! 
    275302         CALL ice_istate( nit000, Kbb, Kmm, Kaa ) 
    276303         ! 
    277          IF( .NOT.ln_iceini .OR. .NOT.ln_iceini_file ) & 
    278             &   CALL ctl_stop('STOP', 'ice_rst_read: you need ln_ice_ini=T and ln_iceini_file=T') 
    279          ! 
    280304      ENDIF 
    281305 
Note: See TracChangeset for help on using the changeset viewer.