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.
2020WP/ENHANCE-10_acc_fix_traqsr (diff) – NEMO

Changes between Version 13 and Version 14 of 2020WP/ENHANCE-10_acc_fix_traqsr


Ignore:
Timestamp:
2020-05-19T14:39:11+02:00 (4 years ago)
Author:
acc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2020WP/ENHANCE-10_acc_fix_traqsr

    v13 v14  
    256256 
    257257{{{#!diff 
    258 --- traqsr.F90  2020-05-19 10:28:06.858457146 +0100 
    259 +++ LOMEM3/traqsr.F90   2020-05-15 15:44:11.652736539 +0100 
    260 @@ -111,7 +111,6 @@ 
     258--- LOMEM3/traqsr.F90   2020-05-15 15:44:11.652736539 +0100 
     259+++ traqsr.F90  2020-05-19 11:46:43.209540652 +0100 
     260@@ -111,7 +111,7 @@ 
    261261       REAL(wp) ::   zzc0, zzc1, zzc2, zzc3   !    -         - 
    262262       REAL(wp) ::   zz0 , zz1 , ze3t, zlui   !    -         - 
    263263       REAL(wp) ::   zCb, zCmax, zze, zpsi, zpsimax, zdelpsi, zCtot, zCze 
    264 -      REAL(wp) ::   zlogze, zlogCtot, zlogCze 
    265        REAL(wp) ::   zlogc 
     264-      REAL(wp) ::   zlogc 
     265+      REAL(wp) ::   zlogc, zlogze, zlogCtot, zlogCze 
    266266       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: ze0, ze1, ze2, ze3 
    267267       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdt, zetot, ztmp3d 
    268 @@ -168,21 +167,18 @@ 
     268       !!---------------------------------------------------------------------- 
     269@@ -165,20 +165,24 @@ 
     270          IF( nqsr == np_RGBc ) THEN          !*  Variable Chlorophyll 
     271             CALL fld_read( kt, 1, sf_chl )         ! Read Chl data and provides it at the current time step 
    269272             ! Separation in R-G-B depending of the surface Chl 
     273+            ze0(:,:) = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(:,:,1) ) ) 
    270274             DO_3D_00_00 ( 1, nksr + 1 ) 
    271                 zchl    = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
    272 +               zCze    = 1.12  * zchl**0.803 
    273 +               zCtot   = 40.6  * zchl**0.459 
    274                 zlogc   = LOG( zchl ) 
    275 -               zlogCze = 0.113328685307 + 0.803 * zlogc   ! log(zCze  = 1.12  * zchl**0.803) 
    276 -               zlogCtot= 3.703768066608 + 0.459 * zlogc   ! log(zCtot = 40.6  * zchl**0.459) 
     275-               zchl    = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
     276-               zCze    = 1.12  * zchl**0.803 
     277-               zCtot   = 40.6  * zchl**0.459 
     278-               zlogc   = LOG( zchl ) 
     279+               ! zchl    = ze0(ji,jj) 
     280+               zlogc   = LOG( ze0(ji,jj) ) 
     281+               zlogCze = 0.113328685307 + 0.803 * zlogc   ! log(zCze  = 1.12  * zchl**0.803) 
     282+               zlogCtot= 3.703768066608 + 0.459 * zlogc   ! log(zCtot = 40.6  * zchl**0.459) 
    277283                ! 
    278284                zCb     = 0.768 + zlogc * ( 0.087 - zlogc * ( 0.179 + zlogc * 0.025 ) ) 
     
    281287                zdelpsi = 0.710 + zlogc * ( 0.159 + zlogc * 0.021 ) 
    282288                ! 
    283 -               zlogze  = 6.34247346942 - 0.746 * zlogCtot ! log(zze = 568.2 * zCtot**(-0.746)) 
    284 -               IF( zlogze > 4.62497281328 ) zlogze = 5.298317366548 - 0.293 * zlogCtot 
    285 -                                                          ! log(IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293)) 
    286 -               zze  = EXP( zlogze ) 
    287 -               zpsi = gdepw(ji,jj,jk,Kmm) / zze 
    288 -               zCze = EXP( zlogCze ) 
    289 +               zze     = 568.2 * zCtot**(-0.746) 
    290 +               IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293) 
    291 +               zpsi    = gdepw(ji,jj,jk,Kmm) / zze 
     289-               zze     = 568.2 * zCtot**(-0.746) 
     290-               IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293) 
     291-               zpsi    = gdepw(ji,jj,jk,Kmm) / zze 
     292+               zlogze  = 6.34247346942 - 0.746 * zlogCtot ! log(zze = 568.2 * zCtot**(-0.746)) 
     293+               IF( zlogze > 4.62497281328 ) zlogze = 5.298317366548 - 0.293 * zlogCtot 
     294+                                                          ! log(IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293)) 
     295+               zze  = EXP( zlogze ) 
     296+               zpsi = gdepw(ji,jj,jk,Kmm) / zze 
     297+               zCze = EXP( zlogCze ) 
    292298                ! 
    293299                ! NB. make sure zchl value is such that: zchl = MIN( 10. , MAX( 0.03, zchl ) ) 
    294300                zchl = MIN( 10. , MAX( 0.03, zCze * ( zCb + zCmax * EXP( -( (zpsi - zpsimax) / zdelpsi )**2 ) ) ) ) 
     301@@ -207,7 +211,7 @@ 
     302             ztmp3d(ji,jj,1) =       qsr(ji,jj) 
     303          END_2D 
     304          ! 
     305-         !* interior equi-partition in R-G-B depending of vertical profile of Chl 
     306+         !* interior equi-partition in R-G-B depending on vertical profile of Chl 
     307          DO_3D_00_00 ( 2, nksr + 1 ) 
     308             ze3t = e3t(ji,jj,jk-1,Kmm) 
     309             irgb = NINT( ztmp3d(ji,jj,jk) ) 
    295310}}} 
    296311 
     
    317332{{{#!diff 
    318333--- ORG/traqsr.F90      2020-05-13 11:37:57.094258396 +0100 
    319 +++ traqsr.F90  2020-05-19 10:28:06.858457146 +0100 
    320 @@ -109,12 +109,12 @@ 
     334+++ traqsr.F90  2020-05-19 11:46:43.209540652 +0100 
     335@@ -109,12 +109,11 @@ 
    321336       REAL(wp) ::   zchl, zcoef, z1_2        ! local scalars 
    322337       REAL(wp) ::   zc0 , zc1 , zc2 , zc3    !    -         - 
     
    329344-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ze0, ze1, ze2, ze3, zea, ztrdt 
    330345-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zetot, zchl3d 
    331 +      REAL(wp) ::   zlogze, zlogCtot, zlogCze 
    332 +      REAL(wp) ::   zlogc 
     346+      REAL(wp) ::   zlogc, zlogze, zlogCtot, zlogCze 
    333347+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: ze0, ze1, ze2, ze3 
    334348+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdt, zetot, ztmp3d 
     
    336350       ! 
    337351       IF( ln_timing )   CALL timing_start('tra_qsr') 
    338 @@ -159,77 +159,78 @@ 
     352@@ -159,77 +158,79 @@ 
    339353          ! 
    340354       CASE( np_RGB , np_RGBc )         !==  R-G-B fluxes  ==! 
     
    350364             CALL fld_read( kt, 1, sf_chl )         ! Read Chl data and provides it at the current time step 
    351365+            ! Separation in R-G-B depending of the surface Chl 
     366+            ze0(:,:) = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(:,:,1) ) ) 
    352367+            DO_3D_00_00 ( 1, nksr + 1 ) 
    353 +               zchl    = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
    354 +               zlogc   = LOG( zchl ) 
     368+               ! zchl    = ze0(ji,jj) 
     369+               zlogc   = LOG( ze0(ji,jj) ) 
    355370+               zlogCze = 0.113328685307 + 0.803 * zlogc   ! log(zCze  = 1.12  * zchl**0.803) 
    356371+               zlogCtot= 3.703768066608 + 0.459 * zlogc   ! log(zCtot = 40.6  * zchl**0.459) 
     
    446461-            END_2D 
    447462-         END DO 
    448 +         !* interior equi-partition in R-G-B depending of vertical profile of Chl 
     463+         !* interior equi-partition in R-G-B depending on vertical profile of Chl 
    449464+         DO_3D_00_00 ( 2, nksr + 1 ) 
    450465+            ze3t = e3t(ji,jj,jk-1,Kmm) 
     
    470485          ! 
    471486       CASE( np_2BD  )            !==  2-bands fluxes  ==! 
     487          ! 
    472488}}} 
    473489[[Image(percent_cpu_qsr.3.png)]]