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 3625 for branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90 – NEMO

Ignore:
Timestamp:
2012-11-21T14:19:18+01:00 (12 years ago)
Author:
acc
Message:

Branch dev_NOC_2012_r3555. #1006. Step 7. Check in code now merged with dev_r3385_NOCS04_HAMF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90

    r2715 r3625  
    1111   !!   'key_lim3'                                       LIM3 sea-ice model 
    1212   !!---------------------------------------------------------------------- 
    13    !!   lim_dia        : computation and output of the time evolution of keys variables 
    14    !!   lim_dia_init   : initialization and namelist read 
    15    !!---------------------------------------------------------------------- 
    16    USE ice             ! LIM-3: sea-ice variable 
    17    USE par_ice         ! LIM-3: ice parameters 
    18    USE dom_ice         ! LIM-3: sea-ice domain 
    19    USE dom_oce         ! ocean domain 
    20    USE sbc_oce         ! surface boundary condition: ocean fields 
    21    USE daymod          ! model calendar 
    22    USE phycst          ! physical constant 
    23    USE in_out_manager  ! I/O manager 
    24    USE lib_mpp         ! MPP library 
    25     
     13   !!   lim_dia       : computation and output of the time evolution of keys variables 
     14   !!   lim_dia_init  : initialization and namelist read 
     15   !!---------------------------------------------------------------------- 
     16   USE ice            ! LIM-3: sea-ice variable 
     17   USE par_ice        ! LIM-3: ice parameters 
     18   USE dom_ice        ! LIM-3: sea-ice domain 
     19   USE dom_oce        ! ocean domain 
     20   USE sbc_oce        ! surface boundary condition: ocean fields 
     21   USE daymod         ! model calendar 
     22   USE phycst         ! physical constant 
     23   USE in_out_manager ! I/O manager 
     24   USE lib_mpp        ! MPP library 
     25   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     26 
    2627   IMPLICIT NONE 
    2728   PRIVATE 
     
    7071      !!              the temporal evolution of some key variables 
    7172      !!------------------------------------------------------------------- 
    72       INTEGER  ::   jv, ji, jj, jl   ! dummy loop indices 
    73       REAL(wp) ::   zshift_date      ! date from the minimum ice extent 
    74       REAL(wp) ::   zday, zday_min   ! current day, day of minimum extent 
    75       REAL(wp) ::   zafy, zamy       ! temporary area of fy and my ice 
     73      INTEGER  ::   jv, ji, jj, jl       ! dummy loop indices 
     74      INTEGER  ::   ii0, ii1, ij0, ij1   ! temporary integer 
     75      REAL(wp) ::   zshift_date          ! date from the minimum ice extent 
     76      REAL(wp) ::   zday, zday_min       ! current day, day of minimum extent 
     77      REAL(wp) ::   zafy, zamy           ! temporary area of fy and my ice 
    7678      REAL(wp) ::   zindb 
    77       REAL(wp), DIMENSION(jpinfmx) ::   vinfor           ! temporary working space  
     79      REAL(wp), DIMENSION(jpinfmx) ::   vinfor   ! 1D workspace  
    7880      !!------------------------------------------------------------------- 
    7981 
     
    105107            IF( tms(ji,jj) == 1 ) THEN 
    106108               vinfor(3)  = vinfor(3)  + at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice area 
    107                IF (at_i(ji,jj).GT.0.15) vinfor(5) = vinfor(5) + aire(ji,jj) * 1.e-12_wp !ice extent 
     109               IF ( at_i(ji,jj) > 0.15 )  vinfor(5) = vinfor(5) + aire(ji,jj) * 1.e-12_wp !ice extent 
    108110               vinfor(7)  = vinfor(7)  + vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice volume 
    109111               vinfor(9)  = vinfor(9)  + vt_s(ji,jj)*aire(ji,jj) * 1.e-12_wp !snow volume 
     
    111113               vinfor(29) = vinfor(29) + smt_i(ji,jj)*vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !mean salinity 
    112114               ! the computation of this diagnostic is not reliable 
    113                vinfor(31) = vinfor(31) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + &  
    114                   v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12  
    115                vinfor(53) = vinfor(53) + emps(ji,jj)*aire(ji,jj) * 1.e-12_wp !salt flux 
    116                vinfor(55) = vinfor(55) + fsbri(ji,jj)*aire(ji,jj) * 1.e-12_wp !brine drainage flux 
    117                vinfor(57) = vinfor(57) + fseqv(ji,jj)*aire(ji,jj) * 1.e-12_wp !equivalent salt flux 
     115               vinfor(31) = vinfor(31) + vt_i(ji,jj) * (  u_ice(ji,jj)*u_ice(ji,jj)  &  
     116                  &                                     + v_ice(ji,jj)*v_ice(ji,jj) ) * aire(ji,jj) * 1.e-12  
     117               vinfor(53) = vinfor(53) + sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp !salt flux 
     118               vinfor(55) = vinfor(55) + sfx_bri(ji,jj)*aire(ji,jj) * 1.e-12_wp !brine drainage flux 
     119               vinfor(57) = vinfor(57) + sfx_thd(ji,jj)*aire(ji,jj) * 1.e-12_wp !equivalent salt flux 
    118120               vinfor(59) = vinfor(59) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp  !SST 
    119121               vinfor(61) = vinfor(61) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp  !SSS 
     
    180182               vinfor(43) = vinfor(43) + diag_dyn_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp  
    181183               vinfor(45) = vinfor(45) + dv_dt_thd(ji,jj,5)*aire(ji,jj) * 1.e-12_wp 
    182                vinfor(47) = vinfor(47) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp / rdt_ice ! volume acc in OW 
     184               vinfor(47) = vinfor(47) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp * r1_rdtice  ! volume acc in OW 
    183185            ENDIF 
    184186         END DO 
     
    231233      vinfor(51) = zindb*vinfor(51) / MAX(vinfor(27),epsi06) 
    232234 
    233       !! Fram Strait Export 
    234       !! 83 = area export 
    235       !! 84 = volume export 
    236       !! Fram strait in ORCA2 = 5 points 
    237       !! export = -v_ice*e1t*ddtb*at_i or -v_ice*e1t*ddtb*at_i*h_i 
    238       jj = 136 ! C grid 
    239       vinfor(83) = 0.0 
    240       vinfor(84) = 0.0 
    241       DO ji = 134, 138 
    242          vinfor(83) = vinfor(83) - v_ice(ji,jj) * &  
    243             e1t(ji,jj)*at_i(ji,jj)*rdt_ice * 1.e-12_wp 
    244          vinfor(84) = vinfor(84) - v_ice(ji,jj) * &  
    245             e1t(ji,jj)*vt_i(ji,jj)*rdt_ice * 1.e-12_wp 
    246       END DO 
     235      IF( cp_cfg == "orca" ) THEN   !* ORCA configuration : Fram Strait Export 
     236         SELECT CASE ( jp_cfg ) 
     237         CASE ( 2 )                          ! ORCA_R2 
     238            ij0 = 136   ;   ij1 = 136              ! Fram strait : 83 = area export 
     239            ii0 = 134   ;   ii1 = 138              !               84 = volume export 
     240            DO jj = mj0(ij0),mj1(ij1) 
     241               DO ji = mi0(ii0),mi1(ii1) 
     242                  vinfor(83) = vinfor(83) - v_ice(ji,jj) * e1t(ji,jj)*at_i(ji,jj)*rdt_ice * 1.e-12_wp 
     243                  vinfor(84) = vinfor(84) - v_ice(ji,jj) * e1t(ji,jj)*vt_i(ji,jj)*rdt_ice * 1.e-12_wp 
     244               END DO 
     245            END DO 
     246         END SELECT 
     247!!gm   just above, this is NOT the correct way of evaluating the transport ! 
     248!!gm        mass of snow is missing and v_ice should be the mean between jj and jj+1 
     249!!gm   Other ORCA configurations should be added 
     250      ENDIF 
    247251 
    248252      !!------------------------------------------------------------------- 
     
    264268               vinfor(32) = vinfor(32) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + &  
    265269                  v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12 !ice vel 
    266                vinfor(54) = vinfor(54) + at_i(ji,jj)*emps(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Total salt flux 
    267                vinfor(56) = vinfor(56) + at_i(ji,jj)*fsbri(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Brine drainage salt flux 
    268                vinfor(58) = vinfor(58) + at_i(ji,jj)*fseqv(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Equivalent salt flux 
     270               vinfor(54) = vinfor(54) + sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp ! Total salt flux 
     271               vinfor(56) = vinfor(56) + sfx_bri(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Brine drainage salt flux 
     272               vinfor(58) = vinfor(58) + sfx_thd(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Equivalent salt flux 
    269273               vinfor(60) = vinfor(60) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp  !SST 
    270274               vinfor(62) = vinfor(62) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp  !SSS 
     
    331335               vinfor(44) = vinfor(44) + diag_dyn_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp  
    332336               vinfor(46) = vinfor(46) + dv_dt_thd(ji,jj,5)*aire(ji,jj) * 1.e-12_wp 
    333                vinfor(48) = vinfor(48) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp / rdt_ice ! volume acc in OW 
     337               vinfor(48) = vinfor(48) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp * r1_rdtice  ! volume acc in OW 
    334338            ENDIF 
    335339         END DO 
     
    345349         END DO 
    346350      END DO 
    347       zindb      = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(4))) ! 
    348       vinfor(64) = zindb * vinfor(64) / MAX(vinfor(4),epsi06) ! divide by ice extt 
     351      zindb      = 1._wp - MAX(  0._wp , SIGN( 1._wp , -vinfor(4) )  )  ! 
     352      vinfor(64) = zindb * vinfor(64) / MAX( vinfor(4) , epsi06 )  ! divide by ice extt 
    349353      !! 2.2) Diagnostics dependent on age 
    350354      !!------------------------------------ 
     
    368372                  ENDIF 
    369373               END DO ! jl 
    370                IF ((at_i(ji,jj).GT.0.15).AND.(zafy.GT.zamy)) THEN 
     374               IF ( at_i(ji,jj)  >  0.15  .AND. zafy  >  zamy ) THEN 
    371375                  vinfor(22) = vinfor(22) + aire(ji,jj) * 1.e-12_wp ! Seasonal ice extent 
    372376               ENDIF 
    373                IF ((at_i(ji,jj).GT.0.15).AND.(zafy.LE.zamy)) THEN 
     377               IF ( at_i(ji,jj)  >  0.15  .AND. zafy <= zamy ) THEN 
    374378                  vinfor(24) = vinfor(24) + aire(ji,jj) * 1.e-12_wp ! Perennial ice extent 
    375379               ENDIF 
     
    377381         END DO ! jj 
    378382      END DO ! ji 
    379       zindb      = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(26))) !=0 if no multiyear ice 1 if yes 
    380       vinfor(50) = zindb*vinfor(50) / MAX(vinfor(26),epsi06) 
    381       zindb      = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(28))) !=0 if no multiyear ice 1 if yes 
    382       vinfor(52) = zindb*vinfor(52) / MAX(vinfor(28),epsi06) 
     383      zindb      = 1.0 - MAX(  0.0,SIGN( 1._wp , -vinfor(26) )  )    !=0 if no multiyear ice 1 if yes 
     384      vinfor(50) = zindb * vinfor(50) / MAX( vinfor(26) , epsi06 ) 
     385      zindb      = 1.0 - MAX(  0._wp , SIGN( 1._wp , -vinfor(28) )  ) !=0 if no multiyear ice 1 if yes 
     386      vinfor(52) = zindb * vinfor(52) / MAX( vinfor(28) , epsi06 ) 
    383387 
    384388      !  Accumulation before averaging  
Note: See TracChangeset for help on using the changeset viewer.