Changeset 7954 for branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC
- Timestamp:
- 2017-04-24T09:19:00+02:00 (7 years ago)
- Location:
- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
r7753 r7954 5 5 !! layer scheme 6 6 !!====================================================================== 7 !!==============================================================================8 7 !! History : OPA ! 1996-06 (L. Mortier) Original code 9 8 !! 8.0 ! 1997-11 (G. Madec) Optimization … … 13 12 !! - ! 2010-04 (G. Madec) Campin & Goosse advective bbl 14 13 !! - ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 14 !! 4.0 ! 2017-04 (G. Madec) ln_trabbl namelist variable instead of a CPP key 15 15 !!---------------------------------------------------------------------- 16 #if defined key_top && defined key_trabbl16 #if defined key_top 17 17 !!---------------------------------------------------------------------- 18 !! 'key_t rabbl diffusive or/and adevective bottom boundary layer18 !! 'key_top' TOP models 19 19 !!---------------------------------------------------------------------- 20 !! trc_bbl 20 !! trc_bbl : update the tracer trends due to the bottom boundary layer (advective and/or diffusive) 21 21 !!---------------------------------------------------------------------- 22 USE oce_trc 23 USE trc 24 USE tr abbl !25 USE prtctl_trc ! Print control for debbuging26 USE tr d_oce27 USE trdtra22 USE oce_trc ! ocean dynamics and active tracers variables 23 USE trc ! ocean passive tracers variables 24 USE trd_oce ! trends: ocean variables 25 USE trdtra ! tracer trends 26 USE trabbl ! bottom boundary layer 27 USE prtctl_trc ! Print control for debbuging 28 28 29 PUBLIC trc_bbl ! routine called by step.F9029 PUBLIC trc_bbl ! routine called by trctrp.F90 30 30 31 31 !!---------------------------------------------------------------------- 32 !! NEMO/TOP 3.3 , NEMO Consortium (2010)32 !! NEMO/TOP 4.0 , NEMO Consortium (2017) 33 33 !! $Id$ 34 34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 35 35 !!---------------------------------------------------------------------- 36 37 36 CONTAINS 38 39 37 40 38 SUBROUTINE trc_bbl( kt ) … … 98 96 END SUBROUTINE trc_bbl 99 97 100 #else101 !!----------------------------------------------------------------------102 !! Dummy module : No bottom boundary layer scheme103 !!----------------------------------------------------------------------104 CONTAINS105 SUBROUTINE trc_bbl( kt ) ! Empty routine106 WRITE(*,*) 'tra_bbl: You should not have seen this print! error?', kt107 END SUBROUTINE trc_bbl108 98 #endif 109 99 -
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r7646 r7954 15 15 USE oce_trc ! ocean dynamics and active tracers variables 16 16 USE trc ! ocean passive tracers variables 17 USE trabbl ! bottom boundary layer (trc_bbl routine)18 17 USE trcbbl ! bottom boundary layer (trc_bbl routine) 19 18 USE trcdmp ! internal damping (trc_dmp routine) … … 63 62 ! 64 63 CALL trc_sbc ( kt ) ! surface boundary condition 65 IF( l k_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme64 IF( ln_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme 66 65 IF( ln_trcdmp ) CALL trc_dmp ( kt ) ! internal damping trends 67 66 IF( ln_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends -
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/trc.F90
r7953 r7954 17 17 PUBLIC trc_alloc ! called by nemogcm.F90 18 18 19 !! parameters for the control of passive tracers 20 !! --------------------------------------------- 21 INTEGER, PUBLIC :: numnat_ref = -1 !: logical unit for the reference passive tracer namelist_top_ref 22 INTEGER, PUBLIC :: numnat_cfg = -1 !: logical unit for the reference passive tracer namelist_top_cfg 23 INTEGER, PUBLIC :: numont = -1 !: logical unit for the reference passive tracer namelist output output.namelist.top 24 INTEGER, PUBLIC :: numtrc_ref = -1 !: logical unit for the reference passive tracer namelist_top_ref 25 INTEGER, PUBLIC :: numtrc_cfg = -1 !: logical unit for the reference passive tracer namelist_top_cfg 26 INTEGER, PUBLIC :: numonr = -1 !: logical unit for the reference passive tracer namelist output output.namelist.top 27 INTEGER, PUBLIC :: numstr !: logical unit for tracer statistics 28 INTEGER, PUBLIC :: numrtr !: logical unit for trc restart (read ) 29 INTEGER, PUBLIC :: numrtw !: logical unit for trc restart ( write ) 19 ! !!- logical units of passive tracers 20 INTEGER, PUBLIC :: numnat_ref = -1 !: reference passive tracer namelist_top_ref 21 INTEGER, PUBLIC :: numnat_cfg = -1 !: reference passive tracer namelist_top_cfg 22 INTEGER, PUBLIC :: numont = -1 !: reference passive tracer namelist output output.namelist.top 23 INTEGER, PUBLIC :: numtrc_ref = -1 !: reference passive tracer namelist_top_ref 24 INTEGER, PUBLIC :: numtrc_cfg = -1 !: reference passive tracer namelist_top_cfg 25 INTEGER, PUBLIC :: numonr = -1 !: reference passive tracer namelist output output.namelist.top 26 INTEGER, PUBLIC :: numstr !: tracer statistics 27 INTEGER, PUBLIC :: numrtr !: trc restart (read ) 28 INTEGER, PUBLIC :: numrtw !: trc restart ( write ) 30 29 31 30 !! passive tracers fields (before,now,after) 32 31 !! -------------------------------------------------- 33 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) 34 REAL(wp), PUBLIC 35 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) 36 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) 38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) 40 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) 32 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trai !: initial total tracer 33 REAL(wp), PUBLIC :: areatot !: total volume 34 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: cvol !: volume correction -degrad option- 35 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trn !: tracer concentration for now time step 36 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tra !: tracer concentration for next time step 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trb !: tracer concentration for before time step 38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: sbc_trc_b !: Before sbc fluxes for tracers 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: sbc_trc !: Now sbc fluxes for tracers 41 40 42 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) 43 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) 44 INTEGER , PUBLIC 41 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: trc_i !: prescribed tracer concentration in sea ice for SBC 42 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: trc_o !: prescribed tracer concentration in ocean for SBC 43 INTEGER , PUBLIC :: nn_ice_tr !: handling of sea ice tracers 45 44 46 45 !! interpolated gradient 47 46 !!-------------------------------------------------- 48 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) 49 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) 50 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) 51 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) 52 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) 47 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtru !: hor. gradient at u-points at bottom ocean level 48 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtrv !: hor. gradient at v-points at bottom ocean level 49 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtrui !: hor. gradient at u-points at top ocean level 50 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtrvi !: hor. gradient at v-points at top ocean level 51 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_mean !: daily mean qsr 53 52 54 53 !! passive tracers (input and output) 55 54 !! ------------------------------------------ 56 LOGICAL , PUBLIC :: ln_rsttr!: boolean term for restart i/o for passive tracers (namelist)57 LOGICAL , PUBLIC :: lrst_trc!: logical to control the trc restart write58 INTEGER , PUBLIC :: nn_writetrc!: time step frequency for concentration outputs (namelist)59 INTEGER , PUBLIC :: nutwrs!: output FILE for passive tracers restart60 INTEGER , PUBLIC :: nutrst!: logical unit for restart FILE for passive tracers61 INTEGER , PUBLIC :: nn_rsttr!: control of the time step ( 0 or 1 ) for pass. tr.62 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_in!: suffix of pass. tracer restart name (input)63 CHARACTER(len = 256), PUBLIC :: cn_trcrst_indir!: restart input directory64 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out!: suffix of pass. tracer restart name (output)65 CHARACTER(len = 256), PUBLIC :: cn_trcrst_outdir!: restart output directory66 REAL(wp) , PUBLIC :: rdttrc!: passive tracer time step67 REAL(wp) , PUBLIC :: r2dttrc!: = 2*rdttrc except at nit000 (=rdttrc) if neuler=068 LOGICAL , PUBLIC :: ln_top_euler!: boolean term for euler integration69 LOGICAL , PUBLIC :: ln_trcdta!: Read inputs data from files70 LOGICAL , PUBLIC :: ln_trcdmp!: internal damping flag71 LOGICAL , PUBLIC :: ln_trcdmp_clo!: internal damping flag on closed seas72 INTEGER , PUBLIC :: nittrc000!: first time step of passive tracers model73 LOGICAL , PUBLIC :: l_trcdm2dc!: Diurnal cycle for TOP55 LOGICAL , PUBLIC :: ln_rsttr !: boolean term for restart i/o for passive tracers (namelist) 56 LOGICAL , PUBLIC :: lrst_trc !: logical to control the trc restart write 57 INTEGER , PUBLIC :: nn_writetrc !: time step frequency for concentration outputs (namelist) 58 INTEGER , PUBLIC :: nutwrs !: output FILE for passive tracers restart 59 INTEGER , PUBLIC :: nutrst !: logical unit for restart FILE for passive tracers 60 INTEGER , PUBLIC :: nn_rsttr !: control of the time step ( 0 or 1 ) for pass. tr. 61 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_in !: suffix of pass. tracer restart name (input) 62 CHARACTER(len = 256), PUBLIC :: cn_trcrst_indir !: restart input directory 63 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out !: suffix of pass. tracer restart name (output) 64 CHARACTER(len = 256), PUBLIC :: cn_trcrst_outdir !: restart output directory 65 REAL(wp) , PUBLIC :: rdttrc !: passive tracer time step 66 REAL(wp) , PUBLIC :: r2dttrc !: = 2*rdttrc except at nit000 (=rdttrc) if neuler=0 67 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration 68 LOGICAL , PUBLIC :: ln_trcdta !: Read inputs data from files 69 LOGICAL , PUBLIC :: ln_trcdmp !: internal damping flag 70 LOGICAL , PUBLIC :: ln_trcdmp_clo !: internal damping flag on closed seas 71 INTEGER , PUBLIC :: nittrc000 !: first time step of passive tracers model 72 LOGICAL , PUBLIC :: l_trcdm2dc !: Diurnal cycle for TOP 74 73 75 74 !! Information for the ice module for tracers … … 80 79 CHARACTER(len=2) :: ctrc_o ! choice of ocean trc cc 81 80 END TYPE 82 83 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_ratio !ice-ocean tracer ratio84 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_prescr !prescribed ice trc cc85 CHARACTER(len=2), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_o !choice of ocean tracer cc81 ! 82 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_ratio !: ice-ocean tracer ratio 83 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_prescr !: prescribed ice trc cc 84 CHARACTER(len=2), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_o !: choice of ocean tracer cc 86 85 87 86 88 87 !! information for outputs 89 88 !! -------------------------------------------------- 90 TYPE, PUBLIC :: PTRACER 89 TYPE, PUBLIC :: PTRACER !: Passive tracer type 91 90 CHARACTER(len = 20) :: clsname !: short name 92 91 CHARACTER(len = 80) :: cllname !: long name … … 97 96 LOGICAL :: llobc !: read in a file or not 98 97 END TYPE PTRACER 99 100 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcnm 101 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln 102 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcun 103 104 TYPE, PUBLIC :: DIAG 98 ! 99 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcnm !: tracer name 100 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln !: trccer field long name 101 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcun !: tracer unit 102 ! 103 TYPE, PUBLIC :: DIAG !: passive trcacer ddditional diagnostic type 105 104 CHARACTER(len = 20) :: sname !: short name 106 105 CHARACTER(len = 80) :: lname !: long name 107 106 CHARACTER(len = 20) :: units !: unit 108 107 END TYPE DIAG 109 108 ! 110 109 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc3d !: 3D diagnostics for tracers 111 110 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc2d !: 2D diagnostics for tracers … … 113 112 !! information for inputs 114 113 !! -------------------------------------------------- 115 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file116 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_obc !: Use open boundary condition data117 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_sbc !: Use surface boundary condition data118 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_cbc !: Use coastal boundary condition data119 LOGICAL , PUBLIC :: ln_rnf_ctl !: remove runoff dilution on tracers120 REAL(wp), PUBLIC :: rn_bc_time !: Time scaling factor for SBC and CBC data (seconds in a day)114 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file 115 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_obc !: Use open boundary condition data 116 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_sbc !: Use surface boundary condition data 117 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_cbc !: Use coastal boundary condition data 118 LOGICAL , PUBLIC :: ln_rnf_ctl !: remove runoff dilution on tracers 119 REAL(wp), PUBLIC :: rn_bc_time !: Time scaling factor for SBC and CBC data (seconds in a day) 121 120 122 123 !! variables to average over physics over passive tracer sub-steps.124 !! ----------------------------------------------------------------125 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: un_tm !: i-horizontal velocity average [m/s]126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: vn_tm !: j-horizontal velocity average [m/s]127 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsn_tm !: t/s average [m/s]128 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: avs_tm !: vertical diffusivity coeff. at w-point [m2/s]129 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rhop_tm !:130 #if defined key_trabbl131 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahu_bbl_tm !: u-, w-points132 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahv_bbl_tm !: j-direction slope at u-, w-points133 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utr_bbl_tm !: j-direction slope at u-, w-points134 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtr_bbl_tm !: j-direction slope at u-, w-points135 #endif136 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshn_tm !: average ssh for the now step [m]137 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshb_hold !:hold sshb from the beginning of each sub-stepping[m]138 139 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf_tm !: river runoff140 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_rnf_tm !: depth in metres to the bottom of the relevant grid box141 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmld_tm !: mixed layer depth average [m]142 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_i_tm !: average ice fraction [m/s]143 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tm !: freshwater budget: volume flux [Kg/m2/s]144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx_tm !: freshwater budget: freezing/melting [Kg/m2/s]145 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_b_hold !: hold emp from the beginning of each sub-stepping[m]146 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_tm !: solar radiation average [m]147 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm_tm !: 10m wind average [m]148 !149 150 ! Temporary physical arrays for sub_stepping151 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsn_temp152 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: un_temp,vn_temp,wn_temp !: hold current values of avt, un, vn, wn153 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: avs_temp, rhop_temp !: hold current values of avt, un, vn, wn154 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshn_temp, sshb_temp, ssha_temp, rnf_temp,h_rnf_temp155 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivn_temp, rotn_temp156 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivb_temp, rotb_temp157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmld_temp, qsr_temp, fr_i_temp,wndm_temp158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_temp, fmmflx_temp, emp_b_temp159 !160 #if defined key_trabbl161 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahu_bbl_temp, ahv_bbl_temp, utr_bbl_temp, vtr_bbl_temp !: hold current values162 #endif163 121 ! 164 122 ! -
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r7812 r7954 8 8 #if defined key_top 9 9 !!---------------------------------------------------------------------- 10 !! trc_stp : passive tracer system time-stepping11 !!---------------------------------------------------------------------- 12 USE oce_trc 10 !! trc_stp : passive tracer system time-stepping 11 !!---------------------------------------------------------------------- 12 USE oce_trc ! ocean dynamics and active tracers variables 13 13 USE sbc_oce 14 14 USE trc 15 USE trctrp 16 USE trcsms 15 USE trctrp ! passive tracers transport 16 USE trcsms ! passive tracers sources and sinks 17 17 USE trcwri 18 18 USE trcrst 19 USE trcsub ! 19 20 USE trdtrc_oce 20 21 USE trdmxl_trc 21 USE prtctl_trc ! Print control for debbuging22 USE iom23 USE i n_out_manager24 USE trcsub22 ! 23 USE prtctl_trc ! Print control for debbuging 24 USE iom ! 25 USE in_out_manager ! 25 26 26 27 IMPLICIT NONE … … 29 30 PUBLIC trc_stp ! called by step 30 31 31 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: qsr_arr ! save qsr during TOP time-step32 REAL(wp) :: rdt_sampl33 INTEGER :: nb_rec_per_day, ktdcy34 REAL(wp) :: rsecfst, rseclast35 LOGICAL :: llnew32 LOGICAL :: llnew ! ??? 33 REAL(wp) :: rdt_sampl ! ??? 34 INTEGER :: nb_rec_per_day, ktdcy ! ??? 35 REAL(wp) :: rsecfst, rseclast ! ??? 36 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: qsr_arr ! save qsr during TOP time-step 36 37 37 38 !!---------------------------------------------------------------------- … … 46 47 !! *** ROUTINE trc_stp *** 47 48 !! 48 !! ** Purpose : Time loop of opa for passive tracer49 !! ** Purpose : Time loop of opa for passive tracer 49 50 !! 50 !! ** Method : 51 !! Compute the passive tracers trends 52 !! Update the passive tracers 51 !! ** Method : Compute the passive tracers trends 52 !! Update the passive tracers 53 53 !!------------------------------------------------------------------- 54 INTEGER, INTENT( in ) :: kt! ocean time-step index55 INTEGER :: jk, jn ! dummy loop indices56 REAL(wp) :: ztrai57 CHARACTER (len=25) :: charout58 54 INTEGER, INTENT( in ) :: kt ! ocean time-step index 55 ! 56 INTEGER :: jk, jn ! dummy loop indices 57 REAL(wp):: ztrai ! local scalar 58 CHARACTER (len=25) :: charout ! 59 59 !!------------------------------------------------------------------- 60 60 ! … … 115 115 ! 116 116 END SUBROUTINE trc_stp 117 117 118 118 119 SUBROUTINE trc_mean_qsr( kt ) … … 128 129 !! In coupled mode, the sampling is done at every coupling frequency 129 130 !!---------------------------------------------------------------------- 130 INTEGER, INTENT(in) :: kt 131 INTEGER :: jn 132 REAL(wp) :: zkt, zrec 133 CHARACTER(len=1) :: cl1 ! 1 character 134 CHARACTER(len=2) :: cl2 ! 2 characters 135 131 INTEGER, INTENT( in ) :: kt ! ocean time-step index 132 ! 133 INTEGER :: jn ! dummy loop indices 134 REAL(wp) :: zkt, zrec ! local scalars 135 CHARACTER(len=1) :: cl1 ! 1 character 136 CHARACTER(len=2) :: cl2 ! 2 characters 137 !!---------------------------------------------------------------------- 138 ! 136 139 IF( kt == nittrc000 ) THEN 137 140 IF( ln_cpl ) THEN … … 143 146 ENDIF 144 147 ! 145 IF( lwp) THEN148 IF(lwp) THEN 146 149 WRITE(numout,*) 147 150 WRITE(numout,*) ' Sampling frequency dt = ', rdt_sampl, 's',' Number of sampling per day nrec = ', nb_rec_per_day … … 171 174 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_arr_'//cl2, qsr_arr(:,:,jn) ) ! A mean of qsr 172 175 ENDIF 173 END DO176 END DO 174 177 ELSE 175 178 DO jn = 1, nb_rec_per_day … … 184 187 DO jn = 1, nb_rec_per_day 185 188 qsr_arr(:,:,jn) = qsr_mean(:,:) 186 END DO189 END DO 187 190 ENDIF 188 191 ! … … 220 223 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_arr_'//cl2, qsr_arr(:,:,jn) ) 221 224 ENDIF 222 END DO225 END DO 223 226 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_mean', qsr_mean(:,:) ) 224 227 ENDIF -
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
r7953 r7954 2 2 !!====================================================================== 3 3 !! *** MODULE trcsubstp *** 4 !! TOP : Averages physics variables for TOP substepping.4 !! TOP : Averages physics variables for TOP substepping. 5 5 !!====================================================================== 6 6 !! History : 1.0 ! 2011-10 (K. Edwards) Original … … 8 8 #if defined key_top 9 9 !!---------------------------------------------------------------------- 10 !! trc_sub : passive tracer system sub-stepping10 !! trc_sub : passive tracer system sub-stepping 11 11 !!---------------------------------------------------------------------- 12 USE oce_trc 12 USE oce_trc ! ocean dynamics and active tracers variables 13 13 USE trc 14 USE prtctl_trc ! Print control for debbuging 15 USE iom 16 USE in_out_manager 17 USE lbclnk 18 USE trabbl 14 USE trabbl ! bottom boundary layer 19 15 USE zdf_oce 20 16 USE domvvl 21 USE divhor ! horizontal divergence (div_hor routine) 22 USE sbcrnf , ONLY: h_rnf, nk_rnf ! River runoff 23 USE bdy_oce , ONLY: ln_bdy, bdytmask ! BDY 17 USE divhor ! horizontal divergence 18 USE sbcrnf , ONLY: h_rnf, nk_rnf ! River runoff 19 USE bdy_oce , ONLY: ln_bdy, bdytmask ! BDY 20 ! 21 USE prtctl_trc ! Print control for debbuging 22 USE in_out_manager ! 23 USE iom 24 USE lbclnk 24 25 #if defined key_agrif 25 26 USE agrif_opa_update … … 29 30 IMPLICIT NONE 30 31 31 PUBLIC trc_sub_stp ! called by trc_stp 32 PUBLIC trc_sub_ini ! called by trc_ini to initialize substepping arrays. 33 PUBLIC trc_sub_reset ! called by trc_stp to reset physics variables 34 PUBLIC trc_sub_ssh ! called by trc_stp to reset physics variables 35 36 REAL(wp) :: r1_ndttrc ! 1 / nn_dttrc 37 REAL(wp) :: r1_ndttrcp1 ! 1 / (nn_dttrc+1) 38 39 ! !* iso-neutral slopes (if l_ldfslp=T) 40 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uslp_temp, vslp_temp, wslpi_temp, wslpj_temp !: hold current values 41 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uslp_tm , vslp_tm , wslpi_tm , wslpj_tm !: time mean 32 PUBLIC trc_sub_stp ! called by trc_stp 33 PUBLIC trc_sub_ini ! called by trc_ini to initialize substepping arrays. 34 PUBLIC trc_sub_reset ! called by trc_stp to reset physics variables 35 PUBLIC trc_sub_ssh ! called by trc_stp to reset physics variables 36 37 REAL(wp) :: r1_ndttrc ! = 1 / nn_dttrc 38 REAL(wp) :: r1_ndttrcp1 ! = 1 / (nn_dttrc+1) 39 40 41 !! averaged and temporary saved variables (needed when a larger passive tracer time-step is used) 42 !! ---------------------------------------------------------------- 43 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: un_tm , un_temp !: i-horizontal velocity average [m/s] 44 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: vn_tm , vn_temp !: j-horizontal velocity average [m/s] 45 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wn_temp !: hold current values of avt, un, vn, wn 46 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsn_tm , tsn_temp !: t/s average [m/s] 47 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: avs_tm , avs_temp !: vertical diffusivity coeff. at w-point [m2/s] 48 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rhop_tm , rhop_temp !: 49 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshn_tm , sshn_temp !: average ssh for the now step [m] 50 51 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf_tm , rnf_temp !: river runoff 52 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_rnf_tm , h_rnf_temp !: depth in metres to the bottom of the relevant grid box 53 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmld_tm , hmld_temp !: mixed layer depth average [m] 54 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_i_tm , fr_i_temp !: average ice fraction [m/s] 55 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tm , emp_temp !: freshwater budget: volume flux [Kg/m2/s] 56 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx_tm , fmmflx_temp !: freshwater budget: freezing/melting [Kg/m2/s] 57 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_b_hold, emp_b_temp !: hold emp from the beginning of each sub-stepping[m] 58 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_tm , qsr_temp !: solar radiation average [m] 59 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm_tm , wndm_temp !: 10m wind average [m] 60 ! 61 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshb_hold !:hold sshb from the beginning of each sub-stepping[m] 62 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sshb_temp, ssha_temp 63 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivn_temp, rotn_temp 64 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivb_temp, rotb_temp 65 ! 66 ! !!- bottom boundary layer param (ln_trabbl=T) 67 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahu_bbl_tm, ahu_bbl_temp ! BBL diffusive i-coef. 68 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahv_bbl_tm, ahv_bbl_temp ! BBL diffusive j-coef. 69 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: utr_bbl_tm, utr_bbl_temp ! BBL u-advection 70 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtr_bbl_tm, vtr_bbl_temp ! BBL v-advection 71 72 ! !!- iso-neutral slopes (if l_ldfslp=T) 73 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uslp_temp, vslp_temp, wslpi_temp, wslpj_temp !: hold current values 74 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uslp_tm , vslp_tm , wslpi_tm , wslpj_tm !: time mean 75 42 76 43 77 !!---------------------------------------------------------------------- 44 !! NEMO/TOP 3.3 , NEMO Consortium (2010)78 !! NEMO/TOP 4.0 , NEMO Consortium (2017) 45 79 !! $Id$ 46 80 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 57 91 !! on TOP steps, calculate averages. 58 92 !!------------------------------------------------------------------- 59 INTEGER, INTENT( in ) :: kt ! ocean time-step index 60 INTEGER :: ji,jj,jk ! dummy loop indices 61 REAL(wp) :: z1_ne3t, z1_ne3u, z1_ne3v, z1_ne3w 93 INTEGER, INTENT( in ) :: kt ! ocean time-step index 94 ! 95 INTEGER :: ji, jj, jk ! dummy loop indices 96 REAL(wp):: z1_ne3t, z1_ne3u, z1_ne3v, z1_ne3w ! local scalars 62 97 !!------------------------------------------------------------------- 63 98 ! … … 74 109 r1_ndttrc = 1._wp / REAL( nn_dttrc , wp ) 75 110 r1_ndttrcp1 = 1._wp / REAL( nn_dttrc + 1, wp ) 76 !77 111 ENDIF 78 112 79 80 81 82 83 84 85 86 113 IF( MOD( kt , nn_dttrc ) /= 0 ) THEN 114 ! 115 un_tm (:,:,:) = un_tm (:,:,:) + un (:,:,:) * e3u_n(:,:,:) 116 vn_tm (:,:,:) = vn_tm (:,:,:) + vn (:,:,:) * e3v_n(:,:,:) 117 tsn_tm (:,:,:,jp_tem) = tsn_tm (:,:,:,jp_tem) + tsn (:,:,:,jp_tem) * e3t_n(:,:,:) 118 tsn_tm (:,:,:,jp_sal) = tsn_tm (:,:,:,jp_sal) + tsn (:,:,:,jp_sal) * e3t_n(:,:,:) 119 rhop_tm (:,:,:) = rhop_tm (:,:,:) + rhop (:,:,:) * e3t_n(:,:,:) 120 avs_tm (:,:,:) = avs_tm (:,:,:) + avs (:,:,:) * e3w_n(:,:,:) 87 121 IF( l_ldfslp ) THEN 88 122 uslp_tm (:,:,:) = uslp_tm (:,:,:) + uslp (:,:,:) … … 91 125 wslpj_tm(:,:,:) = wslpj_tm(:,:,:) + wslpj(:,:,:) 92 126 ENDIF 93 # if defined key_trabbl 94 IF( nn_bbl_ldf == 1 ) THEN95 ahu_bbl_tm(:,:) = ahu_bbl_tm(:,:) + ahu_bbl(:,:)96 ahv_bbl_tm(:,:) = ahv_bbl_tm(:,:) + ahv_bbl(:,:)97 ENDIF98 IF( nn_bbl_adv == 1 ) THEN99 utr_bbl_tm(:,:) = utr_bbl_tm(:,:) + utr_bbl(:,:)100 vtr_bbl_tm(:,:) = vtr_bbl_tm(:,:) + vtr_bbl(:,:)101 ENDIF102 # endif 103 104 105 106 107 108 109 110 111 112 113 127 IF( ln_trabbl ) THEN 128 IF( nn_bbl_ldf == 1 ) THEN 129 ahu_bbl_tm(:,:) = ahu_bbl_tm(:,:) + ahu_bbl(:,:) 130 ahv_bbl_tm(:,:) = ahv_bbl_tm(:,:) + ahv_bbl(:,:) 131 ENDIF 132 IF( nn_bbl_adv == 1 ) THEN 133 utr_bbl_tm(:,:) = utr_bbl_tm(:,:) + utr_bbl(:,:) 134 vtr_bbl_tm(:,:) = vtr_bbl_tm(:,:) + vtr_bbl(:,:) 135 ENDIF 136 ENDIF 137 ! 138 sshn_tm (:,:) = sshn_tm (:,:) + sshn (:,:) 139 rnf_tm (:,:) = rnf_tm (:,:) + rnf (:,:) 140 h_rnf_tm (:,:) = h_rnf_tm (:,:) + h_rnf (:,:) 141 hmld_tm (:,:) = hmld_tm (:,:) + hmld (:,:) 142 fr_i_tm (:,:) = fr_i_tm (:,:) + fr_i (:,:) 143 emp_tm (:,:) = emp_tm (:,:) + emp (:,:) 144 fmmflx_tm(:,:) = fmmflx_tm(:,:) + fmmflx(:,:) 145 qsr_tm (:,:) = qsr_tm (:,:) + qsr (:,:) 146 wndm_tm (:,:) = wndm_tm (:,:) + wndm (:,:) 147 ! 114 148 ELSE ! It is time to substep 115 ! 1. set temporary arrays to hold physics variables149 ! 1. set temporary arrays to hold physics/dynamical variables 116 150 un_temp (:,:,:) = un (:,:,:) 117 151 vn_temp (:,:,:) = vn (:,:,:) … … 124 158 vslp_temp (:,:,:) = vslp (:,:,:) ; wslpj_temp (:,:,:) = wslpj (:,:,:) 125 159 ENDIF 126 # if defined key_trabbl 127 IF( nn_bbl_ldf == 1 ) THEN128 ahu_bbl_temp(:,:) = ahu_bbl(:,:)129 ahv_bbl_temp(:,:) = ahv_bbl(:,:)130 ENDIF131 IF( nn_bbl_adv == 1 ) THEN132 utr_bbl_temp(:,:) = utr_bbl(:,:)133 vtr_bbl_temp(:,:) = vtr_bbl(:,:)134 ENDIF135 # endif 160 IF( ln_trabbl ) THEN 161 IF( nn_bbl_ldf == 1 ) THEN 162 ahu_bbl_temp(:,:) = ahu_bbl(:,:) 163 ahv_bbl_temp(:,:) = ahv_bbl(:,:) 164 ENDIF 165 IF( nn_bbl_adv == 1 ) THEN 166 utr_bbl_temp(:,:) = utr_bbl(:,:) 167 vtr_bbl_temp(:,:) = vtr_bbl(:,:) 168 ENDIF 169 ENDIF 136 170 sshn_temp (:,:) = sshn (:,:) 137 171 sshb_temp (:,:) = sshb (:,:) … … 162 196 wslpj_tm (:,:,:) = wslpj_tm(:,:,:) + wslpj(:,:,:) 163 197 ENDIF 164 # if defined key_trabbl 165 IF( nn_bbl_ldf == 1 ) THEN166 ahu_bbl_tm(:,:) = ahu_bbl_tm(:,:) + ahu_bbl(:,:)167 ahv_bbl_tm(:,:) = ahv_bbl_tm(:,:) + ahv_bbl(:,:)168 ENDIF169 IF( nn_bbl_adv == 1 ) THEN170 utr_bbl_tm(:,:) = utr_bbl_tm(:,:) + utr_bbl(:,:)171 vtr_bbl_tm(:,:) = vtr_bbl_tm(:,:) + vtr_bbl(:,:)172 ENDIF173 # endif 198 IF( ln_trabbl ) THEN 199 IF( nn_bbl_ldf == 1 ) THEN 200 ahu_bbl_tm(:,:) = ahu_bbl_tm(:,:) + ahu_bbl(:,:) 201 ahv_bbl_tm(:,:) = ahv_bbl_tm(:,:) + ahv_bbl(:,:) 202 ENDIF 203 IF( nn_bbl_adv == 1 ) THEN 204 utr_bbl_tm(:,:) = utr_bbl_tm(:,:) + utr_bbl(:,:) 205 vtr_bbl_tm(:,:) = vtr_bbl_tm(:,:) + vtr_bbl(:,:) 206 ENDIF 207 ENDIF 174 208 sshn_tm (:,:) = sshn_tm (:,:) + sshn (:,:) 175 209 rnf_tm (:,:) = rnf_tm (:,:) + rnf (:,:) … … 195 229 fmmflx(:,:) = fmmflx_tm (:,:) * r1_ndttrc 196 230 fr_i (:,:) = fr_i_tm (:,:) * r1_ndttrc 197 # if defined key_trabbl 198 IF( nn_bbl_ldf == 1 ) THEN199 ahu_bbl(:,:) = ahu_bbl_tm (:,:) * r1_ndttrc200 ahv_bbl(:,:) = ahv_bbl_tm (:,:) * r1_ndttrc201 ENDIF202 IF( nn_bbl_adv == 1 ) THEN203 utr_bbl(:,:) = utr_bbl_tm (:,:) * r1_ndttrc204 vtr_bbl(:,:) = vtr_bbl_tm (:,:) * r1_ndttrc205 ENDIF206 # endif 231 IF( ln_trabbl ) THEN 232 IF( nn_bbl_ldf == 1 ) THEN 233 ahu_bbl(:,:) = ahu_bbl_tm (:,:) * r1_ndttrc 234 ahv_bbl(:,:) = ahv_bbl_tm (:,:) * r1_ndttrc 235 ENDIF 236 IF( nn_bbl_adv == 1 ) THEN 237 utr_bbl(:,:) = utr_bbl_tm (:,:) * r1_ndttrc 238 vtr_bbl(:,:) = vtr_bbl_tm (:,:) * r1_ndttrc 239 ENDIF 240 ENDIF 207 241 ELSE 208 242 wndm (:,:) = wndm_tm (:,:) * r1_ndttrcp1 … … 211 245 fmmflx(:,:) = fmmflx_tm (:,:) * r1_ndttrcp1 212 246 fr_i (:,:) = fr_i_tm (:,:) * r1_ndttrcp1 213 # if defined key_trabbl 214 IF( nn_bbl_ldf == 1 ) THEN215 ahu_bbl(:,:) = ahu_bbl_tm (:,:) * r1_ndttrcp1216 ahv_bbl(:,:) = ahv_bbl_tm (:,:) * r1_ndttrcp1217 ENDIF218 IF( nn_bbl_adv == 1 ) THEN219 utr_bbl(:,:) = utr_bbl_tm (:,:) * r1_ndttrcp1220 vtr_bbl(:,:) = vtr_bbl_tm (:,:) * r1_ndttrcp1221 ENDIF222 # endif 247 IF( ln_trabbl ) THEN 248 IF( nn_bbl_ldf == 1 ) THEN 249 ahu_bbl(:,:) = ahu_bbl_tm (:,:) * r1_ndttrcp1 250 ahv_bbl(:,:) = ahv_bbl_tm (:,:) * r1_ndttrcp1 251 ENDIF 252 IF( nn_bbl_adv == 1 ) THEN 253 utr_bbl(:,:) = utr_bbl_tm (:,:) * r1_ndttrcp1 254 vtr_bbl(:,:) = vtr_bbl_tm (:,:) * r1_ndttrcp1 255 ENDIF 256 ENDIF 223 257 ENDIF 224 258 ! … … 298 332 299 333 ! Physics variables that are set after initialization: 300 fr_i_tm (:,:) = 0._wp301 emp_tm (:,:) = 0._wp334 fr_i_tm (:,:) = 0._wp 335 emp_tm (:,:) = 0._wp 302 336 fmmflx_tm(:,:) = 0._wp 303 qsr_tm (:,:) = 0._wp304 wndm_tm (:,:) = 0._wp305 # if defined key_trabbl 306 IF( nn_bbl_ldf == 1 ) THEN307 ahu_bbl_tm(:,:) = 0._wp308 ahv_bbl_tm(:,:) = 0._wp309 ENDIF310 IF( nn_bbl_adv == 1 ) THEN311 utr_bbl_tm(:,:) = 0._wp312 vtr_bbl_tm(:,:) = 0._wp313 ENDIF314 # endif 337 qsr_tm (:,:) = 0._wp 338 wndm_tm (:,:) = 0._wp 339 IF( ln_trabbl ) THEN 340 IF( nn_bbl_ldf == 1 ) THEN 341 ahu_bbl_tm(:,:) = 0._wp 342 ahv_bbl_tm(:,:) = 0._wp 343 ENDIF 344 IF( nn_bbl_adv == 1 ) THEN 345 utr_bbl_tm(:,:) = 0._wp 346 vtr_bbl_tm(:,:) = 0._wp 347 ENDIF 348 ENDIF 315 349 ! 316 350 IF( nn_timing == 1 ) CALL timing_stop('trc_sub_ini') … … 359 393 qsr (:,:) = qsr_temp (:,:) 360 394 wndm (:,:) = wndm_temp (:,:) 361 # if defined key_trabbl 362 IF( nn_bbl_ldf == 1 ) THEN363 ahu_bbl(:,:) = ahu_bbl_temp(:,:)364 ahv_bbl(:,:) = ahv_bbl_temp(:,:)365 ENDIF366 IF( nn_bbl_adv == 1 ) THEN367 utr_bbl(:,:) = utr_bbl_temp(:,:)368 vtr_bbl(:,:) = vtr_bbl_temp(:,:)369 ENDIF370 # endif 395 IF( ln_trabbl ) THEN 396 IF( nn_bbl_ldf == 1 ) THEN 397 ahu_bbl(:,:) = ahu_bbl_temp(:,:) 398 ahv_bbl(:,:) = ahv_bbl_temp(:,:) 399 ENDIF 400 IF( nn_bbl_adv == 1 ) THEN 401 utr_bbl(:,:) = utr_bbl_temp(:,:) 402 vtr_bbl(:,:) = vtr_bbl_temp(:,:) 403 ENDIF 404 ENDIF 371 405 ! 372 406 hdivn (:,:,:) = hdivn_temp (:,:,:) … … 397 431 qsr_tm (:,:) = qsr (:,:) 398 432 wndm_tm (:,:) = wndm (:,:) 399 # if defined key_trabbl 400 IF( nn_bbl_ldf == 1 ) THEN401 ahu_bbl_tm(:,:) = ahu_bbl(:,:)402 ahv_bbl_tm(:,:) = ahv_bbl(:,:)403 ENDIF404 IF( nn_bbl_adv == 1 ) THEN405 utr_bbl_tm(:,:) = utr_bbl(:,:)406 vtr_bbl_tm(:,:) = vtr_bbl(:,:)407 ENDIF408 # endif 433 IF( ln_trabbl ) THEN 434 IF( nn_bbl_ldf == 1 ) THEN 435 ahu_bbl_tm(:,:) = ahu_bbl(:,:) 436 ahv_bbl_tm(:,:) = ahv_bbl(:,:) 437 ENDIF 438 IF( nn_bbl_adv == 1 ) THEN 439 utr_bbl_tm(:,:) = utr_bbl(:,:) 440 vtr_bbl_tm(:,:) = vtr_bbl(:,:) 441 ENDIF 442 ENDIF 409 443 ! 410 444 ! … … 509 543 !!------------------------------------------------------------------- 510 544 USE lib_mpp, ONLY: ctl_warn 511 INTEGER :: ierr 512 !!------------------------------------------------------------------- 513 ! 514 ALLOCATE( un_temp(jpi,jpj,jpk) , vn_temp(jpi,jpj,jpk) , & 515 & wn_temp(jpi,jpj,jpk) , & 516 & rhop_temp(jpi,jpj,jpk) , rhop_tm(jpi,jpj,jpk) , & 517 & sshn_temp(jpi,jpj) , sshb_temp(jpi,jpj) , & 518 & ssha_temp(jpi,jpj) , & 519 #if defined key_trabbl 520 & ahu_bbl_temp(jpi,jpj) , ahv_bbl_temp(jpi,jpj), & 521 & utr_bbl_temp(jpi,jpj) , vtr_bbl_temp(jpi,jpj), & 522 #endif 523 & rnf_temp(jpi,jpj) , h_rnf_temp(jpi,jpj) , & 524 & tsn_temp(jpi,jpj,jpk,2) , emp_b_temp(jpi,jpj), & 525 & emp_temp(jpi,jpj) , fmmflx_temp(jpi,jpj), & 526 & hmld_temp(jpi,jpj) , qsr_temp(jpi,jpj) , & 527 & fr_i_temp(jpi,jpj) , fr_i_tm(jpi,jpj) , & 528 & wndm_temp(jpi,jpj) , wndm_tm(jpi,jpj) , & 529 & avs_tm(jpi,jpj,jpk) , avs_temp(jpi,jpj,jpk) , & 530 & hdivn_temp(jpi,jpj,jpk) , hdivb_temp(jpi,jpj,jpk), & 531 & un_tm(jpi,jpj,jpk) , vn_tm(jpi,jpj,jpk) , & 532 & sshn_tm(jpi,jpj) , sshb_hold(jpi,jpj) , & 533 & tsn_tm(jpi,jpj,jpk,2) , & 534 & emp_tm(jpi,jpj) , fmmflx_tm(jpi,jpj) , & 535 & emp_b_hold(jpi,jpj) , & 536 & hmld_tm(jpi,jpj) , qsr_tm(jpi,jpj) , & 537 #if defined key_trabbl 538 & ahu_bbl_tm(jpi,jpj) , ahv_bbl_tm(jpi,jpj), & 539 & utr_bbl_tm(jpi,jpj) , vtr_bbl_tm(jpi,jpj), & 540 #endif 541 & rnf_tm(jpi,jpj) , h_rnf_tm(jpi,jpj) , STAT=trc_sub_alloc ) 545 INTEGER :: ierr(3) 546 !!------------------------------------------------------------------- 547 ! 548 ierr(:) = 0 549 ! 550 ALLOCATE( un_temp(jpi,jpj,jpk) , vn_temp(jpi,jpj,jpk) , & 551 & wn_temp(jpi,jpj,jpk) , & 552 & rhop_temp(jpi,jpj,jpk) , rhop_tm(jpi,jpj,jpk) , & 553 & sshn_temp(jpi,jpj) , sshb_temp(jpi,jpj) , & 554 & ssha_temp(jpi,jpj) , & 555 & rnf_temp(jpi,jpj) , h_rnf_temp(jpi,jpj) , & 556 & tsn_temp(jpi,jpj,jpk,2) , emp_b_temp(jpi,jpj) , & 557 & emp_temp(jpi,jpj) , fmmflx_temp(jpi,jpj) , & 558 & hmld_temp(jpi,jpj) , qsr_temp(jpi,jpj) , & 559 & fr_i_temp(jpi,jpj) , fr_i_tm(jpi,jpj) , & 560 & wndm_temp(jpi,jpj) , wndm_tm(jpi,jpj) , & 561 & avs_tm(jpi,jpj,jpk) , avs_temp(jpi,jpj,jpk) , & 562 & hdivn_temp(jpi,jpj,jpk) , hdivb_temp(jpi,jpj,jpk), & 563 & un_tm(jpi,jpj,jpk) , vn_tm(jpi,jpj,jpk) , & 564 & sshn_tm(jpi,jpj) , sshb_hold(jpi,jpj) , & 565 & tsn_tm(jpi,jpj,jpk,2) , & 566 & emp_tm(jpi,jpj) , fmmflx_tm(jpi,jpj) , & 567 & emp_b_hold(jpi,jpj) , & 568 & hmld_tm(jpi,jpj) , qsr_tm(jpi,jpj) , & 569 & rnf_tm(jpi,jpj) , h_rnf_tm(jpi,jpj) , STAT=ierr(1) ) 570 ! 571 IF( l_ldfslp ) THEN 572 ALLOCATE( uslp_temp(jpi,jpj,jpk) , wslpi_temp(jpi,jpj,jpk), & 573 & vslp_temp(jpi,jpj,jpk) , wslpj_temp(jpi,jpj,jpk), & 574 & uslp_tm (jpi,jpj,jpk) , wslpi_tm (jpi,jpj,jpk), & 575 & vslp_tm (jpi,jpj,jpk) , wslpj_tm (jpi,jpj,jpk), STAT=ierr(2) ) 576 ENDIF 577 IF( ln_trabbl ) THEN 578 ALLOCATE( ahu_bbl_temp(jpi,jpj) , utr_bbl_temp(jpi,jpj) , & 579 & ahv_bbl_temp(jpi,jpj) , vtr_bbl_temp(jpi,jpj) , & 580 & ahu_bbl_tm (jpi,jpj) , utr_bbl_tm (jpi,jpj) , & 581 & ahv_bbl_tm (jpi,jpj) , vtr_bbl_tm (jpi,jpj) , STAT=ierr(3) ) 582 ENDIF 583 ! 584 trc_sub_alloc = MAXVAL( ierr ) 542 585 ! 543 586 IF( trc_sub_alloc /= 0 ) CALL ctl_warn('trc_sub_alloc: failed to allocate arrays') 544 !545 IF( l_ldfslp ) THEN546 ALLOCATE( uslp_temp(jpi,jpj,jpk) , wslpi_temp(jpi,jpj,jpk), &547 & vslp_temp(jpi,jpj,jpk) , wslpj_temp(jpi,jpj,jpk), &548 & uslp_tm (jpi,jpj,jpk) , wslpi_tm (jpi,jpj,jpk), &549 & vslp_tm (jpi,jpj,jpk) , wslpj_tm (jpi,jpj,jpk), STAT=trc_sub_alloc )550 ENDIF551 !552 IF( trc_sub_alloc /= 0 ) CALL ctl_warn('trc_sub_alloc: failed to allocate ldf_slp arrays')553 587 ! 554 588 END FUNCTION trc_sub_alloc
Note: See TracChangeset
for help on using the changeset viewer.