Changeset 7060
- Timestamp:
- 2016-10-20T16:16:29+02:00 (8 years ago)
- Location:
- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r6853 r7060 108 108 ! 1) Read namelist 109 109 !-------------------------------------------------------------------- 110 111 CALL lim_istate_init ! reading the initials parameters of the ice 112 113 ! surface temperature 114 DO jl = 1, jpl ! loop over categories 110 CALL lim_istate_init 111 112 ! init surface temperature 113 DO jl = 1, jpl 115 114 t_su (:,:,jl) = rt0 * tmask(:,:,1) 116 115 tn_ice(:,:,jl) = rt0 * tmask(:,:,1) 117 116 END DO 118 117 119 ! basal temperature (considered at freezing point)118 ! init basal temperature (considered at freezing point) 120 119 CALL eos_fzp( sss_m(:,:), t_bo(:,:) ) 121 120 t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) 122 121 123 122 123 !-------------------------------------------------------------------- 124 ! 2) Initialization of sea ice state variables 125 !-------------------------------------------------------------------- 124 126 IF( ln_limini ) THEN 125 127 126 !--------------------------------------------------------------------127 ! 2) Basal temperature, ice mask and hemispheric index128 !--------------------------------------------------------------------129 130 DO jj = 1, jpj ! ice if sst <= t-freez + ttest131 DO ji = 1, jpi132 IF( ( sst_m(ji,jj) - ( t_bo(ji,jj) - rt0 ) ) * tmask(ji,jj,1) >= rn_thres_sst * tmask(ji,jj,1) ) THEN133 zswitch(ji,jj) = 0._wp ! no ice134 ELSE135 zswitch(ji,jj) = 1._wp * tmask(ji,jj,1) ! ice136 ENDIF137 END DO138 END DO139 140 !--------------------------------------------------------------------141 ! 3) Initialization of sea ice state variables142 !--------------------------------------------------------------------143 128 IF( ln_limini_file )THEN 144 129 … … 150 135 zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 151 136 137 WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1) 138 ELSEWHERE ; zswitch(:,:) = 0._wp 139 END WHERE 140 152 141 ELSE ! ln_limini_file = F 142 143 !-------------------------------------------------------------------- 144 ! 3) Basal temperature, ice mask 145 !-------------------------------------------------------------------- 146 ! no ice if sst <= t-freez + ttest 147 WHERE( ( sst_m(:,:) - (t_bo(:,:) - rt0) ) * tmask(:,:,1) >= rn_thres_sst ) ; zswitch(:,:) = 0._wp 148 ELSEWHERE ; zswitch(:,:) = tmask(:,:,1) 149 END WHERE 153 150 154 151 !----------------------------- … … 457 454 !! ! Output the initial state and forcings 458 455 !! CALL dia_wri_state( 'output.init', nit000 ) 459 !!! 460 456 !!! 457 461 458 CALL wrk_dealloc( jpi, jpj, jpl, zh_i_ini, za_i_ini ) 462 459 CALL wrk_dealloc( jpi, jpj, zht_i_ini, zat_i_ini, zvt_i_ini, zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini ) -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_ice.F90
r6584 r7060 60 60 END FUNCTION agrif_ice_alloc 61 61 62 #endif 63 64 #if defined key_agrif && defined key_lim3 62 #elif defined key_agrif && defined key_lim3 65 63 !!---------------------------------------------------------------------- 66 64 !! 'key_agrif' AGRIF zoom -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90
r6746 r7060 134 134 !! put -9999 WHERE the parent grid is masked. The child solution will be found in the 9(?) points around 135 135 !!----------------------------------------------------------------------- 136 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab 136 137 INTEGER , INTENT(in) :: i1, i2, j1, j2, k1, k2 137 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab138 138 LOGICAL , INTENT(in) :: before 139 139 !! … … 142 142 ! clem: pkoi on n'utilise pas les quantités intégrées ici => before: * e12t ; after: * r1_e12t / rhox / rhoy 143 143 ! a priori c'est ok comme ca (cf ce qui est fait dans l'ocean). Je ne sais pas pkoi ceci dit 144 144 145 IF( before ) THEN ! parent grid 145 146 jm = 1 -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
r6204 r7060 638 638 REAL(wp) :: zalpha4, zalpha5, zalpha6, zalpha7 639 639 LOGICAL :: western_side, eastern_side,northern_side,southern_side 640 640 641 641 IF (before) THEN 642 642 ptab(i1:i2,j1:j2,k1:k2,n1:n2) = tsn(i1:i2,j1:j2,k1:k2,n1:n2) -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r6584 r7060 306 306 ! Note that update below is recursive (with lk_agrif_doupd=T): 307 307 ! 308 !!#if ! defined key_sas2D 308 309 ! JC: I am not sure if Agrif_MaxLevel() is the "relative" 309 310 ! or the absolute maximum nesting level...TBC … … 313 314 CALL Agrif_Update_dyn() 314 315 ENDIF 316 !!#endif 315 317 ! 316 318 # if defined key_zdftke … … 321 323 nbcline = 0 322 324 lk_agrif_doupd = .FALSE. 325 323 326 ! 324 327 END SUBROUTINE Agrif_InitValues_cont … … 454 457 ! CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average) 455 458 ! CALL Agrif_Set_Updatetype(sshn_id, update = Agrif_Update_Full_Weighting) 456 459 457 460 ! 458 461 END SUBROUTINE agrif_declare_var … … 609 612 !! ** Purpose :: Declaration of variables to be interpolated for LIM3 610 613 !!---------------------------------------------------------------------- 611 USE agrif_util 614 USE Agrif_Util 615 USE Agrif_ice !clem useless ? 612 616 USE ice 613 617 … … 618 622 ! agrif_declare_variable(position,1st point index,--,--,dimensions,name) 619 623 !------------------------------------------------------------------------------------- 620 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/), & 621 & (/jpi,jpj,jpl,jpl*(5+nlay_s+nlay_i)/), tra_ice_id ) 622 CALL agrif_declare_variable((/1,2/) ,(/2,3/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,u_ice_id ) 623 CALL agrif_declare_variable((/2,1/) ,(/3,2/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,v_ice_id ) 624 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpl*(5+nlay_s+nlay_i)/),tra_ice_id ) 625 CALL agrif_declare_variable((/1,2/) ,(/2,3/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_ice_id ) 626 CALL agrif_declare_variable((/2,1/) ,(/3,2/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_ice_id ) 624 627 625 628 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r6994 r7060 118 118 IF( nn_timing == 1 ) CALL timing_start('sbc_ice_lim') 119 119 120 ! clem: it is important to initialize agrif_lim3 variables here and not in sbc_lim_init 121 # if defined key_agrif 122 IF( kt == nit000 ) THEN 123 IF( .NOT. Agrif_Root() ) CALL Agrif_InitValues_cont_lim3 124 ENDIF 125 # endif 126 120 127 !-----------------------! 121 128 ! --- Ice time step --- ! … … 189 196 ! 190 197 ENDIF 198 191 199 ! --- 192 200 #if defined key_agrif … … 314 322 IF( ierr /= 0 ) CALL ctl_stop('STOP', 'sbc_lim_init : unable to allocate ice arrays') 315 323 ! 316 ! ! adequation jpk versus ice/snow layers/categories317 IF( jpl > jpk .OR. (nlay_i+1) > jpk .OR. nlay_s > jpk ) &318 & CALL ctl_stop( 'STOP', &319 & 'sbc_lim_init: the 3rd dimension of workspace arrays is too small.', &320 & 'use more ocean levels or less ice/snow layers/categories.' )321 !322 324 CALL lim_dyn_init ! set ice dynamics parameters 323 325 ! … … 364 366 IF( nstock == 0 ) nstock = nlast + 1 365 367 ! 366 # if defined key_agrif367 IF( .NOT. Agrif_Root() ) CALL Agrif_InitValues_cont_lim3368 # endif369 368 ! 370 369 END SUBROUTINE sbc_lim_init -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r6459 r7060 111 111 112 112 ! ! overwrite namelist parameter using CPP key information 113 IF( Agrif_Root() ) THEN ! AGRIF zoom 114 IF( lk_lim2 ) nn_ice = 2 115 IF( lk_lim3 ) nn_ice = 3 116 IF( lk_cice ) nn_ice = 4 117 ENDIF 118 IF( cp_cfg == 'gyre' ) THEN ! GYRE configuration 119 ln_ana = .TRUE. 120 nn_ice = 0 121 ENDIF 122 113 #if defined key_agrif 114 IF( Agrif_Root() ) THEN ! AGRIF zoom (cf r1242: possibility to run without ice in fine grid) 115 IF( lk_lim2 ) nn_ice = 2 116 IF( lk_lim3 ) nn_ice = 3 117 IF( lk_cice ) nn_ice = 4 118 ENDIF 119 #else 120 IF( lk_lim2 ) nn_ice = 2 121 IF( lk_lim3 ) nn_ice = 3 122 IF( lk_cice ) nn_ice = 4 123 #endif 124 125 IF( cp_cfg == 'gyre' ) ln_ana = .TRUE. ! GYRE configuration 126 123 127 IF(lwp) THEN ! Control print 124 128 WRITE(numout,*) ' Namelist namsbc (partly overwritten with CPP key setting)' … … 195 199 196 200 ! ! restartability 197 IF( ( nn_ice == 2 .OR. nn_ice ==3 ) .AND. .NOT.( ln_blk_clio .OR. ln_blk_core .OR. ln_cpl ) ) &198 & CALL ctl_stop( 'LIM sea-ice model requires a bulk formulation or coupled configuration' )199 201 IF( nn_ice == 4 .AND. .NOT.( ln_blk_core .OR. ln_cpl ) ) & 200 202 & CALL ctl_stop( 'CICE sea-ice model requires ln_blk_core or ln_cpl' ) … … 303 305 ! 304 306 IF( nn_ice == 3 ) CALL sbc_lim_init ! LIM3 initialisation 305 307 ! 306 308 IF( nn_ice == 4 ) CALL cice_sbc_init( nsbc ) ! CICE initialisation 307 309 -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r6584 r7060 111 111 # endif 112 112 # if defined key_lim2 113 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM2 114 # endif 115 # if defined key_lim3 116 CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 113 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM 117 114 # endif 118 115 #endif -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/step.F90
r5510 r7060 43 43 #endif 44 44 45 #if defined key_agrif 46 USE agrif_oce, ONLY: lk_agrif_debug !clem 47 #endif 48 45 49 IMPLICIT NONE 46 50 PRIVATE … … 78 82 #if defined key_agrif 79 83 kstp = nit000 + Agrif_Nb_Step() 84 IF ( lk_agrif_debug ) THEN 85 IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 86 IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 87 ENDIF 88 89 IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 90 80 91 # if defined key_iomput 81 92 IF( Agrif_Nbstepint() == 0 ) CALL iom_swap( cxios_context ) 82 93 # endif 83 94 #endif 95 indic = 0 ! although indic is not changed in stp_ctl 96 ! need to keep the same interface 84 97 IF( kstp == nit000 ) CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 85 98 IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) … … 98 111 CALL dia_wri( kstp ) ! ocean model: outputs 99 112 100 indic = 0 ! although indic is not changed in stp_ctl 101 ! need to keep the same interface 113 #if defined key_agrif 114 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 115 ! AGRIF 116 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 117 CALL Agrif_Integrate_ChildGrids( stp ) 118 #endif 119 120 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 121 ! Control 122 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 102 123 CALL stp_ctl( kstp, indic ) 124 IF( indic < 0 ) THEN 125 CALL ctl_stop( 'step: indic < 0' ) 126 CALL dia_wri_state( 'output.abort', kstp ) 127 ENDIF 128 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file (clem: not sure...) 129 103 130 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 104 131 ! Coupled mode
Note: See TracChangeset
for help on using the changeset viewer.