New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 15547 for NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE/SBC/tide_mod.F90 – NEMO

Ignore:
Timestamp:
2021-11-27T11:04:33+01:00 (3 years ago)
Author:
hadjt
Message:

Moving ftide, utide, v0tide output to sbctides, adding tide_t output to diaharm_fast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE/SBC/tide_mod.F90

    r15500 r15547  
    1515   USE ioipsl  , ONLY :   ymds2ju      ! for calendar 
    1616 
     17   USE iom 
    1718 
    1819   IMPLICIT NONE 
     
    2526   ! davbyr: increase maximum number of harmonics from 19 to 34 
    2627   INTEGER, PUBLIC, PARAMETER ::   jpmax_harmo = 34   !: maximum number of harmonic 
     28 
     29 
     30   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) ::   v0linearintercept             
     31 
     32 
    2733 
    2834   TYPE, PUBLIC ::    tide 
     
    140146      ENDIF 
    141147 
    142       IF ( ln_tide_compress   )  CALL astronomic_angle_origin 
     148      !IF ( ln_tide_compress   )   
     149      CALL astronomic_angle_origin 
    143150 
    144151   END SUBROUTINE tide_init_calendar_options 
     
    969976      REAL(wp)                             :: hours_since_origin 
    970977      REAL(wp), DIMENSION(kc) ::   pomega           ! pulsation in radians/s 
    971       REAL(wp), DIMENSION(kc) ::   freq_per_day,   v0linearslope,v0linearintercept             ! pulsation in radians/s  !offset,cycle_reset,freq,per_hr 
     978      REAL(wp), DIMENSION(kc) ::   freq_per_day,   v0linearslope ! ,v0linearintercept             ! pulsation in radians/s  !offset,cycle_reset,freq,per_hr 
     979      CHARACTER (len=40) :: tmp_name 
    972980      !! JT for compress 
    973981 
    974982 
     983      IF( .NOT. ALLOCATED(v0linearintercept) )  ALLOCATE( v0linearintercept(kc)   ) 
     984     
    975985 
    976986      IF ( ln_tide_compress) THEN 
     
    12741284         !  Linear with time 
    12751285 
     1286        v0linearintercept(jh) = sh_T_o * Wave( ktide(jh) )%nT    & 
     1287            &    + sh_s_o * Wave( ktide(jh) )%ns    & 
     1288            &    + sh_h_o * Wave( ktide(jh) )%nh    & 
     1289            &    + sh_p_o * Wave( ktide(jh) )%np    & 
     1290            &    + sh_p1_o* Wave( ktide(jh) )%np1   & 
     1291            &    +          Wave( ktide(jh) )%shift * rad 
     1292 
     1293 
    12761294         IF ( ln_tide_compress ) THEN 
    1277  
    1278             v0linearintercept(jh) = sh_T_o * Wave( ktide(jh) )%nT    & 
    1279                 &    + sh_s_o * Wave( ktide(jh) )%ns    & 
    1280                 &    + sh_h_o * Wave( ktide(jh) )%nh    & 
    1281                 &    + sh_p_o * Wave( ktide(jh) )%np    & 
    1282                 &    + sh_p1_o* Wave( ktide(jh) )%np1   & 
    1283                 &    +          Wave( ktide(jh) )%shift * rad 
    1284  
    1285  
    12861295 
    12871296             !JT pvt(jh) = mod(  ( (v0linearslope(jh)*days_since_origin) + v0linearintercept(  ktide(jh)  ) ),  2*rpi)-(2*rpi) 
     
    13291338          END DO 
    13301339      ENDIF 
     1340 
     1341 
     1342 
     1343 
     1344    DO jh = 1, kc        
     1345 
     1346        tmp_name=TRIM(Wave(ktide(jh))%cname_tide)//'_utide' 
     1347        IF( iom_use(TRIM(tmp_name)) )  THEN 
     1348        !    IF(lwp) WRITE(numout,*) "harm_ana_out: iom_put: ",TRIM(tmp_name),'; shape = ', SHAPE(anau(jh) ) 
     1349            CALL iom_put( TRIM(tmp_name), put(jh) ) 
     1350        !ELSE 
     1351        !    IF(lwp) WRITE(numout,*) "harm_ana_out: not requested: ",TRIM(tmp_name) 
     1352        ENDIF     
     1353 
     1354        tmp_name=TRIM(Wave(ktide(jh))%cname_tide)//'_v0tide' 
     1355        IF( iom_use(TRIM(tmp_name)) )  THEN 
     1356        !    IF(lwp) WRITE(numout,*) "harm_ana_out: iom_put: ",TRIM(tmp_name),'; shape = ', SHAPE(anav(jh) ) 
     1357            CALL iom_put( TRIM(tmp_name), pvt(jh) ) 
     1358        !ELSE 
     1359        !    IF(lwp) WRITE(numout,*) "harm_ana_out: not requested: ",TRIM(tmp_name) 
     1360        ENDIF 
     1361 
     1362        tmp_name=TRIM(Wave(ktide(jh))%cname_tide)//'_v0tide_origin' 
     1363        IF( iom_use(TRIM(tmp_name)) )  THEN 
     1364        !    IF(lwp) WRITE(numout,*) "harm_ana_out: iom_put: ",TRIM(tmp_name),'; shape = ', SHAPE(anav(jh) ) 
     1365            CALL iom_put( TRIM(tmp_name), v0linearintercept(jh) ) 
     1366        !ELSE 
     1367        !    IF(lwp) WRITE(numout,*) "harm_ana_out: not requested: ",TRIM(tmp_name) 
     1368        ENDIF 
     1369 
     1370 
     1371 
     1372 
     1373        tmp_name=TRIM(Wave(ktide(jh))%cname_tide)//'_ftide' 
     1374        IF( iom_use(TRIM(tmp_name)) )  THEN 
     1375        !    IF(lwp) WRITE(numout,*) "harm_ana_out: iom_put: ",TRIM(tmp_name),'; shape = ', SHAPE(anaf(jh) ) 
     1376            CALL iom_put( TRIM(tmp_name), pcor(jh) ) 
     1377        !ELSE 
     1378        !    IF(lwp) WRITE(numout,*) "harm_ana_out: not requested: ",TRIM(tmp_name) 
     1379        ENDIF 
     1380 
     1381     END DO 
     1382 
     1383 
     1384 
     1385 
     1386 
     1387 
     1388 
     1389 
     1390 
    13311391 
    13321392 
Note: See TracChangeset for help on using the changeset viewer.