[3] | 1 | MODULE floats |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE floats *** |
---|
| 4 | !! Ocean floats : floats |
---|
| 5 | !!====================================================================== |
---|
[1601] | 6 | !! History : OPA ! (CLIPPER) original Code |
---|
| 7 | !! NEMO 1.0 ! 2002-06 (A. Bozec) F90, Free form and module |
---|
| 8 | !!---------------------------------------------------------------------- |
---|
[3] | 9 | #if defined key_floats || defined key_esopa |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! 'key_floats' float trajectories |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! flo_stp : float trajectories computation |
---|
| 14 | !! flo_init : initialization of float trajectories computation |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
[2528] | 16 | USE oce ! ocean variables |
---|
[3] | 17 | USE flo_oce ! floats variables |
---|
| 18 | USE lib_mpp ! distributed memory computing |
---|
| 19 | USE flodom ! initialisation Module |
---|
| 20 | USE flowri ! float output (flo_wri routine) |
---|
[3294] | 21 | USE florst ! float restart (flo_rst routine) |
---|
[3] | 22 | USE flo4rk ! Trajectories, Runge Kutta scheme (flo_4rk routine) |
---|
| 23 | USE floblk ! Trajectories, Blanke scheme (flo_blk routine) |
---|
[2528] | 24 | USE in_out_manager ! I/O manager |
---|
[3294] | 25 | USE timing ! preformance summary |
---|
[3] | 26 | |
---|
| 27 | IMPLICIT NONE |
---|
| 28 | PRIVATE |
---|
| 29 | |
---|
[1601] | 30 | PUBLIC flo_stp ! routine called by step.F90 |
---|
[2528] | 31 | PUBLIC flo_init ! routine called by opa.F90 |
---|
[1601] | 32 | |
---|
[3] | 33 | !!---------------------------------------------------------------------- |
---|
[2528] | 34 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[1152] | 35 | !! $Id$ |
---|
[2528] | 36 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 37 | !!---------------------------------------------------------------------- |
---|
| 38 | CONTAINS |
---|
| 39 | |
---|
| 40 | SUBROUTINE flo_stp( kt ) |
---|
| 41 | !!---------------------------------------------------------------------- |
---|
| 42 | !! *** ROUTINE flo_stp *** |
---|
| 43 | !! |
---|
| 44 | !! ** Purpose : Compute the geographical position (lat., long., depth) |
---|
| 45 | !! of each float at each time step with one of the algorithm. |
---|
| 46 | !! |
---|
| 47 | !! ** Method : The position of a float is computed with Bruno Blanke |
---|
| 48 | !! algorithm by default and with a 4th order Runge-Kutta scheme |
---|
| 49 | !! if ln_flork4 =T |
---|
| 50 | !!---------------------------------------------------------------------- |
---|
| 51 | INTEGER, INTENT( in ) :: kt ! ocean time step |
---|
| 52 | !!---------------------------------------------------------------------- |
---|
[1601] | 53 | ! |
---|
[3294] | 54 | IF( nn_timing == 1 ) CALL timing_start('flo_stp') |
---|
| 55 | ! |
---|
[1601] | 56 | IF( ln_flork4 ) THEN ; CALL flo_4rk( kt ) ! Trajectories using a 4th order Runge Kutta scheme |
---|
| 57 | ELSE ; CALL flo_blk( kt ) ! Trajectories using Blanke' algorithme |
---|
[3] | 58 | ENDIF |
---|
[1601] | 59 | ! |
---|
[16] | 60 | IF( lk_mpp ) CALL mppsync ! synchronization of all the processor |
---|
[1601] | 61 | ! |
---|
[3294] | 62 | CALL flo_wri( kt ) ! trajectories ouput |
---|
[1601] | 63 | ! |
---|
[3294] | 64 | CALL flo_rst( kt ) ! trajectories restart |
---|
| 65 | ! |
---|
[1601] | 66 | wb(:,:,:) = wn(:,:,:) ! Save the old vertical velocity field |
---|
| 67 | ! |
---|
[3294] | 68 | IF( nn_timing == 1 ) CALL timing_stop('flo_stp') |
---|
| 69 | ! |
---|
[3] | 70 | END SUBROUTINE flo_stp |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | SUBROUTINE flo_init |
---|
| 74 | !!---------------------------------------------------------------- |
---|
| 75 | !! *** ROUTINE flo_init *** |
---|
| 76 | !! |
---|
| 77 | !! ** Purpose : Read the namelist of floats |
---|
| 78 | !!---------------------------------------------------------------------- |
---|
[3294] | 79 | INTEGER :: jfl |
---|
| 80 | ! |
---|
| 81 | NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii |
---|
[3] | 82 | !!--------------------------------------------------------------------- |
---|
[1601] | 83 | ! |
---|
[3294] | 84 | IF( nn_timing == 1 ) CALL timing_start('flo_init') |
---|
| 85 | ! |
---|
[2715] | 86 | IF(lwp) WRITE(numout,*) |
---|
| 87 | IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine ' |
---|
| 88 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 89 | |
---|
[1601] | 90 | REWIND( numnam ) ! Namelist namflo : floats |
---|
[3] | 91 | READ ( numnam, namflo ) |
---|
[1601] | 92 | ! |
---|
| 93 | IF(lwp) THEN ! control print |
---|
| 94 | WRITE(numout,*) |
---|
[3] | 95 | WRITE(numout,*) ' Namelist floats :' |
---|
[3294] | 96 | WRITE(numout,*) ' number of floats jpnfl = ', jpnfl |
---|
| 97 | WRITE(numout,*) ' number of new floats jpnflnewflo = ', jpnnewflo |
---|
| 98 | WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo |
---|
| 99 | WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl |
---|
| 100 | WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl |
---|
| 101 | WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo |
---|
| 102 | WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 |
---|
| 103 | WRITE(numout,*) ' Use of ariane convention ln_ariane = ', ln_ariane |
---|
| 104 | WRITE(numout,*) ' ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii |
---|
| 105 | |
---|
[3] | 106 | ENDIF |
---|
[1601] | 107 | ! |
---|
[2715] | 108 | ! ! allocate floats arrays |
---|
| 109 | IF( flo_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) |
---|
| 110 | ! |
---|
[3294] | 111 | ! ! allocate flodom arrays |
---|
| 112 | IF( flo_dom_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) |
---|
| 113 | ! |
---|
[2715] | 114 | ! ! allocate flowri arrays |
---|
| 115 | IF( flo_wri_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) |
---|
| 116 | ! |
---|
[3294] | 117 | ! ! allocate florst arrays |
---|
| 118 | IF( flo_rst_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) |
---|
| 119 | ! |
---|
| 120 | !memory allocation |
---|
| 121 | jpnrstflo = jpnfl-jpnnewflo |
---|
| 122 | |
---|
| 123 | !vertical axe for netcdf IOM ouput |
---|
| 124 | DO jfl=1,jpnfl ; nfloat(jfl)=jfl ; ENDDO |
---|
| 125 | |
---|
| 126 | ! |
---|
[2715] | 127 | CALL flo_dom ! compute/read initial position of floats |
---|
| 128 | |
---|
| 129 | wb(:,:,:) = wn(:,:,:) ! set wb for computation of floats trajectories at the first time step |
---|
| 130 | ! |
---|
[3294] | 131 | IF( nn_timing == 1 ) CALL timing_stop('flo_init') |
---|
| 132 | ! |
---|
[3] | 133 | END SUBROUTINE flo_init |
---|
| 134 | |
---|
| 135 | # else |
---|
| 136 | !!---------------------------------------------------------------------- |
---|
| 137 | !! Default option : Empty module |
---|
| 138 | !!---------------------------------------------------------------------- |
---|
| 139 | CONTAINS |
---|
| 140 | SUBROUTINE flo_stp( kt ) ! Empty routine |
---|
[16] | 141 | WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt |
---|
[3] | 142 | END SUBROUTINE flo_stp |
---|
[2528] | 143 | SUBROUTINE flo_init ! Empty routine |
---|
| 144 | END SUBROUTINE flo_init |
---|
[3] | 145 | #endif |
---|
| 146 | |
---|
| 147 | !!====================================================================== |
---|
| 148 | END MODULE floats |
---|