MODULE limrst !!====================================================================== !! *** MODULE limrst *** !! Ice restart : write the ice restart file !!====================================================================== #if defined key_lim3 !!---------------------------------------------------------------------- !! 'key_lim3' : LIM sea-ice model !!---------------------------------------------------------------------- !! lim_rst_opn : open ice restart file !! lim_rst_write : write of the restart file !! lim_rst_read : read the restart file !!---------------------------------------------------------------------- !! * Modules used USE ice USE par_ice USE in_out_manager USE dom_oce USE ice_oce ! ice variables USE daymod USE iom IMPLICIT NONE PRIVATE !! * Accessibility PUBLIC lim_rst_opn ! routine called by icestep.F90 PUBLIC lim_rst_write ! routine called by icestep.F90 PUBLIC lim_rst_read ! routine called by iceinit.F90 LOGICAL, PUBLIC :: lrst_ice !: logical to control the ice restart write INTEGER, PUBLIC :: numrir, numriw !: logical unit for ice restart (read and write) !!---------------------------------------------------------------------- !! LIM 2.0, UCL-LOCEAN-IPSL (2005) !! $Id:$ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_rst_opn( kt ) !!---------------------------------------------------------------------- !! *** lim_rst_opn *** !! !! ** purpose : output of sea-ice variable in a netcdf file !!---------------------------------------------------------------------- INTEGER, INTENT(in) :: kt ! number of iteration ! CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character CHARACTER(LEN=50) :: clname ! ice output restart file name !!---------------------------------------------------------------------- ! IF( kt == nit000 ) lrst_ice = .FALSE. ! default definition ! to get better performances with NetCDF format: ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nfice + 1) ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nfice + 1 IF( kt == nitrst - 2*nfice + 1 .OR. nstock == nfice .OR. ( kt == nitend - nfice + 1 .AND. .NOT. lrst_ice ) ) THEN ! beware of the format used to write kt (default is i8.8, that should be large enough...) IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst ELSE ; WRITE(clkt, '(i8.8)') nitrst ENDIF ! create the file clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_ice" IF(lwp) THEN WRITE(numout,*) SELECT CASE ( jprstlib ) CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname END SELECT IF( kt == nitrst - 2*nfice + 1 ) THEN WRITE(numout,*) ' kt = nitrst - 2*nfice + 1 = ', kt,' date= ', ndastp ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp ENDIF ENDIF CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) lrst_ice = .TRUE. ENDIF ! END SUBROUTINE lim_rst_opn SUBROUTINE lim_rst_write( kt ) !!---------------------------------------------------------------------- !! *** lim_rst_write *** !! !! ** purpose : output of sea-ice variable in a netcdf file !! !!---------------------------------------------------------------------- ! Arguments : INTEGER, INTENT(in) :: kt ! number of iteration ! Local variables : REAL(wp), DIMENSION(jpi,jpj) :: z2d INTEGER :: ji, jj, jk ,jl INTEGER :: iter CHARACTER(len=15) :: znam CHARACTER(len=1) :: zchar, zchar1 !!---------------------------------------------------------------------- iter = kt + nfice - 1 ! ice restarts are written at kt == nitrst - nfice + 1 IF( iter == nitrst ) THEN IF(lwp) WRITE(numout,*) IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart file kt =', kt IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' ENDIF ! Write in numriw (if iter == nitrst) ! ------------------ ! ! calendar control CALL iom_rstput( iter, nitrst, numriw, 'nfice' , REAL( nfice, wp) ) ! time-step CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter , wp) ) ! date ! Prognostic variables DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'v_i'//'_htc'//zchar z2d(:,:) = v_i(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'v_s'//'_htc'//zchar z2d(:,:) = v_s(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'smv_i'//'_htc'//zchar z2d(:,:) = smv_i(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'oa_i'//'_htc'//zchar z2d(:,:) = oa_i(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'a_i'//'_htc'//zchar z2d(:,:) = a_i(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 't_su'//'_htc'//zchar z2d(:,:) = t_su(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) END DO # if defined key_coupled CALL iom_rstput( iter, nitrst, numriw, 'albege', albege(:,:) ) # endif DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'tempt_sl1'//'_htc'//zchar z2d(:,:) = e_s(:,:,1,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) END DO DO jl = 1, jpl WRITE(zchar,'(I1)') jl DO jk = 1, nlay_i WRITE(zchar1,'(I1)') jk znam = 'tempt'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = e_i(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) END DO END DO CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice ) CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice ) CALL iom_rstput( iter, nitrst, numriw, 'gtaux' , gtaux ) CALL iom_rstput( iter, nitrst, numriw, 'gtauy' , gtauy ) CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq ) CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i ) CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i ) CALL iom_rstput( iter, nitrst, numriw, 'stress12_i', stress12_i ) DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'sxice'//'_htc'//zchar z2d(:,:) = sxice(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syice'//'_htc'//zchar z2d(:,:) = syice(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxice'//'_htc'//zchar z2d(:,:) = sxxice(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syyice'//'_htc'//zchar z2d(:,:) = syyice(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxyice'//'_htc'//zchar z2d(:,:) = sxyice(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxsn'//'_htc'//zchar z2d(:,:) = sxsn(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sysn'//'_htc'//zchar z2d(:,:) = sysn(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxsn'//'_htc'//zchar z2d(:,:) = sxxsn(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syysn'//'_htc'//zchar z2d(:,:) = syysn(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxysn'//'_htc'//zchar z2d(:,:) = sxysn(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxa'//'_htc'//zchar z2d(:,:) = sxa(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sya'//'_htc'//zchar z2d(:,:) = sya(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxa'//'_htc'//zchar z2d(:,:) = sxxa(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syya'//'_htc'//zchar z2d(:,:) = syya(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxya'//'_htc'//zchar z2d(:,:) = sxya(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxc0'//'_htc'//zchar z2d(:,:) = sxc0(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syc0'//'_htc'//zchar z2d(:,:) = syc0(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxc0'//'_htc'//zchar z2d(:,:) = sxxc0(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syyc0'//'_htc'//zchar z2d(:,:) = syyc0(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxyc0'//'_htc'//zchar z2d(:,:) = sxyc0(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxsal'//'_htc'//zchar z2d(:,:) = sxsal(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sysal'//'_htc'//zchar z2d(:,:) = sysal(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxsal'//'_htc'//zchar z2d(:,:) = sxxsal(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syysal'//'_htc'//zchar z2d(:,:) = syysal(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxysal'//'_htc'//zchar z2d(:,:) = sxysal(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxage'//'_htc'//zchar z2d(:,:) = sxage(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syage'//'_htc'//zchar z2d(:,:) = syage(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxage'//'_htc'//zchar z2d(:,:) = sxxage(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syyage'//'_htc'//zchar z2d(:,:) = syyage(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxyage'//'_htc'//zchar z2d(:,:) = sxyage(:,:,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) END DO CALL iom_rstput( iter, nitrst, numriw, 'sxopw ' , sxopw ) CALL iom_rstput( iter, nitrst, numriw, 'syopw ' , syopw ) CALL iom_rstput( iter, nitrst, numriw, 'sxxopw' , sxxopw ) CALL iom_rstput( iter, nitrst, numriw, 'syyopw' , syyopw ) CALL iom_rstput( iter, nitrst, numriw, 'sxyopw' , sxyopw ) DO jl = 1, jpl WRITE(zchar,'(I1)') jl DO jk = 1, nlay_i WRITE(zchar1,'(I1)') jk znam = 'sxe'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = sxe(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sye'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = sye(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = sxxe(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'syye'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = syye(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) znam = 'sxye'//'_il'//zchar1//'_htc'//zchar z2d(:,:) = sxye(:,:,jk,jl) CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) END DO END DO IF( iter == nitrst ) THEN CALL iom_close( numriw ) ! close the restart file lrst_ice = .FALSE. ENDIF ! !+++++++++++ CHECK EVERYTHING ++++++++++ WRITE(numout,*) WRITE(numout,*) ' lim_rst_write : CHUKCHI SEA POINT ' WRITE(numout,*) ' ~~~~~~~~~~' WRITE(numout,*) ' ~~~ Arctic' ji = jiindex jj = jjindex WRITE(numout,*) ' ji, jj ', ji, jj WRITE(numout,*) ' ICE VARIABLES ' WRITE(numout,*) ' open water ', ato_i(ji,jj) DO jl = 1, jpl WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl WRITE(numout,*) ' ' WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl) WRITE(numout,*) ' v_i : ', v_i(ji,jj,jl) WRITE(numout,*) ' v_s : ', v_s(ji,jj,jl) WRITE(numout,*) ' e_s : ', e_s(ji,jj,1,jl)/1.0e9 WRITE(numout,*) ' e_i1 : ', e_i(ji,jj,1,jl)/1.0e9 WRITE(numout,*) ' e_i2 : ', e_i(ji,jj,2,jl)/1.0e9 WRITE(numout,*) ' smv_i : ', smv_i(ji,jj,jl) WRITE(numout,*) ' oa_i : ', oa_i(ji,jj,jl) WRITE(numout,*) ' t_su : ', t_su(ji,jj,jl) END DO WRITE(numout,*) ' MOMENTS OF ADVECTION ' WRITE(numout,*) ' open water ' WRITE(numout,*) ' sxopw ', sxopw(ji,jj) WRITE(numout,*) ' syopw ', syopw(ji,jj) WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj) WRITE(numout,*) ' syyopw ', syyopw(ji,jj) WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj) DO jl = 1, jpl WRITE(numout,*) ' jl, ice volume content ', jl WRITE(numout,*) ' sxice ', sxice(ji,jj,jl) WRITE(numout,*) ' syice ', syice(ji,jj,jl) WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl) WRITE(numout,*) ' syyice ', syyice(ji,jj,jl) WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl) WRITE(numout,*) ' jl, snow volume content ', jl WRITE(numout,*) ' sxsn ', sxsn(ji,jj,jl) WRITE(numout,*) ' sysn ', sysn(ji,jj,jl) WRITE(numout,*) ' sxxsn ', sxxsn(ji,jj,jl) WRITE(numout,*) ' syysn ', syysn(ji,jj,jl) WRITE(numout,*) ' sxysn ', sxysn(ji,jj,jl) WRITE(numout,*) ' jl, ice area in category ', jl WRITE(numout,*) ' sxa ', sxa (ji,jj,jl) WRITE(numout,*) ' sya ', sya (ji,jj,jl) WRITE(numout,*) ' sxxa ', sxxa (ji,jj,jl) WRITE(numout,*) ' syya ', syya (ji,jj,jl) WRITE(numout,*) ' sxya ', sxya (ji,jj,jl) WRITE(numout,*) ' jl, snow temp ', jl WRITE(numout,*) ' sxc0 ', sxc0(ji,jj,jl) WRITE(numout,*) ' syc0 ', syc0(ji,jj,jl) WRITE(numout,*) ' sxxc0 ', sxxc0(ji,jj,jl) WRITE(numout,*) ' syyc0 ', syyc0(ji,jj,jl) WRITE(numout,*) ' sxyc0 ', sxyc0(ji,jj,jl) WRITE(numout,*) ' jl, ice salinity ', jl WRITE(numout,*) ' sxsal ', sxsal(ji,jj,jl) WRITE(numout,*) ' sysal ', sysal(ji,jj,jl) WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl) WRITE(numout,*) ' syysal ', syysal(ji,jj,jl) WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl) WRITE(numout,*) ' jl, ice age ', jl WRITE(numout,*) ' sxage ', sxage(ji,jj,jl) WRITE(numout,*) ' syage ', syage(ji,jj,jl) WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl) WRITE(numout,*) ' syyage ', syyage(ji,jj,jl) WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl) END DO DO jl = 1, jpl DO jk = 1, nlay_i WRITE(numout,*) ' jk, jl, ice heat content', jk, jl WRITE(numout,*) ' sxe ', sxe(ji,jj,jk,jl) WRITE(numout,*) ' sye ', sye(ji,jj,jk,jl) WRITE(numout,*) ' sxxe ', sxxe(ji,jj,jk,jl) WRITE(numout,*) ' syye ', syye(ji,jj,jk,jl) WRITE(numout,*) ' sxye ', sxye(ji,jj,jk,jl) END DO END DO !+++++++++++ END CHECK +++++++++++++++++ END SUBROUTINE lim_rst_write SUBROUTINE lim_rst_read !!---------------------------------------------------------------------- !! *** lim_rst_read *** !! !! ** purpose : read of sea-ice variable restart in a netcdf file !!---------------------------------------------------------------------- ! Local variables INTEGER :: ji, jj, jk, jl, index REAL(wp) :: zfice, ziter REAL(wp) :: & !parameters for the salinity profile zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb REAL(wp), DIMENSION(nlay_i) :: zs_zero REAL(wp), DIMENSION(jpi,jpj) :: z2d CHARACTER(len=15) :: znam CHARACTER(len=1) :: zchar, zchar1 !!---------------------------------------------------------------------- IF(lwp) THEN WRITE(numout,*) WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file' WRITE(numout,*) '~~~~~~~~~~~~~~' ENDIF CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) CALL iom_get( numrir, 'nfice' , zfice ) CALL iom_get( numrir, 'kt_ice', ziter ) IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 !Control of date IF( ( nit000 - INT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nit000 in ice restart', & & ' verify the file or rerun with the value 0 for the', & & ' control of time parameter nrstdt' ) IF( INT(zfice) /= nfice .AND. ABS( nrstdt ) == 1 ) & & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nfice in ice restart', & & ' verify the file or rerun with the value 0 for the', & & ' control of time parameter nrstdt' ) DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'v_i'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) v_i(:,:,jl) = z2d(:,:) znam = 'v_s'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) v_s(:,:,jl) = z2d(:,:) znam = 'smv_i'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) smv_i(:,:,jl) = z2d(:,:) znam = 'oa_i'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) oa_i(:,:,jl) = z2d(:,:) znam = 'a_i'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) a_i(:,:,jl) = z2d(:,:) znam = 't_su'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) t_su(:,:,jl) = z2d(:,:) END DO ! we first with bulk ice salinity DO jl = 1, jpl DO jj = 1, jpj DO ji = 1, jpi zindb = MAX( 0.0 , SIGN( 1.0 , v_i(ji,jj,jl) - 1.0e-4 ) ) sm_i(ji,jj,jl) = smv_i(ji,jj,jl) / MAX(v_i(ji,jj,jl),1.0e-6) * zindb ht_i(ji,jj,jl) = v_i(ji,jj,jl) / MAX(a_i(ji,jj,jl),1.0e-6) * zindb END DO END DO END DO DO jk = 1, nlay_i s_i(:,:,jk,:) = sm_i(:,:,:) END DO ! Salinity profile !----------------- WRITE(numout,*) ' num_sal - will restart understand salinity profile ', num_sal num_sal = 2 IF(num_sal.eq.2) THEN ! CALL lim_var_salprof DO jl = 1, jpl DO jk = 1, nlay_i DO jj = 1, jpj DO ji = 1, jpi zs_inf = sm_i(ji,jj,jl) z_slope_s = 2.0*sm_i(ji,jj,jl)/MAX(0.01,ht_i(ji,jj,jl)) !- slope of the salinity profile zs_zero(jk) = z_slope_s * ( FLOAT(jk)-1.0/2.0 ) * & ht_i(ji,jj,jl) / FLOAT(nlay_i) zsmax = 4.5 zsmin = 3.5 IF( sm_i(ji,jj,jl) .LT. zsmin ) THEN zalpha = 1.0 ELSEIF( sm_i(ji,jj,jl) .LT.zsmax ) THEN zalpha = sm_i(ji,jj,jl) / (zsmin-zsmax) + zsmax / (zsmax-zsmin) ELSE zalpha = 0.0 ENDIF s_i(ji,jj,jk,jl) = zalpha*zs_zero(jk) + ( 1.0 - zalpha )*zs_inf END DO END DO END DO END DO ENDIF # if defined key_coupled CALL iom_get( numrir, jpdom_autoglo, 'albege' , albege ) # endif DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'tempt_sl1'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) e_s(:,:,1,jl) = z2d(:,:) END DO DO jl = 1, jpl WRITE(zchar,'(I1)') jl DO jk = 1, nlay_i WRITE(zchar1,'(I1)') jk znam = 'tempt'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) e_i(:,:,jk,jl) = z2d(:,:) END DO END DO CALL iom_get( numrir, jpdom_autoglo, 'u_ice' , u_ice ) CALL iom_get( numrir, jpdom_autoglo, 'v_ice' , v_ice ) CALL iom_get( numrir, jpdom_autoglo, 'gtaux' , gtaux ) CALL iom_get( numrir, jpdom_autoglo, 'gtauy' , gtauy ) CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq ) CALL iom_get( numrir, jpdom_autoglo, 'stress1_i' , stress1_i ) CALL iom_get( numrir, jpdom_autoglo, 'stress2_i' , stress2_i ) CALL iom_get( numrir, jpdom_autoglo, 'stress12_i', stress12_i ) DO jl = 1, jpl WRITE(zchar,'(I1)') jl znam = 'sxice'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxice(:,:,jl) = z2d(:,:) znam = 'syice'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syice(:,:,jl) = z2d(:,:) znam = 'sxxice'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxice(:,:,jl) = z2d(:,:) znam = 'syyice'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syyice(:,:,jl) = z2d(:,:) znam = 'sxyice'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxyice(:,:,jl) = z2d(:,:) znam = 'sxsn'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxsn(:,:,jl) = z2d(:,:) znam = 'sysn'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sysn(:,:,jl) = z2d(:,:) znam = 'sxxsn'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxsn(:,:,jl) = z2d(:,:) znam = 'syysn'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syysn(:,:,jl) = z2d(:,:) znam = 'sxysn'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxysn(:,:,jl) = z2d(:,:) znam = 'sxa'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxa(:,:,jl) = z2d(:,:) znam = 'sya'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sya(:,:,jl) = z2d(:,:) znam = 'sxxa'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxa(:,:,jl) = z2d(:,:) znam = 'syya'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syya(:,:,jl) = z2d(:,:) znam = 'sxya'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxya(:,:,jl) = z2d(:,:) znam = 'sxc0'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxc0(:,:,jl) = z2d(:,:) znam = 'syc0'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syc0(:,:,jl) = z2d(:,:) znam = 'sxxc0'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxc0(:,:,jl) = z2d(:,:) znam = 'syyc0'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syyc0(:,:,jl) = z2d(:,:) znam = 'sxyc0'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxyc0(:,:,jl) = z2d(:,:) znam = 'sxsal'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxsal(:,:,jl) = z2d(:,:) znam = 'sysal'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sysal(:,:,jl) = z2d(:,:) znam = 'sxxsal'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxsal(:,:,jl) = z2d(:,:) znam = 'syysal'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syysal(:,:,jl) = z2d(:,:) znam = 'sxysal'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxysal(:,:,jl) = z2d(:,:) znam = 'sxage'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxage(:,:,jl) = z2d(:,:) znam = 'syage'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syage(:,:,jl) = z2d(:,:) znam = 'sxxage'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxage(:,:,jl) = z2d(:,:) znam = 'syyage'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syyage(:,:,jl) = z2d(:,:) znam = 'sxyage'//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxyage(:,:,jl)= z2d(:,:) END DO CALL iom_get( numrir, jpdom_autoglo, 'sxopw ' , sxopw ) CALL iom_get( numrir, jpdom_autoglo, 'syopw ' , syopw ) CALL iom_get( numrir, jpdom_autoglo, 'sxxopw' , sxxopw ) CALL iom_get( numrir, jpdom_autoglo, 'syyopw' , syyopw ) CALL iom_get( numrir, jpdom_autoglo, 'sxyopw' , sxyopw ) DO jl = 1, jpl WRITE(zchar,'(I1)') jl DO jk = 1, nlay_i WRITE(zchar1,'(I1)') jk znam = 'sxe'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxe(:,:,jk,jl) = z2d(:,:) znam = 'sye'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sye(:,:,jk,jl) = z2d(:,:) znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxxe(:,:,jk,jl) = z2d(:,:) znam = 'syye'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) syye(:,:,jk,jl) = z2d(:,:) znam = 'sxye'//'_il'//zchar1//'_htc'//zchar CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) sxye(:,:,jk,jl) = z2d(:,:) END DO END DO CALL iom_close( numrir ) !+++++++++++ CHECK EVERYTHING ++++++++++ WRITE(numout,*) WRITE(numout,*) ' lim_rst_read : CHUKCHI SEA POINT ' WRITE(numout,*) ' ~~~~~~~~~~' WRITE(numout,*) ' ~~~ Arctic' index = 1 ji = 24 jj = 24 WRITE(numout,*) ' ji, jj ', ji, jj WRITE(numout,*) ' ICE VARIABLES ' WRITE(numout,*) ' open water ', ato_i(ji,jj) DO jl = 1, jpl WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl WRITE(numout,*) ' ' WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl) WRITE(numout,*) ' v_i : ', v_i(ji,jj,jl) WRITE(numout,*) ' v_s : ', v_s(ji,jj,jl) WRITE(numout,*) ' e_i1 : ', e_i(ji,jj,1,jl)/1.0e9 WRITE(numout,*) ' e_i2 : ', e_i(ji,jj,2,jl)/1.0e9 WRITE(numout,*) ' e_s : ', e_s(ji,jj,1,jl) WRITE(numout,*) ' smv_i : ', smv_i(ji,jj,jl) WRITE(numout,*) ' oa_i : ', oa_i(ji,jj,jl) WRITE(numout,*) ' t_su : ', t_su(ji,jj,jl) END DO WRITE(numout,*) ' open water ' WRITE(numout,*) ' sxopw ', sxopw(ji,jj) WRITE(numout,*) ' syopw ', syopw(ji,jj) WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj) WRITE(numout,*) ' syyopw ', syyopw(ji,jj) WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj) DO jl = 1, jpl WRITE(numout,*) ' jl, ice volume content ', jl WRITE(numout,*) ' sxice ', sxice(ji,jj,jl) WRITE(numout,*) ' syice ', syice(ji,jj,jl) WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl) WRITE(numout,*) ' syyice ', syyice(ji,jj,jl) WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl) WRITE(numout,*) ' jl, snow volume content ', jl WRITE(numout,*) ' sxsn ', sxsn(ji,jj,jl) WRITE(numout,*) ' sysn ', sysn(ji,jj,jl) WRITE(numout,*) ' sxxsn ', sxxsn(ji,jj,jl) WRITE(numout,*) ' syysn ', syysn(ji,jj,jl) WRITE(numout,*) ' sxysn ', sxysn(ji,jj,jl) WRITE(numout,*) ' jl, ice area in category ', jl WRITE(numout,*) ' sxa ', sxa (ji,jj,jl) WRITE(numout,*) ' sya ', sya (ji,jj,jl) WRITE(numout,*) ' sxxa ', sxxa (ji,jj,jl) WRITE(numout,*) ' syya ', syya (ji,jj,jl) WRITE(numout,*) ' sxya ', sxya (ji,jj,jl) WRITE(numout,*) ' jl, snow temp ', jl WRITE(numout,*) ' sxc0 ', sxc0(ji,jj,jl) WRITE(numout,*) ' syc0 ', syc0(ji,jj,jl) WRITE(numout,*) ' sxxc0 ', sxxc0(ji,jj,jl) WRITE(numout,*) ' syyc0 ', syyc0(ji,jj,jl) WRITE(numout,*) ' sxyc0 ', sxyc0(ji,jj,jl) WRITE(numout,*) ' jl, ice salinity ', jl WRITE(numout,*) ' sxsal ', sxsal(ji,jj,jl) WRITE(numout,*) ' sysal ', sysal(ji,jj,jl) WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl) WRITE(numout,*) ' syysal ', syysal(ji,jj,jl) WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl) WRITE(numout,*) ' jl, ice age ', jl WRITE(numout,*) ' sxage ', sxage(ji,jj,jl) WRITE(numout,*) ' syage ', syage(ji,jj,jl) WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl) WRITE(numout,*) ' syyage ', syyage(ji,jj,jl) WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl) END DO DO jl = 1, jpl DO jk = 1, nlay_i WRITE(numout,*) ' jk, jl, ice heat content', jk, jl WRITE(numout,*) ' sxe ', sxe(ji,jj,jk,jl) WRITE(numout,*) ' sye ', sye(ji,jj,jk,jl) WRITE(numout,*) ' sxxe ', sxxe(ji,jj,jk,jl) WRITE(numout,*) ' syye ', syye(ji,jj,jk,jl) WRITE(numout,*) ' sxye ', sxye(ji,jj,jk,jl) END DO END DO !+++++++++++ END CHECK +++++++++++++++++ END SUBROUTINE lim_rst_read #else !!---------------------------------------------------------------------- !! Default option : Empty module NO LIM sea-ice model !!---------------------------------------------------------------------- CONTAINS SUBROUTINE lim_rst_read ! Empty routine END SUBROUTINE lim_rst_read SUBROUTINE lim_rst_write ! Empty routine END SUBROUTINE lim_rst_write #endif !!====================================================================== END MODULE limrst