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 13540 for NEMO/branches/2020/r12377_ticket2386/src/ICE/icerst.F90 – NEMO

Ignore:
Timestamp:
2020-09-29T12:41:06+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2386: update to latest trunk

Location:
NEMO/branches/2020/r12377_ticket2386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r12377_ticket2386

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@13507        sette 
  • NEMO/branches/2020/r12377_ticket2386/src/ICE/icerst.F90

    r12377 r13540  
    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 
     
    8084            ENDIF 
    8185            ! 
    82             CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 
     86            CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
    8387            lrst_ice = .TRUE. 
    8488         ENDIF 
     
    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 
     
    185190      ENDIF 
    186191 
    187       CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kdlev = jpl ) 
     192      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir ) 
    188193 
    189194      ! test if v_i exists  
     
    211216 
    212217         ! --- mandatory fields --- !  
    213          CALL iom_get( numrir, jpdom_autoglo, 'v_i'  , v_i   ) 
    214          CALL iom_get( numrir, jpdom_autoglo, 'v_s'  , v_s   ) 
    215          CALL iom_get( numrir, jpdom_autoglo, 'sv_i' , sv_i  ) 
    216          CALL iom_get( numrir, jpdom_autoglo, 'a_i'  , a_i   ) 
    217          CALL iom_get( numrir, jpdom_autoglo, 't_su' , t_su  ) 
    218          CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 
    219          CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 
     218         CALL iom_get( numrir, jpdom_auto, 'v_i'  , v_i   ) 
     219         CALL iom_get( numrir, jpdom_auto, 'v_s'  , v_s   ) 
     220         CALL iom_get( numrir, jpdom_auto, 'sv_i' , sv_i  ) 
     221         CALL iom_get( numrir, jpdom_auto, 'a_i'  , a_i   ) 
     222         CALL iom_get( numrir, jpdom_auto, 't_su' , t_su  ) 
     223         CALL iom_get( numrir, jpdom_auto, 'u_ice', u_ice, cd_type = 'U', psgn = -1._wp ) 
     224         CALL iom_get( numrir, jpdom_auto, 'v_ice', v_ice, cd_type = 'V', psgn = -1._wp ) 
    220225         ! Snow enthalpy 
    221226         DO jk = 1, nlay_s 
    222227            WRITE(zchar1,'(I2.2)') jk 
    223228            znam = 'e_s'//'_l'//zchar1 
    224             CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
     229            CALL iom_get( numrir, jpdom_auto, znam , z3d ) 
    225230            e_s(:,:,jk,:) = z3d(:,:,:) 
    226231         END DO 
     
    229234            WRITE(zchar1,'(I2.2)') jk 
    230235            znam = 'e_i'//'_l'//zchar1 
    231             CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 
     236            CALL iom_get( numrir, jpdom_auto, znam , z3d ) 
    232237            e_i(:,:,jk,:) = z3d(:,:,:) 
    233238         END DO 
     
    236241         id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 
    237242         IF( id1 > 0 ) THEN                       ! fields exist 
    238             CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 
     243            CALL iom_get( numrir, jpdom_auto, 'oa_i', oa_i ) 
    239244         ELSE                                     ! start from rest 
    240245            IF(lwp) WRITE(numout,*) '   ==>>   previous run without ice age output then set it to zero' 
     
    244249         id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 
    245250         IF( id2 > 0 ) THEN                       ! fields exist 
    246             CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 
    247             CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 
     251            CALL iom_get( numrir, jpdom_auto, 'a_ip' , a_ip ) 
     252            CALL iom_get( numrir, jpdom_auto, 'v_ip' , v_ip ) 
    248253         ELSE                                     ! start from rest 
    249254            IF(lwp) WRITE(numout,*) '   ==>>   previous run without melt ponds output then set it to zero' 
     
    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 
    258                CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 
    259                CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice  ) 
     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 
     271               CALL iom_get( numrir, jpdom_auto, 'cnd_ice', cnd_ice ) 
     272               CALL iom_get( numrir, jpdom_auto, 't1_ice' , t1_ice  ) 
    260273            ELSE                                     ! start from rest 
    261274               IF(lwp) WRITE(numout,*) '   ==>>   previous run without conductivity output then set it to zero' 
     
    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.