Changeset 10840
- Timestamp:
- 2019-04-04T19:09:12+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/DIA/diaharm.F90
r10836 r10840 71 71 INTEGER :: jh, nhan, jk, ji 72 72 INTEGER :: ios ! Local integer output status for namelist read 73 TYPE(tide), DIMENSION(:), POINTER :: tide_components ! Selected tidal components74 73 TYPE(tide_harmonic), DIMENSION(:), POINTER :: tide_harmonics ! Oscillation parameters of selected tidal components 75 74 … … 109 108 & CALL ctl_stop( 'dia_harm_init : analysis time span must be a multiple of nstep_han' ) 110 109 111 ! Request parameters for tidal components that have been selected for 112 ! harmonic analysis 113 CALL tide_init_components(tname, tide_components) 110 ! Initialize oscillation parameters for tidal components that have been 111 ! selected for harmonic analysis 112 ! --------------------------------------------------------------------- 113 CALL tide_init_harmonics(tname, tide_harmonics) 114 114 ! Number of tidal components selected for harmonic analysis 115 nb_ana = size(tide_ components)115 nb_ana = size(tide_harmonics) 116 116 ! 117 117 IF(lwp) THEN … … 126 126 CALL ctl_stop( 'dia_harm_init', ctmp1, ctmp2 ) 127 127 ENDIF 128 129 ! Initialize oscillation parameters of selected tidal components130 ! --------------------------------------------------------------131 CALL tide_init_harmonics( tide_components, tide_harmonics)132 128 133 129 IF(lwp) WRITE(numout,*) 'Analysed frequency : ',nb_ana ,'Frequency ' -
NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/TDE/tide_mod.F90
r10839 r10840 20 20 21 21 PUBLIC tide_init 22 PUBLIC tide_harmo ! called by tideini and diaharm modules 23 PUBLIC tide_init_components ! called internally and by module diaharm 22 PUBLIC tide_harmo ! called internally and by module sbdtide 24 23 PUBLIC tide_init_harmonics ! called internally and by module diaharm 25 24 PUBLIC tide_init_load … … 128 127 ENDIF 129 128 ! 130 ! Initialise array of selected tidal components131 CALL tide_init_components(sn_tide_cnames, tide_components)132 ! Number of active tidal components133 nb_harmo = size(tide_components)134 !135 ! Ensure that tidal components have been set in namelist_cfg136 IF( nb_harmo == 0 ) CALL ctl_stop( 'tide_init : No tidal components set in nam_tide' )137 !138 129 IF( ln_read_load.AND.(.NOT.ln_tide_pot) ) & 139 130 & CALL ctl_stop('ln_read_load requires ln_tide_pot') … … 148 139 ! 149 140 ! Initialise array used to store tidal oscillation parameters (frequency, 150 ! amplitude, phase) 151 CALL tide_init_harmonics(tide_components, tide_harmonics) 141 ! amplitude, phase); also retrieve and store array of information about 142 ! selected tidal components 143 CALL tide_init_harmonics(sn_tide_cnames, tide_harmonics, tide_components) 144 ! 145 ! Number of active tidal components 146 nb_harmo = size(tide_components) 147 ! 148 ! Ensure that tidal components have been set in namelist_cfg 149 IF( nb_harmo == 0 ) CALL ctl_stop( 'tide_init : No tidal components set in nam_tide' ) 152 150 ! 153 151 ! Reference time step for time-dependent tidal parameters … … 219 217 220 218 221 SUBROUTINE tide_init_harmonics(p tide_comp, ptide_harmo)219 SUBROUTINE tide_init_harmonics(pcnames, ptide_harmo, ptide_comp) 222 220 !!---------------------------------------------------------------------- 223 221 !! *** ROUTINE tide_init_harmonics *** … … 227 225 !! components 228 226 !! ---------------------------------------------------------------------- 229 TYPE(tide), POINTER, DIMENSION(:) :: ptide_comp ! Selected components 230 TYPE(tide_harmonic), POINTER, DIMENSION(:) :: ptide_harmo ! Oscillation parameters of selected components 227 CHARACTER(LEN=4), DIMENSION(jpmax_harmo), INTENT(in) :: pcnames ! Names of selected components 228 TYPE(tide_harmonic), POINTER, DIMENSION(:) :: ptide_harmo ! Oscillation parameters of tidal components 229 TYPE(tide), POINTER, DIMENSION(:), OPTIONAL :: ptide_comp ! Selected components 230 TYPE(tide), POINTER, DIMENSION(:) :: ztcomp ! Selected components 231 232 ! Retrieve information about selected tidal components 233 ! If requested, prepare tidal component array for returning 234 IF (PRESENT(ptide_comp)) THEN 235 CALL tide_init_components(pcnames, ptide_comp) 236 ztcomp => ptide_comp 237 ELSE 238 CALL tide_init_components(pcnames, ztcomp) 239 END IF 231 240 232 241 ! Allocate and populate array of oscillation parameters 233 ALLOCATE(ptide_harmo(size( ptide_comp)))234 ptide_harmo(:)%cname_tide = ptide_comp(:)%cname_tide235 ptide_harmo(:)%equitide = ptide_comp(:)%equitide236 CALL tide_harmo( ptide_comp, ptide_harmo)242 ALLOCATE(ptide_harmo(size(ztcomp))) 243 ptide_harmo(:)%cname_tide = ztcomp(:)%cname_tide 244 ptide_harmo(:)%equitide = ztcomp(:)%equitide 245 CALL tide_harmo(ztcomp, ptide_harmo) 237 246 238 247 END SUBROUTINE tide_init_harmonics
Note: See TracChangeset
for help on using the changeset viewer.