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 3379 for branches/2012/dev_r3337_NOCS10_ICB – NEMO

Ignore:
Timestamp:
2012-05-02T10:06:44+02:00 (12 years ago)
Author:
sga
Message:

NEMO branch dev_r3337_NOCS10_ICB: remove deallocation of diagnostic arrays and add more comments

Location:
branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90

    r3374 r3379  
    4242      !!                 ***  ROUTINE icb_clv_flx  *** 
    4343      !! 
    44       !! ** Purpose :   ? 
     44      !! ** Purpose :   accumulate ice available for calving into class arrays 
    4545      !! 
    46       !! ** input   : - ? 
    4746      !!---------------------------------------------------------------------- 
    4847      INTEGER, INTENT(in)             :: kt 
     
    5756      ! Use interior mask: so no bergs in overlap areas and convert from km^3/year to kg/s 
    5857      ! this assumes that input is given as equivalent water flux so that pure water density is appropriate 
     58 
    5959      zfact = ( (1000._wp)**3 / ( NINT(rday) * nyear_len(1) ) ) * 1000._wp 
    6060      berg_grid%calving(:,:) = src_calving(:,:) * tmask_i(:,:) * zfact 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdia.F90

    r3373 r3379  
    1414   !!---------------------------------------------------------------------- 
    1515   !!---------------------------------------------------------------------- 
    16    !! icb_dia_end  : end        iceberg budgeting 
    1716   !! icb_dia_init : initialise iceberg budgeting 
    1817   !!---------------------------------------------------------------------- 
     
    2827   PRIVATE 
    2928 
    30    PUBLIC   icb_dia_end       ! routine called in icbstp.F90 module 
    3129   PUBLIC   icb_dia_init      ! routine called in icbini.F90 module 
    3230   PUBLIC   icb_dia           ! routine called in icbstp.F90 module 
     
    8381CONTAINS 
    8482 
    85    SUBROUTINE icb_dia_end 
    86       !!---------------------------------------------------------------------- 
    87       ! 
    88       IF( .NOT. ln_bergdia )   RETURN 
    89       DEALLOCATE( berg_melt ) 
    90       DEALLOCATE( buoy_melt ) 
    91       DEALLOCATE( eros_melt ) 
    92       DEALLOCATE( conv_melt ) 
    93       DEALLOCATE( bits_src ) 
    94       DEALLOCATE( bits_melt ) 
    95       DEALLOCATE( bits_mass ) 
    96       DEALLOCATE( virtual_area ) 
    97       DEALLOCATE( berg_mass ) 
    98       DEALLOCATE( real_calving ) 
    99       DEALLOCATE( tmpc ) 
    100       IF( lk_mpp ) THEN 
    101          DEALLOCATE( rsumbuf ) 
    102          DEALLOCATE( nsumbuf ) 
    103       ENDIF 
    104       ! 
    105    END SUBROUTINE icb_dia_end 
    106  
    107  
    10883   SUBROUTINE icb_dia_init( ) 
    10984      !!---------------------------------------------------------------------- 
     
    11186      ! 
    11287      IF( .NOT. ln_bergdia ) RETURN 
     88 
    11389      ALLOCATE( berg_melt    (jpi,jpj)   )           ;   berg_melt   (:,:)   = 0._wp 
    11490      ALLOCATE( buoy_melt    (jpi,jpj)   )           ;   buoy_melt   (:,:)   = 0._wp 
     
    179155   SUBROUTINE icb_dia( ld_budge ) 
    180156      !!---------------------------------------------------------------------- 
     157      !! sum all the things we've accumulated so far in the current processor 
     158      !! in MPP case then add these sums across all processors 
     159      !! for this we pack variables into buffer so we only need one mpp_sum 
    181160      !!---------------------------------------------------------------------- 
    182161      LOGICAL, INTENT(in) ::   ld_budge 
     
    369348      !!---------------------------------------------------------------------- 
    370349      !! things to reset at the beginning of each timestep 
    371       !! this probably screws up fields going to diawri, so needs to be looked at - sga 
    372350      !!---------------------------------------------------------------------- 
    373351      ! 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90

    r3374 r3379  
    3939      !! ** Purpose :   iceberg evolution. 
    4040      !! 
    41       !! ** Method  : - blah blah 
     41      !! ** Method  : - See Martin & Adcroft, Ocean Modelling 34, 2010 
    4242      !!---------------------------------------------------------------------- 
    4343      REAL(wp)                        ::   zuvel1 , zvvel1 , zu1, zv1, zax1, zay1, zxi1 , zyj1 
     
    174174      !! ** Purpose :   iceberg grounding. 
    175175      !! 
    176       !! ** Method  : - blah blah 
     176      !! ** Method  : - adjust velocity and then put iceberg back to start position 
     177      !!                NB two possibilities available one of which is hard-coded here 
    177178      !!---------------------------------------------------------------------- 
    178179      REAL(wp), INTENT(inout) ::   pi , pj      ! current iceberg position 
     
    240241      !! ** Purpose :   compute the iceberg acceleration. 
    241242      !! 
    242       !! ** Method  : - blah blah 
     243      !! ** Method  : - sum the terms in the momentum budget 
    243244      !!---------------------------------------------------------------------- 
    244245      TYPE(iceberg ), POINTER, INTENT(in   ) ::   berg             ! berg 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90

    r3375 r3379  
    5151      !! ** Purpose :   iceberg initialization. 
    5252      !! 
    53       !! ** Method  : - blah blah 
     53      !! ** Method  : - read the iceberg namelist 
     54      !!              - find non-overlapping processor interior since we can only 
     55      !!                have one instance of a particular iceberg 
     56      !!              - calculate the destinations for north fold exchanges 
     57      !!              - setup either test icebergs or calving file 
    5458      !!---------------------------------------------------------------------- 
    5559      REAL(wp), INTENT(in) ::   pdt   ! iceberg time-step (rdt*nn_fsbc) 
     
    356360      READ  ( numnam, namberg ) 
    357361       
    358 !!gm  bug here in mpp : the return instruction will be done only on the 1st processor (lwp=True) 
    359 !      IF( .NOT. ln_icebergs .AND. lwp ) THEN 
    360 !         WRITE(numout,*) 
    361 !         WRITE(numout,*) 'icb_nam : iceberg initialization through namberg namelist read' 
    362 !         WRITE(numout,*) '~~~~~~~~ ' 
    363 !         WRITE(numout,*) 'NO icebergs used' 
    364 !         RETURN 
    365 !      ENDIF 
    366 !!gm solution: 
    367  
    368362      IF( .NOT. ln_icebergs ) THEN   ! no icebergs 
    369363         IF(lwp) THEN 
     
    374368         RETURN 
    375369      ENDIF 
    376 !!gm end 
    377370 
    378371      IF( nn_test_icebergs > nclasses ) THEN 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90

    r3375 r3379  
    1414   !!---------------------------------------------------------------------- 
    1515   !!---------------------------------------------------------------------- 
    16    !!   icb_lbc       : Pass icebergs across cyclic boundaries 
    17    !!   icb_lbc_mpp   : In MPP pass icebergs from linked list between processors 
    18    !!                    as they advect around 
    19    !!                    Lagrangian processes cannot be handled by existing NEMO MPP 
    20    !!                    routines because they do not lie on regular jpi,jpj grids 
    21    !!                    Processor exchanges are handled as in lib_mpp whenever icebergs step  
    22    !!                    across boundary of interior domain (nicbdi-nicbei, nicbdj-nicbej) 
    23    !!                    so that iceberg does not exist in more than one processor 
    24    !!                    North fold exchanges controlled by three arrays: 
    25    !!                       nicbflddest - unique processor numbers that current one exchanges with 
    26    !!                       nicbfldproc - processor number that current grid point exchanges with 
    27    !!                       nicbfldpts  - packed i,j point in exchanging processor 
     16   !!   icb_lbc       : - Pass icebergs across cyclic boundaries 
     17   !!   icb_lbc_mpp   : - In MPP pass icebergs from linked list between processors 
     18   !!                      as they advect around 
     19   !!                   - Lagrangian processes cannot be handled by existing NEMO MPP 
     20   !!                      routines because they do not lie on regular jpi,jpj grids 
     21   !!                   - Processor exchanges are handled as in lib_mpp whenever icebergs step  
     22   !!                      across boundary of interior domain (nicbdi-nicbei, nicbdj-nicbej) 
     23   !!                      so that iceberg does not exist in more than one processor 
     24   !!                   - North fold exchanges controlled by three arrays: 
     25   !!                         nicbflddest - unique processor numbers that current one exchanges with 
     26   !!                         nicbfldproc - processor number that current grid point exchanges with 
     27   !!                         nicbfldpts  - packed i,j point in exchanging processor 
    2828   !!---------------------------------------------------------------------- 
    2929 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90

    r3375 r3379  
    1414   !!---------------------------------------------------------------------- 
    1515   !!---------------------------------------------------------------------- 
    16    !!   icb_rst_read    : initialise                      !!gm suggested name : icebergs_rst_read  or better icb_rst_read 
    17    !!   icb_rst_write   : generate test icebergs          !!gm                  icebergs_rst_write or better icb_rst_write 
     16   !!   icb_rst_read    : read restart file 
     17   !!   icb_rst_write   : write restart file 
    1818   !!---------------------------------------------------------------------- 
    1919   USE par_oce        ! NEMO parameters 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbstp.F90

    r3376 r3379  
    5555      !! ** Purpose :   iceberg time stepping. 
    5656      !! 
    57       !! ** Method  : - blah blah 
     57      !! ** Method  : - top level routine to do things in the correct order 
    5858      !!---------------------------------------------------------------------- 
    5959      INTEGER, INTENT(in) ::   kt   ! time step index 
     
    172172      IF( nn_sample_rate .GT. 0 ) CALL icb_trj_end() 
    173173 
    174       CALL icb_dia_end() 
    175  
    176174      IF(lwp)   WRITE(numout,'(a,i6)') 'icebergs: icb_end complete', narea 
    177175      CALL flush( numicb ) 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90

    r3377 r3379  
    3939      !! ** Purpose :   compute the iceberg thermodynamics. 
    4040      !! 
    41       !! ** Method  : - blah blah 
     41      !! ** Method  : - See Martin & Adcroft, Ocean Modelling 34, 2010 
    4242      !!---------------------------------------------------------------------- 
    4343      INTEGER, INTENT(in) ::   kt   ! timestep number, just passed to icb_utl_print_berg 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbtrj.F90

    r3373 r3379  
    1111   !!---------------------------------------------------------------------- 
    1212   !!---------------------------------------------------------------------- 
    13    !!   write_trajectory      : 
     13   !!   icb_trj_init          : 
    1414   !!---------------------------------------------------------------------- 
    1515   USE par_oce        ! NEMO parameters 
     
    5252 
    5353   SUBROUTINE icb_trj_init( ktend ) 
    54  
    55       ! local variables 
     54      !!---------------------------------------------------------------------- 
     55      !!                  ***  ROUTINE icb_trj_init  *** 
     56      !! 
     57      !! ** Purpose :   initialise iceberg trajectory output files 
     58      !!---------------------------------------------------------------------- 
    5659      INTEGER, INTENT( in )                 :: ktend 
    57       ! Local variables 
     60      ! 
    5861      INTEGER                               :: iret 
    5962      CHARACTER(len=80)                     :: cl_filename 
    6063      TYPE(iceberg), POINTER                :: this 
    6164      TYPE(point)  , POINTER                :: pt 
     65      !!---------------------------------------------------------------------- 
    6266 
    6367      IF( lk_mpp ) THEN   ;   WRITE(cl_filename,'("trajectory_icebergs_",I6.6,"_",I4.4,".nc")') ktend, narea-1 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90

    r3376 r3379  
    114114      !!                  ***  ROUTINE icb_utl_interp  *** 
    115115      !! 
    116       !! ** Purpose :   iceberg initialization. 
    117       !! 
    118       !! ** Method  : - blah blah 
     116      !! ** Purpose :   interpolation 
     117      !! 
     118      !! ** Method  : - interpolate from various ocean arrays onto iceberg position 
    119119      !! 
    120120      !!       !!gm  CAUTION here I do not care of the slip/no-slip conditions 
     
    275275      !! 
    276276      !! ** Purpose :   bilinear interpolation at berg location of horizontal scale factor 
    277       !! ** Method  :   interpolation done using the 4 nearest grid point among 
     277      !! ** Method  :   interpolation done using the 4 nearest grid points among 
    278278      !!                t-, u-, v-, and f-points. 
    279279      !!---------------------------------------------------------------------- 
     
    348348      !! ** Purpose :   add a new berg to the iceberg list 
    349349      !! 
    350       !! ** method  : - ? 
    351350      !!---------------------------------------------------------------------- 
    352351      TYPE(iceberg), INTENT(in)           ::   bergvals 
     
    370369      !! ** Purpose :   add a new berg to the iceberg list 
    371370      !! 
    372       !! ** method  : - ? 
    373371      !!---------------------------------------------------------------------- 
    374372      TYPE(iceberg), INTENT(in) ::   bergvals 
     
    402400      !! ** Purpose :   add a new berg to the iceberg list 
    403401      !! 
    404       !! ** method  : - ? 
    405402      !!---------------------------------------------------------------------- 
    406403      TYPE(iceberg), POINTER  ::   newberg 
     
    435432      !!gm  all these info are already known in daymod, no??? 
    436433      !! 
    437       !! ** method  : - ? 
    438434      !!---------------------------------------------------------------------- 
    439435      INTEGER, INTENT(in)     :: kmon, kday, khr, kmin, ksec 
     
    475471      !!                 ***  ROUTINE icb_utl_destroy  *** 
    476472      !! 
    477       !! ** Purpose :    
     473      !! ** Purpose :   remove a single iceberg instance 
    478474      !! 
    479475      !!---------------------------------------------------------------------- 
     
    522518      !!                 ***  ROUTINE icb_utl_print_berg  *** 
    523519      !! 
    524       !! ** Purpose :    
     520      !! ** Purpose :   print one 
    525521      !! 
    526522      !!---------------------------------------------------------------------- 
     
    544540      !!                 ***  ROUTINE icb_utl_print  *** 
    545541      !! 
    546       !! ** Purpose :    
     542      !! ** Purpose :   print many 
    547543      !! 
    548544      !!---------------------------------------------------------------------- 
     
    631627      !!                 ***  FUNCTION icb_utl_mass  *** 
    632628      !! 
    633       !! ** Purpose :   compute the mass all iceberg, all bergies or all bergs. 
     629      !! ** Purpose :   compute the mass all iceberg, all berg bits or all bergs. 
    634630      !!---------------------------------------------------------------------- 
    635631      TYPE(iceberg)      , POINTER  ::   first 
Note: See TracChangeset for help on using the changeset viewer.