- Timestamp:
- 2017-10-04T09:19:23+02:00 (7 years ago)
- Location:
- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ICB
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ICB/icb_oce.F90
r6140 r8586 90 90 REAL(wp), PUBLIC, DIMENSION(:,:), ALLOCATABLE :: ua_e, va_e 91 91 REAL(wp), PUBLIC, DIMENSION(:,:), ALLOCATABLE :: ssh_e 92 #if defined key_lim 2 || defined key_lim3 || defined key_cice92 #if defined key_lim3 || defined key_cice 93 93 REAL(wp), PUBLIC, DIMENSION(:,:), ALLOCATABLE :: ui_e, vi_e 94 94 #endif … … 170 170 ALLOCATE( uo_e(0:jpi+1,0:jpj+1) , ua_e(0:jpi+1,0:jpj+1) , & 171 171 & vo_e(0:jpi+1,0:jpj+1) , va_e(0:jpi+1,0:jpj+1) , & 172 #if defined key_lim 2 || defined key_lim3 || defined key_cice172 #if defined key_lim3 || defined key_cice 173 173 & ui_e(0:jpi+1,0:jpj+1) , & 174 174 & vi_e(0:jpi+1,0:jpj+1) , & -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ICB/icbtrj.F90
r5215 r8586 16 16 USE dom_oce ! NEMO ocean domain 17 17 USE phycst ! NEMO physical constants 18 USE icb_oce ! define iceberg arrays 19 USE icbutl ! iceberg utility routines 20 ! 18 21 USE lib_mpp ! NEMO MPI library, lk_mpp in particular 19 22 USE in_out_manager ! NEMO IO, numout in particular 23 USE ioipsl , ONLY : ju2ymds ! for calendar 20 24 USE netcdf 21 25 ! 22 USE icb_oce ! define iceberg arrays23 USE icbutl ! iceberg utility routines24 26 25 27 IMPLICIT NONE … … 57 59 !! ** Purpose : initialise iceberg trajectory output files 58 60 !!---------------------------------------------------------------------- 59 INTEGER, INTENT( in ) :: ktend 60 ! 61 INTEGER :: iret 62 CHARACTER(len=80) :: cl_filename 63 TYPE(iceberg), POINTER :: this 64 TYPE(point) , POINTER :: pt 65 !!---------------------------------------------------------------------- 66 67 IF( lk_mpp ) THEN ; WRITE(cl_filename,'("trajectory_icebergs_",I6.6,"_",I4.4,".nc")') ktend, narea-1 68 ELSE ; WRITE(cl_filename,'("trajectory_icebergs_",I6.6 ,".nc")') ktend 61 INTEGER, INTENT(in) :: ktend ! time step index 62 ! 63 INTEGER :: iret, iyear, imonth, iday 64 REAL(wp) :: zfjulday, zsec 65 CHARACTER(len=80) :: cl_filename 66 CHARACTER(LEN=20) :: cldate_ini, cldate_end 67 TYPE(iceberg), POINTER :: this 68 TYPE(point) , POINTER :: pt 69 !!---------------------------------------------------------------------- 70 71 ! compute initial time step date 72 CALL ju2ymds( fjulday, iyear, imonth, iday, zsec ) 73 WRITE(cldate_ini, '(i4.4,2i2.2)') iyear, imonth, iday 74 75 ! compute end time step date 76 zfjulday = fjulday + rdt / rday * REAL( nitend - nit000 + 1 , wp) 77 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 78 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 79 WRITE(cldate_end, '(i4.4,2i2.2)') iyear, imonth, iday 80 81 ! define trajectory output name 82 IF( lk_mpp ) THEN ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A,"_",I4.4,".nc")') TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)), narea-1 83 ELSE ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A ,".nc")') TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)) 69 84 ENDIF 70 85 IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, icb_trj_init: creating ',TRIM(cl_filename) -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90
r7646 r8586 21 21 USE icb_oce ! define iceberg arrays 22 22 USE sbc_oce ! ocean surface boundary conditions 23 #if defined key_lim2 24 USE ice_2, ONLY: u_ice, v_ice ! LIM-2 ice velocities (CAUTION in C-grid do not use key_vp option) 25 USE ice_2, ONLY: hicif ! LIM-2 ice thickness 26 #elif defined key_lim3 27 USE ice, ONLY: u_ice, v_ice ! LIM-3 variables (always in C-grid) 28 ! gm LIM3 case the mean ice thickness (i.e. averaged over categories) 29 ! gm has to be computed somewhere in the ice and accessed here 23 #if defined key_lim3 24 USE ice, ONLY: u_ice, v_ice, hm_i ! LIM-3 variables 30 25 #endif 31 26 … … 85 80 CALL lbc_lnk_icb( fr_e, 'T', +1._wp, 1, 1 ) 86 81 CALL lbc_lnk_icb( tt_e, 'T', +1._wp, 1, 1 ) 87 #if defined key_lim2 88 hicth(:,:) = 0._wp ; hicth(1:jpi,1:jpj) = hicif(:,:) 89 CALL lbc_lnk_icb(hicth, 'T', +1._wp, 1, 1 ) 90 #endif 91 92 #if defined key_lim2 || defined key_lim3 82 #if defined key_lim3 83 hicth(:,:) = 0._wp ; hicth(1:jpi,1:jpj) = hm_i (:,:) 93 84 ui_e(:,:) = 0._wp ; ui_e(1:jpi, 1:jpj) = u_ice(:,:) 94 85 vi_e(:,:) = 0._wp ; vi_e(1:jpi, 1:jpj) = v_ice(:,:) 95 86 CALL lbc_lnk_icb(hicth, 'T', +1._wp, 1, 1 ) 96 87 CALL lbc_lnk_icb( ui_e, 'U', -1._wp, 1, 1 ) 97 88 CALL lbc_lnk_icb( vi_e, 'V', -1._wp, 1, 1 ) … … 157 148 pva = pva * zmod 158 149 159 #if defined key_lim 2 || defined key_lim3150 #if defined key_lim3 160 151 pui = icb_utl_bilin_h( ui_e, pi, pj, 'U' ) ! sea-ice velocities 161 152 pvi = icb_utl_bilin_h( vi_e, pi, pj, 'V' ) 162 # if defined key_lim3163 phi = 0._wp ! LIM-3 case (to do)164 # else165 153 phi = icb_utl_bilin_h(hicth, pi, pj, 'T' ) ! ice thickness 166 # endif167 154 #else 168 155 pui = 0._wp
Note: See TracChangeset
for help on using the changeset viewer.