Changeset 11963 for NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbccpl.F90
- Timestamp:
- 2019-11-26T12:08:01+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbccpl.F90
r11831 r11963 453 453 CASE( 'conservative' ) 454 454 srcv( (/jpr_rain, jpr_snow, jpr_ievp, jpr_tevp/) )%laction = .TRUE. 455 IF 455 IF( k_ice <= 1 ) srcv(jpr_ievp)%laction = .FALSE. 456 456 CASE( 'oce and ice' ) ; srcv( (/jpr_ievp, jpr_sbpr, jpr_semp, jpr_oemp/) )%laction = .TRUE. 457 457 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' ) … … 558 558 srcv(jpr_botm )%clname = 'OBotMlt' 559 559 IF( TRIM(sn_rcv_iceflx%cldes) == 'coupled' ) THEN 560 IF 560 IF( TRIM( sn_rcv_iceflx%clcat ) == 'yes' ) THEN 561 561 srcv(jpr_topm:jpr_botm)%nct = nn_cats_cpl 562 562 ELSE … … 569 569 ! ! ------------------------- ! 570 570 srcv(jpr_ts_ice)%clname = 'OTsfIce' ! needed by Met Office 571 IF 572 IF 573 IF 571 IF( TRIM( sn_rcv_ts_ice%cldes ) == 'ice' ) srcv(jpr_ts_ice)%laction = .TRUE. 572 IF( TRIM( sn_rcv_ts_ice%clcat ) == 'yes' ) srcv(jpr_ts_ice)%nct = nn_cats_cpl 573 IF( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = nn_cats_cpl 574 574 575 575 ! ! ------------------------- ! … … 693 693 ! for example O_Runoff received by OPA from SAS and therefore O_Runoff received by SAS from the Atmosphere 694 694 DO jn = 1, jprcv 695 IF 695 IF( srcv(jn)%clname(1:1) == "O" ) srcv(jn)%clname = "S"//srcv(jn)%clname(2:LEN(srcv(jn)%clname)) 696 696 END DO 697 697 ! … … 720 720 ! =================================================== ! 721 721 DO jn = 1, jprcv 722 IF 722 IF( srcv(jn)%laction ) ALLOCATE( frcv(jn)%z3(jpi,jpj,srcv(jn)%nct) ) 723 723 END DO 724 724 ! Allocate taum part of frcv which is used even when not received as coupling field 725 IF 725 IF( .NOT. srcv(jpr_taum)%laction ) ALLOCATE( frcv(jpr_taum)%z3(jpi,jpj,srcv(jpr_taum)%nct) ) 726 726 ! Allocate w10m part of frcv which is used even when not received as coupling field 727 IF 727 IF( .NOT. srcv(jpr_w10m)%laction ) ALLOCATE( frcv(jpr_w10m)%z3(jpi,jpj,srcv(jpr_w10m)%nct) ) 728 728 ! Allocate jpr_otx1 part of frcv which is used even when not received as coupling field 729 IF 730 IF 729 IF( .NOT. srcv(jpr_otx1)%laction ) ALLOCATE( frcv(jpr_otx1)%z3(jpi,jpj,srcv(jpr_otx1)%nct) ) 730 IF( .NOT. srcv(jpr_oty1)%laction ) ALLOCATE( frcv(jpr_oty1)%z3(jpi,jpj,srcv(jpr_oty1)%nct) ) 731 731 ! Allocate itx1 and ity1 as they are used in sbc_cpl_ice_tau even if srcv(jpr_itx1)%laction = .FALSE. 732 732 IF( k_ice /= 0 ) THEN 733 IF 734 IF 735 END 733 IF( .NOT. srcv(jpr_itx1)%laction ) ALLOCATE( frcv(jpr_itx1)%z3(jpi,jpj,srcv(jpr_itx1)%nct) ) 734 IF( .NOT. srcv(jpr_ity1)%laction ) ALLOCATE( frcv(jpr_ity1)%z3(jpi,jpj,srcv(jpr_ity1)%nct) ) 735 ENDIF 736 736 737 737 ! ================================ ! … … 757 757 CASE( 'oce and ice' , 'weighted oce and ice' , 'oce and weighted ice' ) 758 758 ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE. 759 IF 759 IF( TRIM( sn_snd_temp%clcat ) == 'yes' ) ssnd(jps_tice)%nct = nn_cats_cpl 760 760 CASE( 'mixed oce-ice' ) ; ssnd( jps_tmix )%laction = .TRUE. 761 761 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' ) … … 777 777 ! 1. sending mixed oce-ice albedo or 778 778 ! 2. receiving mixed oce-ice solar radiation 779 IF 779 IF( TRIM ( sn_snd_alb%cldes ) == 'mixed oce-ice' .OR. TRIM ( sn_rcv_qsr%cldes ) == 'mixed oce-ice' ) THEN 780 780 CALL oce_alb( zaos, zacs ) 781 781 ! Due to lack of information on nebulosity : mean clear/overcast sky … … 796 796 ssnd(jps_fice1)%laction = .TRUE. ! First-order regridded ice concentration, to be used producing atmos-to-ice fluxes (Met Office requirement) 797 797 ! Currently no namelist entry to determine sending of multi-category ice fraction so use the thickness entry for now 798 IF 799 IF 798 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_fice)%nct = nn_cats_cpl 799 IF( TRIM( sn_snd_thick1%clcat ) == 'yes' ) ssnd(jps_fice1)%nct = nn_cats_cpl 800 800 ENDIF 801 801 802 IF 802 IF(TRIM( sn_snd_ifrac%cldes ) == 'coupled') ssnd(jps_ficet)%laction = .TRUE. 803 803 804 804 SELECT CASE ( TRIM( sn_snd_thick%cldes ) ) … … 806 806 CASE( 'ice and snow' ) 807 807 ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 808 IF 808 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN 809 809 ssnd(jps_hice:jps_hsnw)%nct = nn_cats_cpl 810 810 ENDIF 811 811 CASE ( 'weighted ice and snow' ) 812 812 ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 813 IF 813 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_hice:jps_hsnw)%nct = nn_cats_cpl 814 814 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_thick%cldes' ) 815 815 END SELECT … … 828 828 ssnd(jps_a_p)%laction = .TRUE. 829 829 ssnd(jps_ht_p)%laction = .TRUE. 830 IF 830 IF( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN 831 831 ssnd(jps_a_p)%nct = nn_cats_cpl 832 832 ssnd(jps_ht_p)%nct = nn_cats_cpl 833 833 ELSE 834 IF 834 IF( nn_cats_cpl > 1 ) THEN 835 835 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_mpnd%cldes if not exchanging category fields' ) 836 836 ENDIF … … 839 839 ssnd(jps_a_p)%laction = .TRUE. 840 840 ssnd(jps_ht_p)%laction = .TRUE. 841 IF 841 IF( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN 842 842 ssnd(jps_a_p)%nct = nn_cats_cpl 843 843 ssnd(jps_ht_p)%nct = nn_cats_cpl … … 914 914 CASE ( 'ice only' ) 915 915 ssnd(jps_ttilyr)%laction = .TRUE. 916 IF 916 IF( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) THEN 917 917 ssnd(jps_ttilyr)%nct = nn_cats_cpl 918 918 ELSE 919 IF 919 IF( nn_cats_cpl > 1 ) THEN 920 920 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_ttilyr%cldes if not exchanging category fields' ) 921 921 ENDIF … … 923 923 CASE ( 'weighted ice' ) 924 924 ssnd(jps_ttilyr)%laction = .TRUE. 925 IF 925 IF( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) ssnd(jps_ttilyr)%nct = nn_cats_cpl 926 926 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_ttilyr%cldes;'//sn_snd_ttilyr%cldes ) 927 927 END SELECT … … 933 933 CASE ( 'ice only' ) 934 934 ssnd(jps_kice)%laction = .TRUE. 935 IF 935 IF( TRIM( sn_snd_cond%clcat ) == 'yes' ) THEN 936 936 ssnd(jps_kice)%nct = nn_cats_cpl 937 937 ELSE 938 IF 938 IF( nn_cats_cpl > 1 ) THEN 939 939 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_cond%cldes if not exchanging category fields' ) 940 940 ENDIF … … 942 942 CASE ( 'weighted ice' ) 943 943 ssnd(jps_kice)%laction = .TRUE. 944 IF 944 IF( TRIM( sn_snd_cond%clcat ) == 'yes' ) ssnd(jps_kice)%nct = nn_cats_cpl 945 945 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_cond%cldes;'//sn_snd_cond%cldes ) 946 946 END SELECT … … 1003 1003 ! for example O_SSTSST sent by OPA to SAS and therefore S_SSTSST sent by SAS to the Atmosphere 1004 1004 DO jn = 1, jpsnd 1005 IF 1005 IF( ssnd(jn)%clname(1:1) == "O" ) ssnd(jn)%clname = "S"//ssnd(jn)%clname(2:LEN(ssnd(jn)%clname)) 1006 1006 END DO 1007 1007 ! … … 1030 1030 CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 1031 1031 1032 IF 1032 IF(ln_usecplmask) THEN 1033 1033 xcplmask(:,:,:) = 0. 1034 1034 CALL iom_open( 'cplmask', inum ) … … 1266 1266 1267 1267 IF( kt == nit000 ) ssh_ibb(:,:) = ssh_ib(:,:) ! correct this later (read from restart if possible) 1268 END 1268 ENDIF 1269 1269 ! 1270 1270 IF( ln_sdw ) THEN ! Stokes Drift correction activated … … 1415 1415 ELSE IF( srcv(jpr_qnsmix)%laction ) THEN ; zqns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1416 1416 ELSE ; zqns(:,:) = 0._wp 1417 END 1417 ENDIF 1418 1418 ! update qns over the free ocean with: 1419 1419 IF( nn_components /= jp_iam_opa ) THEN … … 1687 1687 ! --- evaporation over ice (kg/m2/s) --- ! 1688 1688 DO jl=1,jpl 1689 IF 1689 IF(sn_rcv_emp%clcat == 'yes') THEN ; zevap_ice(:,:,jl) = frcv(jpr_ievp)%z3(:,:,jl) 1690 1690 ELSE ; zevap_ice(:,:,jl) = frcv(jpr_ievp)%z3(:,:,1 ) ; ENDIF 1691 1691 ENDDO … … 1786 1786 CASE( 'conservative' ) ! the required fields are directly provided 1787 1787 zqns_tot(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1788 IF 1788 IF( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1789 1789 zqns_ice(:,:,1:jpl) = frcv(jpr_qnsice)%z3(:,:,1:jpl) 1790 1790 ELSE … … 1795 1795 CASE( 'oce and ice' ) ! the total flux is computed from ocean and ice fluxes 1796 1796 zqns_tot(:,:) = ziceld(:,:) * frcv(jpr_qnsoce)%z3(:,:,1) 1797 IF 1797 IF( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1798 1798 DO jl=1,jpl 1799 1799 zqns_tot(:,: ) = zqns_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qnsice)%z3(:,:,jl) … … 1897 1897 #endif 1898 1898 ! outputs 1899 IF 1900 IF 1901 IF 1902 IF 1899 IF( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , - frcv(jpr_cal)%z3(:,:,1) * rLfus ) ! latent heat from calving 1900 IF( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * rLfus ) ! latent heat from icebergs melting 1901 IF( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea' , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) ! heat flux from rain (cell average) 1902 IF( iom_use('hflx_evap_cea') ) CALL iom_put('hflx_evap_cea' , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) & 1903 1903 & * picefr(:,:) ) * zcptn(:,:) * tmask(:,:,1) ) ! heat flux from evap (cell average) 1904 IF 1905 IF 1904 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) ) ! heat flux from snow (cell average) 1905 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1906 1906 & * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 1907 IF 1907 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1908 1908 & * zsnw(:,:) ) ! heat flux from snow (over ice) 1909 1909 ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. … … 1916 1916 CASE( 'conservative' ) 1917 1917 zqsr_tot(:,: ) = frcv(jpr_qsrmix)%z3(:,:,1) 1918 IF 1918 IF( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1919 1919 zqsr_ice(:,:,1:jpl) = frcv(jpr_qsrice)%z3(:,:,1:jpl) 1920 1920 ELSE … … 1928 1928 CASE( 'oce and ice' ) 1929 1929 zqsr_tot(:,: ) = ziceld(:,:) * frcv(jpr_qsroce)%z3(:,:,1) 1930 IF 1930 IF( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1931 1931 DO jl = 1, jpl 1932 1932 zqsr_tot(:,: ) = zqsr_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qsrice)%z3(:,:,jl) … … 1984 1984 ! ! ========================= ! 1985 1985 CASE ('coupled') 1986 IF 1986 IF( TRIM(sn_rcv_dqnsdt%clcat) == 'yes' ) THEN 1987 1987 zdqns_ice(:,:,1:jpl) = frcv(jpr_dqnsdt)%z3(:,:,1:jpl) 1988 1988 ELSE … … 2062 2062 IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 2063 2063 2064 IF 2064 IF( nn_components == jp_iam_opa ) THEN 2065 2065 ztmp1(:,:) = tsn(:,:,1,jp_tem) ! send temperature as it is (potential or conservative) -> use of l_useCT on the received part 2066 2066 ELSE … … 2467 2467 IF( ssnd(jps_ficet)%laction ) THEN 2468 2468 CALL cpl_snd( jps_ficet, isec, RESHAPE ( fr_i, (/jpi,jpj,1/) ), info ) 2469 END 2469 ENDIF 2470 2470 ! ! ------------------------- ! 2471 2471 ! ! Water levels to waves ! … … 2482 2482 ENDIF 2483 2483 CALL cpl_snd( jps_wlev , isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 2484 END 2484 ENDIF 2485 2485 ! 2486 2486 ! Fields sent by OPA to SAS when doing OPA<->SAS coupling
Note: See TracChangeset
for help on using the changeset viewer.