Changeset 15704
- Timestamp:
- 2022-02-17T09:06:50+01:00 (2 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0.4_FOAM_pcbias/src/OCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_FOAM_pcbias/src/OCE/ASM/bias.F90
r15602 r15704 59 59 !! bias_opn : open bias files for restart capabilities 60 60 !! bias_wrt : write bias fies " " " 61 !! bias_deallocate : deallocate variables 61 62 !!---------------------------------------------------------------------- 62 63 !! * Modules used … … 108 109 & dyn_bias, & !: " density correction for pressure gradient. 109 110 & bias_opn, & 110 & bias_wrt 111 & bias_wrt, & 112 & bias_deallocate 111 113 112 114 !! * Shared variables … … 516 518 ! Use the inertial ramp. 517 519 lenscl_bias = ( rn_maxlat_bias - rn_minlat_bias )*2._wp 520 fbcoef(:,:) = 1._wp - exp( -( abs( gphit(:,:) ) - rn_minlat_bias ) & 521 * ( abs( gphit(:,:) ) - rn_minlat_bias ) / lenscl_bias ) 518 522 WHERE ( abs( gphit(:,:) ) <= rn_minlat_bias ) 519 523 fbcoef(:,:) = 0._wp 520 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 521 fbcoef(:,:) = 1._wp 522 ELSEWHERE 523 fbcoef(:,:) = 1._wp - exp( -( abs( gphit(:,:) ) - rn_minlat_bias ) & 524 * ( abs( gphit(:,:) ) - rn_minlat_bias ) / lenscl_bias ) 524 ENDWHERE 525 WHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 526 fbcoef(:,:) = 1._wp 525 527 ENDWHERE 526 528 ELSEIF ( nn_lat_ramp == 2 ) THEN 527 529 ! Use a linear ramp consist with the geostrophic velocity balance ramp in NEMOVAR 528 530 fbcoef(:,:) = 1._wp - ((rn_maxlat_bias - abs( gphit(:,:)))/(rn_maxlat_bias - rn_minlat_bias)) 529 531 WHERE ( abs( gphit(:,:) ) <= rn_minlat_bias ) 530 532 fbcoef(:,:) = 0._wp 531 ELSEWHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 533 ENDWHERE 534 WHERE ( abs( gphit(:,:) ) >= rn_maxlat_bias ) 532 535 fbcoef(:,:) = 1._wp 533 ELSEWHERE534 fbcoef(:,:) = 1._wp - ((rn_maxlat_bias - abs( gphit(:,:)))/(rn_maxlat_bias - rn_minlat_bias))535 536 ENDWHERE 536 537 ELSE … … 544 545 minlat_bias = 3.0_wp 545 546 maxlat_bias = 8.0_wp 547 fbcoef_stscale(:,:)=1._wp - ((maxlat_bias - abs( gphit(:,:)))/(maxlat_bias-minlat_bias)) 546 548 WHERE ( abs( gphit(:,:) ) <= minlat_bias ) 547 549 fbcoef_stscale(:,:)=0._wp 548 ELSEWHERE ( abs( gphit(:,:) ) >= maxlat_bias ) 550 ENDWHERE 551 WHERE ( abs( gphit(:,:) ) >= maxlat_bias ) 549 552 fbcoef_stscale(:,:)=1._wp 550 ELSEWHERE551 fbcoef_stscale(:,:)=1._wp - ((maxlat_bias - abs( gphit(:,:)))/(maxlat_bias-minlat_bias))552 553 ENDWHERE 553 554 ENDIF … … 1011 1012 END SUBROUTINE bias_wrt 1012 1013 1014 1015 SUBROUTINE bias_deallocate 1016 !!--------------------------------------------------------------------- 1017 !! *** ROUTINE bias_deallocate *** 1018 !! 1019 !! ** Purpose : Deallocate bias fields 1020 !! 1021 !! 1022 !!---------------------------------------------------------------------- 1023 !!---------------------------------------------------------------------- 1024 ! 1025 IF ( ALLOCATED( tbias ) ) DEALLOCATE( tbias ) 1026 IF ( ALLOCATED( sbias ) ) DEALLOCATE( sbias ) 1027 IF ( ALLOCATED( tbias_p ) ) DEALLOCATE( tbias_p ) 1028 IF ( ALLOCATED( sbias_p ) ) DEALLOCATE( sbias_p ) 1029 IF ( ALLOCATED( tbias_i ) ) DEALLOCATE( tbias_i ) 1030 IF ( ALLOCATED( sbias_i ) ) DEALLOCATE( sbias_i ) 1031 IF ( ALLOCATED( rhd_pc ) ) DEALLOCATE( rhd_pc ) 1032 IF ( ALLOCATED( fbcoef ) ) DEALLOCATE( fbcoef ) 1033 IF ( ALLOCATED( fbcoef_stscale ) ) DEALLOCATE( fbcoef_stscale ) 1034 IF ( ALLOCATED( tbias_asm ) ) DEALLOCATE( tbias_asm ) 1035 IF ( ALLOCATED( sbias_asm ) ) DEALLOCATE( sbias_asm ) 1036 IF ( ALLOCATED( tbias_asm_out ) ) DEALLOCATE( tbias_asm_out ) 1037 IF ( ALLOCATED( sbias_asm_out ) ) DEALLOCATE( sbias_asm_out ) 1038 IF ( ALLOCATED( tbias_p_out ) ) DEALLOCATE( tbias_p_out ) 1039 IF ( ALLOCATED( sbias_p_out ) ) DEALLOCATE( sbias_p_out ) 1040 IF ( ALLOCATED( tbias_rlx ) ) DEALLOCATE( tbias_rlx ) 1041 IF ( ALLOCATED( sbias_rlx ) ) DEALLOCATE( sbias_rlx ) 1042 IF ( ALLOCATED( tbias_rlx_out ) ) DEALLOCATE( tbias_rlx_out ) 1043 IF ( ALLOCATED( sbias_rlx_out ) ) DEALLOCATE( sbias_rlx_out ) 1044 IF ( ALLOCATED( tbias_asm_stscale ) ) DEALLOCATE( tbias_asm_stscale ) 1045 IF ( ALLOCATED( sbias_asm_stscale ) ) DEALLOCATE( sbias_asm_stscale ) 1046 IF ( ALLOCATED( tbias_asm_stscale_out ) ) DEALLOCATE( tbias_asm_stscale_out ) 1047 IF ( ALLOCATED( sbias_asm_stscale_out ) ) DEALLOCATE( sbias_asm_stscale_out ) 1048 IF ( ALLOCATED( tbias_i_out ) ) DEALLOCATE( tbias_i_out ) 1049 IF ( ALLOCATED( sbias_i_out ) ) DEALLOCATE( sbias_i_out ) 1050 IF ( ALLOCATED( sf_tbias_ofl ) ) DEALLOCATE( sf_tbias_ofl ) 1051 IF ( ALLOCATED( sf_sbias_ofl ) ) DEALLOCATE( sf_sbias_ofl ) 1052 ! 1053 END SUBROUTINE bias_deallocate 1054 1013 1055 END MODULE bias -
NEMO/branches/UKMO/NEMO_4.0.4_FOAM_pcbias/src/OCE/nemogcm.F90
r15359 r15704 215 215 ! 216 216 IF( ln_icebergs ) CALL icb_end( nitend ) 217 217 ! 218 IF( lk_asminc ) CALL bias_deallocate 219 ! 218 220 ! !------------------------! 219 221 ! !== finalize the run ==!
Note: See TracChangeset
for help on using the changeset viewer.