Changeset 9333


Ignore:
Timestamp:
2018-02-19T16:15:56+01:00 (2 years ago)
Author:
dford
Message:

Some minor tidying.

Location:
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90

    r9326 r9333  
    864864            ! reset to zero at the start of trc_stp, called after this routine 
    865865#if defined key_medusa && defined key_foam_medusa 
    866             DO jk = 1, jpkm1 
    867                trn(:,:,jk,jp_msa0:jp_msa1) = trn(:,:,jk,jp_msa0:jp_msa1) + & 
    868                   &                          phyto2d_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt 
    869                trb(:,:,jk,jp_msa0:jp_msa1) = trb(:,:,jk,jp_msa0:jp_msa1) + & 
    870                   &                          phyto2d_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt 
    871             END DO 
     866            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. & 
     867               &   trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp ) 
     868               trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + & 
     869                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt 
     870               trb(:,:,:,jp_msa0:jp_msa1) = trb(:,:,:,jp_msa0:jp_msa1) + & 
     871                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt 
     872            END WHERE 
    872873#elif defined key_hadocc 
    873             DO jk = 1, jpkm1 
    874                trn(:,:,jk,jp_had0:jp_had1) = trn(:,:,jk,jp_had0:jp_had1) + & 
    875                   &                          phyto2d_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt 
    876                trb(:,:,jk,jp_had0:jp_had1) = trb(:,:,jk,jp_had0:jp_had1) + & 
    877                   &                          phyto2d_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt 
    878             END DO 
     874            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. & 
     875               &   trn(:,:,:,jp_had0:jp_had1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp ) 
     876               trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + & 
     877                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) * zincwgt 
     878               trb(:,:,:,jp_had0:jp_had1) = trb(:,:,:,jp_had0:jp_had1) + & 
     879                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) * zincwgt 
     880            END WHERE 
    879881#endif 
    880882 
     
    893895            neuler = 0                    ! Force Euler forward step 
    894896 
    895 #if defined key_medusa && defined key_foam_medusa 
    896897            ! Initialize the now fields with the background + increment 
    897898            ! Background currently is what the model is initialised with 
    898             CALL ctl_warn( ' Doing direct initialisation of MEDUSA with chlorophyll assimilation', & 
     899            CALL ctl_warn( ' Doing direct initialisation with phyto2d assimilation', & 
    899900               &           ' Background state is taken from model rather than background file' ) 
    900             trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + & 
    901                &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) 
    902             trb(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) 
     901#if defined key_medusa && defined key_foam_medusa 
     902            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. & 
     903               &   trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp ) 
     904               trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + & 
     905                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) 
     906               trb(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) 
     907            END WHERE 
    903908#elif defined key_hadocc 
    904             ! Initialize the now fields with the background + increment 
    905             ! Background currently is what the model is initialised with 
    906             CALL ctl_warn( ' Doing direct initialisation of HadOCC with chlorophyll assimilation', & 
    907                &           ' Background state is taken from model rather than background file' ) 
    908             trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + & 
    909                &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) 
    910             trb(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) 
     909            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. & 
     910               &   trn(:,:,:,jp_had0:jp_had1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp ) 
     911               trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + & 
     912                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) 
     913               trb(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) 
     914            END WHERE 
    911915#endif 
    912916  
  • branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r9326 r9333  
    12311231      icycper = SIZE( wgtiau ) 
    12321232       
    1233       ! Ocean colour variables first (chlorophyll profiles?) 
     1233      ! Ocean colour variables first 
    12341234      IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 
    12351235         & ln_schltotinc  .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 
    12361236         & ln_slphynoninc ) THEN 
    12371237         CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
    1238       ENDIF 
    1239        
    1240       IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 
    1241          CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
    12421238      ENDIF 
    12431239       
     
    12541250      ENDIF 
    12551251       
     1252      ! Then chlorophyll profiles 
     1253      IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 
     1254         CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
     1255      ENDIF 
     1256       
    12561257      ! Remaining bgc profile variables 
    12571258      IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 
Note: See TracChangeset for help on using the changeset viewer.