[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 | !!---------------------------------------------------------------------- |
---|
[11536] | 9 | !! |
---|
[3] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! flo_stp : float trajectories computation |
---|
| 12 | !! flo_init : initialization of float trajectories computation |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[2528] | 14 | USE oce ! ocean variables |
---|
[3] | 15 | USE flo_oce ! floats variables |
---|
| 16 | USE lib_mpp ! distributed memory computing |
---|
| 17 | USE flodom ! initialisation Module |
---|
| 18 | USE flowri ! float output (flo_wri routine) |
---|
[3294] | 19 | USE florst ! float restart (flo_rst routine) |
---|
[3] | 20 | USE flo4rk ! Trajectories, Runge Kutta scheme (flo_4rk routine) |
---|
| 21 | USE floblk ! Trajectories, Blanke scheme (flo_blk routine) |
---|
[9124] | 22 | ! |
---|
[2528] | 23 | USE in_out_manager ! I/O manager |
---|
[3294] | 24 | USE timing ! preformance summary |
---|
[3] | 25 | |
---|
| 26 | IMPLICIT NONE |
---|
| 27 | PRIVATE |
---|
| 28 | |
---|
[1601] | 29 | PUBLIC flo_stp ! routine called by step.F90 |
---|
[11536] | 30 | PUBLIC flo_init ! routine called by nemogcm.F90 |
---|
[1601] | 31 | |
---|
[3] | 32 | !!---------------------------------------------------------------------- |
---|
[9598] | 33 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[1152] | 34 | !! $Id$ |
---|
[10068] | 35 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[3] | 36 | !!---------------------------------------------------------------------- |
---|
| 37 | CONTAINS |
---|
| 38 | |
---|
| 39 | SUBROUTINE flo_stp( kt ) |
---|
| 40 | !!---------------------------------------------------------------------- |
---|
| 41 | !! *** ROUTINE flo_stp *** |
---|
| 42 | !! |
---|
| 43 | !! ** Purpose : Compute the geographical position (lat., long., depth) |
---|
| 44 | !! of each float at each time step with one of the algorithm. |
---|
| 45 | !! |
---|
| 46 | !! ** Method : The position of a float is computed with Bruno Blanke |
---|
| 47 | !! algorithm by default and with a 4th order Runge-Kutta scheme |
---|
| 48 | !! if ln_flork4 =T |
---|
| 49 | !!---------------------------------------------------------------------- |
---|
| 50 | INTEGER, INTENT( in ) :: kt ! ocean time step |
---|
| 51 | !!---------------------------------------------------------------------- |
---|
[1601] | 52 | ! |
---|
[9124] | 53 | IF( ln_timing ) CALL timing_start('flo_stp') |
---|
[3294] | 54 | ! |
---|
[1601] | 55 | IF( ln_flork4 ) THEN ; CALL flo_4rk( kt ) ! Trajectories using a 4th order Runge Kutta scheme |
---|
| 56 | ELSE ; CALL flo_blk( kt ) ! Trajectories using Blanke' algorithme |
---|
[3] | 57 | ENDIF |
---|
[1601] | 58 | ! |
---|
[16] | 59 | IF( lk_mpp ) CALL mppsync ! synchronization of all the processor |
---|
[1601] | 60 | ! |
---|
[3294] | 61 | CALL flo_wri( kt ) ! trajectories ouput |
---|
[1601] | 62 | ! |
---|
[3294] | 63 | CALL flo_rst( kt ) ! trajectories restart |
---|
| 64 | ! |
---|
[1601] | 65 | wb(:,:,:) = wn(:,:,:) ! Save the old vertical velocity field |
---|
| 66 | ! |
---|
[9124] | 67 | IF( ln_timing ) CALL timing_stop('flo_stp') |
---|
[3294] | 68 | ! |
---|
[3] | 69 | END SUBROUTINE flo_stp |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | SUBROUTINE flo_init |
---|
| 73 | !!---------------------------------------------------------------- |
---|
| 74 | !! *** ROUTINE flo_init *** |
---|
| 75 | !! |
---|
| 76 | !! ** Purpose : Read the namelist of floats |
---|
| 77 | !!---------------------------------------------------------------------- |
---|
[9124] | 78 | INTEGER :: jfl |
---|
| 79 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[3294] | 80 | ! |
---|
[11536] | 81 | NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii |
---|
[3] | 82 | !!--------------------------------------------------------------------- |
---|
[1601] | 83 | ! |
---|
[2715] | 84 | IF(lwp) WRITE(numout,*) |
---|
| 85 | IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine ' |
---|
| 86 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 87 | |
---|
[4147] | 88 | REWIND( numnam_ref ) ! Namelist namflo in reference namelist : Floats |
---|
| 89 | READ ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) |
---|
[11536] | 90 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namflo in reference namelist' ) |
---|
[4147] | 91 | |
---|
| 92 | REWIND( numnam_cfg ) ! Namelist namflo in configuration namelist : Floats |
---|
| 93 | READ ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) |
---|
[11536] | 94 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namflo in configuration namelist' ) |
---|
[4624] | 95 | IF(lwm) WRITE ( numond, namflo ) |
---|
[1601] | 96 | ! |
---|
| 97 | IF(lwp) THEN ! control print |
---|
| 98 | WRITE(numout,*) |
---|
[3] | 99 | WRITE(numout,*) ' Namelist floats :' |
---|
[11536] | 100 | WRITE(numout,*) ' Activate floats or not ln_floats = ', ln_floats |
---|
| 101 | WRITE(numout,*) ' number of floats jpnfl = ', jpnfl |
---|
| 102 | WRITE(numout,*) ' number of new floats jpnflnewflo = ', jpnnewflo |
---|
| 103 | WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo |
---|
| 104 | WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl |
---|
| 105 | WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl |
---|
| 106 | WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo |
---|
| 107 | WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 |
---|
| 108 | WRITE(numout,*) ' Use of ariane convention ln_ariane = ', ln_ariane |
---|
| 109 | WRITE(numout,*) ' ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii |
---|
[3294] | 110 | |
---|
[3] | 111 | ENDIF |
---|
[1601] | 112 | ! |
---|
[11536] | 113 | IF( ln_floats ) THEN |
---|
| 114 | ! ! allocate floats arrays |
---|
| 115 | IF( flo_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) |
---|
| 116 | ! |
---|
| 117 | ! ! allocate flodom arrays |
---|
| 118 | IF( flo_dom_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) |
---|
| 119 | ! |
---|
| 120 | ! ! allocate flowri arrays |
---|
| 121 | IF( flo_wri_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) |
---|
| 122 | ! |
---|
| 123 | ! ! allocate florst arrays |
---|
| 124 | IF( flo_rst_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) |
---|
| 125 | ! |
---|
| 126 | jpnrstflo = jpnfl-jpnnewflo ! memory allocation |
---|
| 127 | ! |
---|
| 128 | DO jfl = 1, jpnfl ! vertical axe for netcdf IOM ouput |
---|
| 129 | nfloat(jfl) = jfl |
---|
| 130 | END DO |
---|
| 131 | ! |
---|
| 132 | CALL flo_dom ! compute/read initial position of floats |
---|
| 133 | ! |
---|
| 134 | wb(:,:,:) = wn(:,:,:) ! set wb for computation of floats trajectories at the first time step |
---|
| 135 | ! |
---|
| 136 | ENDIF |
---|
[2715] | 137 | ! |
---|
[3] | 138 | END SUBROUTINE flo_init |
---|
| 139 | |
---|
| 140 | !!====================================================================== |
---|
| 141 | END MODULE floats |
---|