- Timestamp:
- 2011-06-27T13:18:25+02:00 (13 years ago)
- Location:
- branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM
- Files:
-
- 1 added
- 3 deleted
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/CONFIG/GYRE/EXP00/namelist
r2715 r2789 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO/OPA : 1 - run manager (namrun) 3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, nam dta_tem, namdta_sal)3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, namtsd) 4 4 !! 3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 5 5 !! namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf, … … 51 51 !! namzgr_sco s-coordinate or hybrid z-s-coordinate 52 52 !! namdom space and time domain (bathymetry, mesh, timestep) 53 !! namdta_tem data: temperature ("key_dtatem") 54 !! namdta_sal data: salinity ("key_dtasal") 53 !! namtsd data: temperature & salinity 55 54 !!====================================================================== 56 55 ! … … 94 93 / 95 94 !----------------------------------------------------------------------- 96 &namdta_tem ! data : temperature ("key_dtatem") 97 !----------------------------------------------------------------------- 98 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 99 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 100 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 95 &namtsd ! data : Temperature & Salinity 96 !----------------------------------------------------------------------- 97 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 98 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 99 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 100 sn_sal = 'data_1m_salinity_nomask' , -1,'vosaline', .true. , .true., 'yearly' , '' , ' ' 101 101 ! 102 cn_dir = './' ! root directory for the location of the runoff files 103 / 104 !----------------------------------------------------------------------- 105 &namdta_sal ! data : salinity ("key_dtasal") 106 !----------------------------------------------------------------------- 107 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 108 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 109 sn_sal = 'data_1m_salinity_nomask', -1 ,'vosaline', .true. , .true., 'yearly' , '' , ' ' 110 ! 111 cn_dir = './' ! root directory for the location of the runoff files 112 / 113 102 cn_dir = './' ! root directory for the location of the runoff files 103 ln_tsd_init = .false. ! Initialisation of ocean T & S with T &S input data (T) or not (F) 104 ln_tsd_tradmp = .false. ! damping of ocean T & S toward T &S input data (T) or not (F) 105 / 114 106 !!====================================================================== 115 107 !! *** Surface Boundary Condition namelists *** … … 442 434 !! namtra_adv advection scheme 443 435 !! namtra_ldf lateral diffusion scheme 444 !! namtra_dmp T & S newtonian damping ("key_tradmp")436 !! namtra_dmp T & S newtonian damping 445 437 !!====================================================================== 446 438 ! … … 483 475 / 484 476 !----------------------------------------------------------------------- 485 &namtra_dmp ! tracer: T & S newtonian damping ('key_tradmp') 486 !----------------------------------------------------------------------- 477 &namtra_dmp ! tracer: T & S newtonian damping 478 !----------------------------------------------------------------------- 479 ln_tradmp = .false. ! add a damping termn (T) or not (F) 487 480 nn_hdmp = -1 ! horizontal shape =-1, damping in Med and Red Seas only 488 481 ! =XX, damping poleward of XX degrees (XX>0) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist
r2715 r2789 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO/OPA : 1 - run manager (namrun) 3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, nam dta_tem, namdta_sal)3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, namtsd) 4 4 !! 3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 5 5 !! namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf, … … 51 51 !! namzgr_sco s-coordinate or hybrid z-s-coordinate 52 52 !! namdom space and time domain (bathymetry, mesh, timestep) 53 !! namdta_tem data: temperature ("key_dtatem") 54 !! namdta_sal data: salinity ("key_dtasal") 53 !! namtsd data: temperature & salinity 55 54 !!====================================================================== 56 55 ! … … 94 93 / 95 94 !----------------------------------------------------------------------- 96 &namdta_tem ! data : temperature ("key_dtatem") 97 !----------------------------------------------------------------------- 98 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 99 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 100 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 95 &namtsd ! data : Temperature & Salinity 96 !----------------------------------------------------------------------- 97 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 98 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 99 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 100 sn_sal = 'data_1m_salinity_nomask' , -1,'vosaline', .true. , .true., 'yearly' , '' , ' ' 101 101 ! 102 cn_dir = './' ! root directory for the location of the runoff files 103 / 104 !----------------------------------------------------------------------- 105 &namdta_sal ! data : salinity ("key_dtasal") 106 !----------------------------------------------------------------------- 107 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 108 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 109 sn_sal = 'data_1m_salinity_nomask', -1 ,'vosaline', .true. , .true., 'yearly' , '' , ' ' 110 ! 111 cn_dir = './' ! root directory for the location of the runoff files 112 / 113 102 cn_dir = './' ! root directory for the location of the runoff files 103 ln_tsd_init = .true. ! Initialisation of ocean T & S with T &S input data (T) or not (F) 104 ln_tsd_tradmp = .true. ! damping of ocean T & S toward T &S input data (T) or not (F) 105 / 114 106 !!====================================================================== 115 107 !! *** Surface Boundary Condition namelists *** … … 442 434 !! namtra_adv advection scheme 443 435 !! namtra_ldf lateral diffusion scheme 444 !! namtra_dmp T & S newtonian damping ("key_tradmp")436 !! namtra_dmp T & S newtonian damping 445 437 !!====================================================================== 446 438 ! … … 483 475 / 484 476 !----------------------------------------------------------------------- 485 &namtra_dmp ! tracer: T & S newtonian damping ('key_tradmp') 486 !----------------------------------------------------------------------- 477 &namtra_dmp ! tracer: T & S newtonian damping 478 !----------------------------------------------------------------------- 479 ln_tradmp = .true. ! add a damping termn (T) or not (F) 487 480 nn_hdmp = -1 ! horizontal shape =-1, damping in Med and Red Seas only 488 481 ! =XX, damping poleward of XX degrees (XX>0) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist
r2715 r2789 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO/OPA : 1 - run manager (namrun) 3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, nam dta_tem, namdta_sal)3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, namtsd) 4 4 !! 3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 5 5 !! namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf, … … 51 51 !! namzgr_sco s-coordinate or hybrid z-s-coordinate 52 52 !! namdom space and time domain (bathymetry, mesh, timestep) 53 !! namdta_tem data: temperature ("key_dtatem") 54 !! namdta_sal data: salinity ("key_dtasal") 53 !! namtsd data: temperature & salinity 55 54 !!====================================================================== 56 55 ! … … 94 93 / 95 94 !----------------------------------------------------------------------- 96 &namdta_tem ! data : temperature ("key_dtatem") 97 !----------------------------------------------------------------------- 98 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 99 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 100 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 95 &namtsd ! data : Temperature & Salinity 96 !----------------------------------------------------------------------- 97 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 98 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 99 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 100 sn_sal = 'data_1m_salinity_nomask' , -1,'vosaline', .true. , .true., 'yearly' , '' , ' ' 101 101 ! 102 cn_dir = './' ! root directory for the location of the runoff files 103 / 104 !----------------------------------------------------------------------- 105 &namdta_sal ! data : salinity ("key_dtasal") 106 !----------------------------------------------------------------------- 107 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 108 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 109 sn_sal = 'data_1m_salinity_nomask', -1 ,'vosaline', .true. , .true., 'yearly' , '' , ' ' 110 ! 111 cn_dir = './' ! root directory for the location of the runoff files 112 / 113 102 cn_dir = './' ! root directory for the location of the runoff files 103 ln_tsd_init = .false. ! Initialisation of ocean T & S with T &S input data (T) or not (F) 104 ln_tsd_tradmp = .false. ! damping of ocean T & S toward T &S input data (T) or not (F) 105 / 114 106 !!====================================================================== 115 107 !! *** Surface Boundary Condition namelists *** … … 442 434 !! namtra_adv advection scheme 443 435 !! namtra_ldf lateral diffusion scheme 444 !! namtra_dmp T & S newtonian damping ("key_tradmp")436 !! namtra_dmp T & S newtonian damping 445 437 !!====================================================================== 446 438 … … 483 475 / 484 476 !----------------------------------------------------------------------- 485 &namtra_dmp ! tracer: T & S newtonian damping ('key_tradmp') 486 !----------------------------------------------------------------------- 477 &namtra_dmp ! tracer: T & S newtonian damping 478 !----------------------------------------------------------------------- 479 ln_tradmp = .false. ! add a damping termn (T) or not (F) 487 480 nn_hdmp = -1 ! horizontal shape =-1, damping in Med and Red Seas only 488 481 ! =XX, damping poleward of XX degrees (XX>0) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/CONFIG/POMME/EXP00/namelist
r2650 r2789 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO/OPA : 1 - run manager (namrun) 3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, nam dta_tem, namdta_sal)3 !! namelists 2 - Domain (namzgr, namzgr_sco, namdom, namtsd) 4 4 !! 3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 5 5 !! namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf, … … 51 51 !! namzgr_sco s-coordinate or hybrid z-s-coordinate 52 52 !! namdom space and time domain (bathymetry, mesh, timestep) 53 !! namdta_tem data: temperature ("key_dtatem") 54 !! namdta_sal data: salinity ("key_dtasal") 53 !! namtsd data: temperature & salinity 55 54 !!====================================================================== 56 55 ! … … 94 93 / 95 94 !----------------------------------------------------------------------- 96 &namdta_tem ! data : temperature ("key_dtatem") 97 !----------------------------------------------------------------------- 98 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 99 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 100 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 95 &namtsd ! data : Temperature & Salinity 96 !----------------------------------------------------------------------- 97 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 98 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 99 sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper', .true. , .true., 'yearly' , ' ' , ' ' 100 sn_sal = 'data_1m_salinity_nomask' , -1,'vosaline', .true. , .true., 'yearly' , '' , ' ' 101 101 ! 102 cn_dir = './' ! root directory for the location of the runoff files 103 / 104 !----------------------------------------------------------------------- 105 &namdta_sal ! data : salinity ("key_dtasal") 106 !----------------------------------------------------------------------- 107 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 108 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 109 sn_sal = 'data_1m_salinity_nomask', -1 ,'vosaline', .true. , .true., 'yearly' , '' , ' ' 110 ! 111 cn_dir = './' ! root directory for the location of the runoff files 112 / 113 102 cn_dir = './' ! root directory for the location of the runoff files 103 ln_tsd_init = .true. ! Initialisation of ocean T & S with T &S input data (T) or not (F) 104 ln_tsd_tradmp = .false. ! damping of ocean T & S toward T &S input data (T) or not (F) 105 / 114 106 !!====================================================================== 115 107 !! *** Surface Boundary Condition namelists *** … … 442 434 !! namtra_adv advection scheme 443 435 !! namtra_ldf lateral diffusion scheme 444 !! namtra_dmp T & S newtonian damping ("key_tradmp")436 !! namtra_dmp T & S newtonian damping 445 437 !!====================================================================== 446 438 ! … … 483 475 / 484 476 !----------------------------------------------------------------------- 485 &namtra_dmp ! tracer: T & S newtonian damping ('key_tradmp') 486 !----------------------------------------------------------------------- 477 &namtra_dmp ! tracer: T & S newtonian damping 478 !----------------------------------------------------------------------- 479 ln_tradmp = .false. ! add a damping termn (T) or not (F) 487 480 nn_hdmp = 1 ! horizontal shape =-1, damping in Med and Red Seas only 488 481 ! =XX, damping poleward of XX degrees (XX>0) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/LIM_SRC_2/limistate_2.F90
r2528 r2789 70 70 IF( .NOT. ln_limini ) THEN 71 71 72 tfu(:,:) = tfreez( sn(:,:,1) ) * tmask(:,:,1) ! freezing/melting point of sea water [Celcius]72 tfu(:,:) = tfreez( tsn(:,:,1,jp_sal) ) * tmask(:,:,1) ! freezing/melting point of sea water [Celcius] 73 73 74 74 DO jj = 1, jpj 75 75 DO ji = 1, jpi 76 76 ! ! ice if sst <= t-freez + ttest 77 IF( t n(ji,jj,1) - tfu(ji,jj) >= ttest ) THEN ; zidto = 0.e0 ! no ice78 ELSE ; zidto = 1.e0 ! ice77 IF( tsn(ji,jj,1,jp_tem) - tfu(ji,jj) >= ttest ) THEN ; zidto = 0.e0 ! no ice 78 ELSE ; zidto = 1.e0 ! ice 79 79 ENDIF 80 80 ! -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r2777 r2789 98 98 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' 99 99 100 t_bo(:,:) = tfreez( sn(:,:,1) ) * tmask(:,:,1) ! freezing/melting point of sea water [Celcius]100 t_bo(:,:) = tfreez( tsn(:,:,1,jp_sal) ) * tmask(:,:,1) ! freezing/melting point of sea water [Celcius] 101 101 102 102 DO jj = 1, jpj ! ice if sst <= t-freez + ttest 103 103 DO ji = 1, jpi 104 IF( t n(ji,jj,1) - t_bo(ji,jj) >= ttest ) THEN ; zidto(ji,jj) = 0.e0 ! no ice105 ELSE ; zidto(ji,jj) = 1.e0 ! ice104 IF( tsn(ji,jj,1,jp_tem) - t_bo(ji,jj) >= ttest ) THEN ; zidto(ji,jj) = 0.e0 ! no ice 105 ELSE ; zidto(ji,jj) = 1.e0 ! ice 106 106 ENDIF 107 107 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/NST_SRC/agrif_oce.F90
r2715 r2789 35 35 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: spe1ur2, spe2vr2, spbtr3 !: ??? 36 36 37 INTEGER :: t n_id, sn_id, tb_id, sb_id, ta_id,sa_id37 INTEGER :: tsn_id,tsb_id,tsa_id 38 38 INTEGER :: un_id, vn_id, ua_id, va_id 39 39 INTEGER :: e1u_id, e2v_id, sshn_id, gcb_id -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
r2715 r2789 48 48 !!---------------------------------------------------------------------- 49 49 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 50 USE wrk_nemo, ONLY: wrk_ 3d_1, wrk_3d_250 USE wrk_nemo, ONLY: wrk_4d_1 51 51 !! 52 INTEGER :: ji, jj, jk ! dummy loop indices52 INTEGER :: ji, jj, jk, jn ! dummy loop indices 53 53 REAL(wp) :: zrhox , alpha1, alpha2, alpha3 54 54 REAL(wp) :: alpha4, alpha5, alpha6, alpha7 55 REAL(wp), POINTER, DIMENSION(:,:,: ) :: zta, zsa55 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztsa 56 56 !!---------------------------------------------------------------------- 57 57 ! 58 58 IF( Agrif_Root() ) RETURN 59 59 60 zt a => wrk_3d_1 ; zsa => wrk_3d_261 IF( wrk_in_use( 3, 1,2) )THEN60 ztsa => wrk_4d_1 61 IF( wrk_in_use(4, 1) )THEN 62 62 CALL ctl_stop('agrif_tra: requested workspace arrays unavailable.') 63 63 RETURN … … 66 66 Agrif_SpecialValue = 0.e0 67 67 Agrif_UseSpecialValue = .TRUE. 68 zta(:,:,:) = 0.e0 69 zsa(:,:,:) = 0.e0 70 71 CALL Agrif_Bc_variable( zta, tn_id, procname = interptn ) 72 CALL Agrif_Bc_variable( zsa, sn_id, procname = interpsn ) 68 ztsa(:,:,:,:) = 0.e0 69 70 CALL Agrif_Bc_variable( ztsa, tsn_id, procname=interptsn ) 73 71 Agrif_UseSpecialValue = .FALSE. 74 72 … … 87 85 IF( nbondi == 1 .OR. nbondi == 2 ) THEN 88 86 89 ta(nlci,:,:) = alpha1 * zta(nlci,:,:) + alpha2 * zta(nlci-1,:,:) 90 sa(nlci,:,:) = alpha1 * zsa(nlci,:,:) + alpha2 * zsa(nlci-1,:,:) 91 92 DO jk = 1, jpkm1 93 DO jj = 1, jpj 94 IF( umask(nlci-2,jj,jk) == 0.e0 ) THEN 95 ta(nlci-1,jj,jk) = ta(nlci,jj,jk) * tmask(nlci-1,jj,jk) 96 sa(nlci-1,jj,jk) = sa(nlci,jj,jk) * tmask(nlci-1,jj,jk) 97 ELSE 98 ta(nlci-1,jj,jk)=(alpha4*ta(nlci,jj,jk)+alpha3*ta(nlci-2,jj,jk))*tmask(nlci-1,jj,jk) 99 sa(nlci-1,jj,jk)=(alpha4*sa(nlci,jj,jk)+alpha3*sa(nlci-2,jj,jk))*tmask(nlci-1,jj,jk) 100 IF( un(nlci-2,jj,jk) > 0.e0 ) THEN 101 ta(nlci-1,jj,jk)=( alpha6*ta(nlci-2,jj,jk)+alpha5*ta(nlci,jj,jk) & 102 & + alpha7*ta(nlci-3,jj,jk) ) * tmask(nlci-1,jj,jk) 103 sa(nlci-1,jj,jk)=( alpha6*sa(nlci-2,jj,jk)+alpha5*sa(nlci,jj,jk) & 104 & + alpha7*sa(nlci-3,jj,jk) ) * tmask(nlci-1,jj,jk) 87 DO jn = 1, jpts 88 tsa(nlci,:,:,jn) = alpha1 * ztsa(nlci,:,:,jn) + alpha2 * ztsa(nlci-1,:,:,jn) 89 DO jk = 1, jpkm1 90 DO jj = 1, jpj 91 IF( umask(nlci-2,jj,jk) == 0.e0 ) THEN 92 tsa(nlci-1,jj,jk,jn) = tsa(nlci,jj,jk,jn) * tmask(nlci-1,jj,jk) 93 ELSE 94 tsa(nlci-1,jj,jk,jn)=(alpha4*tsa(nlci,jj,jk,jn)+alpha3*tsa(nlci-2,jj,jk,jn))*tmask(nlci-1,jj,jk) 95 IF( un(nlci-2,jj,jk) > 0.e0 ) THEN 96 tsa(nlci-1,jj,jk,jn)=( alpha6*tsa(nlci-2,jj,jk,jn)+alpha5*tsa(nlci,jj,jk,jn) & 97 & + alpha7*tsa(nlci-3,jj,jk,jn) ) * tmask(nlci-1,jj,jk) 98 ENDIF 105 99 ENDIF 106 END IF107 END DO 108 END 100 END DO 101 END DO 102 ENDDO 109 103 ENDIF 110 104 111 105 IF( nbondj == 1 .OR. nbondj == 2 ) THEN 112 106 113 ta(:,nlcj,:) = alpha1 * zta(:,nlcj,:) + alpha2 * zta(:,nlcj-1,:) 114 sa(:,nlcj,:) = alpha1 * zsa(:,nlcj,:) + alpha2 * zsa(:,nlcj-1,:) 115 116 DO jk = 1, jpkm1 117 DO ji = 1, jpi 118 IF( vmask(ji,nlcj-2,jk) == 0.e0 ) THEN 119 ta(ji,nlcj-1,jk) = ta(ji,nlcj,jk) * tmask(ji,nlcj-1,jk) 120 sa(ji,nlcj-1,jk) = sa(ji,nlcj,jk) * tmask(ji,nlcj-1,jk) 121 ELSE 122 ta(ji,nlcj-1,jk)=(alpha4*ta(ji,nlcj,jk)+alpha3*ta(ji,nlcj-2,jk))*tmask(ji,nlcj-1,jk) 123 sa(ji,nlcj-1,jk)=(alpha4*sa(ji,nlcj,jk)+alpha3*sa(ji,nlcj-2,jk))*tmask(ji,nlcj-1,jk) 124 IF (vn(ji,nlcj-2,jk) > 0.e0 ) THEN 125 ta(ji,nlcj-1,jk)=( alpha6*ta(ji,nlcj-2,jk)+alpha5*ta(ji,nlcj,jk) & 126 & + alpha7*ta(ji,nlcj-3,jk) ) * tmask(ji,nlcj-1,jk) 127 sa(ji,nlcj-1,jk)=( alpha6*sa(ji,nlcj-2,jk)+alpha5*sa(ji,nlcj,jk) & 128 & + alpha7*sa(ji,nlcj-3,jk))*tmask(ji,nlcj-1,jk) 107 DO jn = 1, jpts 108 tsa(:,nlcj,:,jn) = alpha1 * ztsa(:,nlcj,:,jn) + alpha2 * ztsa(:,nlcj-1,:,jn) 109 DO jk = 1, jpkm1 110 DO ji = 1, jpi 111 IF( vmask(ji,nlcj-2,jk) == 0.e0 ) THEN 112 tsa(ji,nlcj-1,jk,jn) = tsa(ji,nlcj,jk,jn) * tmask(ji,nlcj-1,jk) 113 ELSE 114 tsa(ji,nlcj-1,jk,jn)=(alpha4*tsa(ji,nlcj,jk,jn)+alpha3*tsa(ji,nlcj-2,jk,jn))*tmask(ji,nlcj-1,jk) 115 IF (vn(ji,nlcj-2,jk) > 0.e0 ) THEN 116 tsa(ji,nlcj-1,jk,jn)=( alpha6*tsa(ji,nlcj-2,jk,jn)+alpha5*tsa(ji,nlcj,jk,jn) & 117 & + alpha7*tsa(ji,nlcj-3,jk,jn) ) * tmask(ji,nlcj-1,jk) 118 ENDIF 129 119 ENDIF 130 END IF131 END DO 132 END DO120 END DO 121 END DO 122 ENDDO 133 123 ENDIF 134 124 135 125 IF( nbondi == -1 .OR. nbondi == 2 ) THEN 136 ta(1,:,:) = alpha1 * zta(1,:,:) + alpha2 * zta(2,:,:) 137 sa(1,:,:) = alpha1 * zsa(1,:,:) + alpha2 * zsa(2,:,:) 138 DO jk = 1, jpkm1 139 DO jj = 1, jpj 140 IF( umask(2,jj,jk) == 0.e0 ) THEN 141 ta(2,jj,jk) = ta(1,jj,jk) * tmask(2,jj,jk) 142 sa(2,jj,jk) = sa(1,jj,jk) * tmask(2,jj,jk) 143 ELSE 144 ta(2,jj,jk)=(alpha4*ta(1,jj,jk)+alpha3*ta(3,jj,jk))*tmask(2,jj,jk) 145 sa(2,jj,jk)=(alpha4*sa(1,jj,jk)+alpha3*sa(3,jj,jk))*tmask(2,jj,jk) 146 IF( un(2,jj,jk) < 0.e0 ) THEN 147 ta(2,jj,jk)=(alpha6*ta(3,jj,jk)+alpha5*ta(1,jj,jk)+alpha7*ta(4,jj,jk))*tmask(2,jj,jk) 148 sa(2,jj,jk)=(alpha6*sa(3,jj,jk)+alpha5*sa(1,jj,jk)+alpha7*sa(4,jj,jk))*tmask(2,jj,jk) 126 DO jn = 1, jpts 127 tsa(1,:,:,jn) = alpha1 * ztsa(1,:,:,jn) + alpha2 * ztsa(2,:,:,jn) 128 DO jk = 1, jpkm1 129 DO jj = 1, jpj 130 IF( umask(2,jj,jk) == 0.e0 ) THEN 131 tsa(2,jj,jk,jn) = tsa(1,jj,jk,jn) * tmask(2,jj,jk) 132 ELSE 133 tsa(2,jj,jk,jn)=(alpha4*tsa(1,jj,jk,jn)+alpha3*tsa(3,jj,jk,jn))*tmask(2,jj,jk) 134 IF( un(2,jj,jk) < 0.e0 ) THEN 135 tsa(2,jj,jk,jn)=(alpha6*tsa(3,jj,jk,jn)+alpha5*tsa(1,jj,jk,jn)+alpha7*tsa(4,jj,jk,jn))*tmask(2,jj,jk) 136 ENDIF 149 137 ENDIF 150 END IF138 END DO 151 139 END DO 152 140 END DO … … 154 142 155 143 IF( nbondj == -1 .OR. nbondj == 2 ) THEN 156 ta(:,1,:) = alpha1 * zta(:,1,:) + alpha2 * zta(:,2,:) 157 sa(:,1,:) = alpha1 * zsa(:,1,:) + alpha2 * zsa(:,2,:) 158 DO jk=1,jpk 159 DO ji=1,jpi 160 IF( vmask(ji,2,jk) == 0.e0 ) THEN 161 ta(ji,2,jk)=ta(ji,1,jk) * tmask(ji,2,jk) 162 sa(ji,2,jk)=sa(ji,1,jk) * tmask(ji,2,jk) 163 ELSE 164 ta(ji,2,jk)=(alpha4*ta(ji,1,jk)+alpha3*ta(ji,3,jk))*tmask(ji,2,jk) 165 sa(ji,2,jk)=(alpha4*sa(ji,1,jk)+alpha3*sa(ji,3,jk))*tmask(ji,2,jk) 166 IF( vn(ji,2,jk) < 0.e0 ) THEN 167 ta(ji,2,jk)=(alpha6*ta(ji,3,jk)+alpha5*ta(ji,1,jk)+alpha7*ta(ji,4,jk))*tmask(ji,2,jk) 168 sa(ji,2,jk)=(alpha6*sa(ji,3,jk)+alpha5*sa(ji,1,jk)+alpha7*sa(ji,4,jk))*tmask(ji,2,jk) 144 DO jn = 1, jpts 145 tsa(:,1,:,jn) = alpha1 * ztsa(:,1,:,jn) + alpha2 * ztsa(:,2,:,jn) 146 DO jk=1,jpk 147 DO ji=1,jpi 148 IF( vmask(ji,2,jk) == 0.e0 ) THEN 149 tsa(ji,2,jk,jn)=tsa(ji,1,jk,jn) * tmask(ji,2,jk) 150 ELSE 151 tsa(ji,2,jk,jn)=(alpha4*tsa(ji,1,jk,jn)+alpha3*tsa(ji,3,jk,jn))*tmask(ji,2,jk) 152 IF( vn(ji,2,jk) < 0.e0 ) THEN 153 tsa(ji,2,jk,jn)=(alpha6*tsa(ji,3,jk,jn)+alpha5*tsa(ji,1,jk,jn)+alpha7*tsa(ji,4,jk,jn))*tmask(ji,2,jk) 154 ENDIF 169 155 ENDIF 170 END IF171 END DO 172 END 156 END DO 157 END DO 158 ENDDO 173 159 ENDIF 174 160 ! 175 IF( wrk_not_released( 3, 1,2) ) THEN161 IF( wrk_not_released(4, 1) ) THEN 176 162 CALL ctl_stop('agrif_tra: failed to release workspace arrays.') 177 163 ENDIF -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/NST_SRC/agrif_opa_sponge.F90
r2715 r2789 12 12 PRIVATE 13 13 14 PUBLIC Agrif_Sponge_Tra, Agrif_Sponge_Dyn, interpt n, interpsn, interpun, interpvn14 PUBLIC Agrif_Sponge_Tra, Agrif_Sponge_Dyn, interptsn, interpun, interpvn 15 15 16 16 !!---------------------------------------------------------------------- … … 28 28 #include "domzgr_substitute.h90" 29 29 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 30 USE wrk_nemo, ONLY: wrk_2d_1 31 USE wrk_nemo, ONLY: wrk_3d_1, wrk_3d_2 32 USE wrk_nemo, ONLY: wrk_3d_3, wrk_3d_4 33 USE wrk_nemo, ONLY: wrk_3d_7, wrk_3d_6 34 USE wrk_nemo, ONLY: wrk_3d_8 30 USE wrk_nemo, ONLY: wrk_2d_1, wrk_2d_2, wrk_2d_3 31 USE wrk_nemo, ONLY: wrk_4d_1, wrk_4d_2 35 32 !! 36 INTEGER :: ji,jj,jk 33 INTEGER :: ji,jj,jk,jn 37 34 INTEGER :: spongearea 38 35 REAL(wp) :: timecoeff 39 REAL(wp) :: zt a, zsa, zabe1, zabe2, zbtr40 REAL(wp), POINTER, DIMENSION(:,: ) :: localviscsponge41 REAL(wp), POINTER, DIMENSION(:,: ,:) :: tbdiff, sbdiff42 REAL(wp), POINTER, DIMENSION(:,:,: ) :: ztu, zsu, ztv, zsv43 REAL(wp), POINTER, DIMENSION(:,:,: ) :: ztab36 REAL(wp) :: ztsa, zabe1, zabe2, zbtr 37 REAL(wp), POINTER, DIMENSION(:,: ) :: localviscsponge 38 REAL(wp), POINTER, DIMENSION(:,: ) :: ztu, ztv 39 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztab 40 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: tsbdiff 44 41 45 42 #if defined SPONGE 46 43 localviscsponge => wrk_2d_1 47 tbdiff => wrk_3d_1 ;sbdiff => wrk_3d_248 zt u => wrk_3d_3 ; zsu => wrk_3d_449 zt v => wrk_3d_7 ; zsv => wrk_3d_650 ztab => wrk_3d_844 ztu => wrk_2d_2 45 ztv => wrk_2d_3 46 ztab => wrk_4d_1 47 tsbdiff => wrk_4d_2 51 48 52 49 timecoeff = REAL(Agrif_NbStepint(),wp)/Agrif_rhot() … … 55 52 Agrif_UseSpecialValue = .TRUE. 56 53 ztab = 0.e0 57 CALL Agrif_Bc_Variable(ztab, t a_id,calledweight=timecoeff,procname=interptn)54 CALL Agrif_Bc_Variable(ztab, tsa_id,calledweight=timecoeff,procname=interptsn) 58 55 Agrif_UseSpecialValue = .FALSE. 59 56 60 tbdiff(:,:,:) = tb(:,:,:) - ztab(:,:,:) 61 62 ztab = 0.e0 63 Agrif_SpecialValue=0. 64 Agrif_UseSpecialValue = .TRUE. 65 CALL Agrif_Bc_Variable(ztab, sa_id,calledweight=timecoeff,procname=interpsn) 66 Agrif_UseSpecialValue = .FALSE. 67 68 sbdiff(:,:,:) = sb(:,:,:) - ztab(:,:,:) 57 tsbdiff(:,:,:,:) = tsb(:,:,:,:) - ztab(:,:,:,:) 69 58 70 59 spongearea = 2 + 2 * Agrif_irhox() … … 137 126 ENDIF 138 127 139 DO jk = 1, jpkm1 140 DO jj = 1, jpjm1 141 DO ji = 1, jpim1 142 zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk) 143 zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk) 144 ztu(ji,jj,jk) = zabe1 * ( tbdiff(ji+1,jj ,jk) - tbdiff(ji,jj,jk) ) 145 zsu(ji,jj,jk) = zabe1 * ( sbdiff(ji+1,jj ,jk) - sbdiff(ji,jj,jk) ) 146 ztv(ji,jj,jk) = zabe2 * ( tbdiff(ji ,jj+1,jk) - tbdiff(ji,jj,jk) ) 147 zsv(ji,jj,jk) = zabe2 * ( sbdiff(ji ,jj+1,jk) - sbdiff(ji,jj,jk) ) 128 DO jn = 1, jpts 129 DO jk = 1, jpkm1 130 ! 131 DO jj = 1, jpjm1 132 DO ji = 1, jpim1 133 zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk) 134 zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk) 135 ztu(ji,jj) = zabe1 * ( tsbdiff(ji+1,jj ,jk,jn) - tsbdiff(ji,jj,jk,jn) ) 136 ztv(ji,jj) = zabe2 * ( tsbdiff(ji ,jj+1,jk,jn) - tsbdiff(ji,jj,jk,jn) ) 137 ENDDO 148 138 ENDDO 149 ENDDO 150 151 DO jj = 2,jpjm1 152 DO ji = 2,jpim1 153 zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk) 154 ! horizontal diffusive trends 155 zta = zbtr * ( ztu(ji,jj,jk) - ztu(ji-1,jj,jk) & 156 & + ztv(ji,jj,jk) - ztv(ji,jj-1,jk) ) 157 zsa = zbtr * ( zsu(ji,jj,jk) - zsu(ji-1,jj,jk) & 158 & + zsv(ji,jj,jk) - zsv(ji,jj-1,jk) ) 159 ! add it to the general tracer trends 160 ta(ji,jj,jk) = (ta(ji,jj,jk) + zta) 161 sa(ji,jj,jk) = (sa(ji,jj,jk) + zsa) 139 140 DO jj = 2, jpjm1 141 DO ji = 2, jpim1 142 zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk) 143 ! horizontal diffusive trends 144 ztsa = zbtr * ( ztu(ji,jj) - ztu(ji-1,jj ) & 145 & + ztv(ji,jj) - ztv(ji ,jj-1) ) 146 ! add it to the general tracer trends 147 tsa(ji,jj,jk,jn) = tsa(ji,jj,jk,jn) + ztsa 148 END DO 162 149 END DO 163 END DO164 150 ! 151 ENDDO 165 152 ENDDO 166 153 … … 345 332 END SUBROUTINE Agrif_Sponge_dyn 346 333 347 SUBROUTINE interpt n(tabres,i1,i2,j1,j2,k1,k2)348 !!--------------------------------------------- 349 !! *** ROUTINE interpt n ***334 SUBROUTINE interptsn(tabres,i1,i2,j1,j2,k1,k2,n1,n2) 335 !!--------------------------------------------- 336 !! *** ROUTINE interptsn *** 350 337 !!--------------------------------------------- 351 338 # include "domzgr_substitute.h90" 352 339 353 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 354 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres 355 356 tabres(i1:i2,j1:j2,k1:k2) = tn(i1:i2,j1:j2,k1:k2) 357 358 END SUBROUTINE interptn 359 360 SUBROUTINE interpsn(tabres,i1,i2,j1,j2,k1,k2) 361 !!--------------------------------------------- 362 !! *** ROUTINE interpsn *** 363 !!--------------------------------------------- 364 # include "domzgr_substitute.h90" 365 366 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 367 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres 368 369 tabres(i1:i2,j1:j2,k1:k2) = sn(i1:i2,j1:j2,k1:k2) 370 371 END SUBROUTINE interpsn 340 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2 341 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: tabres 342 343 tabres(i1:i2,j1:j2,k1:k2,n1:n2) = tsn(i1:i2,j1:j2,k1:k2,n1:n2) 344 345 END SUBROUTINE interptsn 372 346 373 347 SUBROUTINE interpun(tabres,i1,i2,j1,j2,k1,k2) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
r2715 r2789 30 30 !!--------------------------------------------- 31 31 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 32 USE wrk_nemo, ONLY: wrk_ 3d_132 USE wrk_nemo, ONLY: wrk_4d_1 33 33 !! 34 34 INTEGER, INTENT(in) :: kt 35 REAL(wp), POINTER, DIMENSION(:,:,: ) :: ztab35 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztab 36 36 37 37 38 38 IF((Agrif_NbStepint() .NE. (Agrif_irhot()-1)).AND.(kt /= 0)) RETURN 39 39 #if defined TWO_WAY 40 ztab => wrk_3d_1 41 IF( wrk_in_use(3, 1) ) THEN 40 IF( wrk_in_use(4, 1) ) THEN 42 41 CALL ctl_stop('agrif_update_tra: ERROR: requested workspace arrays unavailable') 43 42 RETURN 44 43 END IF 44 ztab => wrk_4d_1 45 45 46 46 Agrif_UseSpecialValueInUpdate = .TRUE. … … 48 48 49 49 IF (MOD(nbcline,nbclineupdate) == 0) THEN 50 CALL Agrif_Update_Variable(ztab,tn_id, procname=updateT) 51 CALL Agrif_Update_Variable(ztab,sn_id, procname=updateS) 52 ELSE 53 CALL Agrif_Update_Variable(ztab,tn_id,locupdate=(/0,2/), procname=updateT) 54 CALL Agrif_Update_Variable(ztab,sn_id,locupdate=(/0,2/), procname=updateS) 50 CALL Agrif_Update_Variable(ztab,tsn_id, procname=updateTS) 51 ELSE 52 CALL Agrif_Update_Variable(ztab,tsn_id,locupdate=(/0,2/), procname=updateTS) 55 53 ENDIF 56 54 57 55 Agrif_UseSpecialValueInUpdate = .FALSE. 58 56 59 IF( wrk_not_released( 3, 1) ) THEN57 IF( wrk_not_released(4, 1) ) THEN 60 58 CALL ctl_stop('Agrif_Update_Tra: ERROR: failed to release workspace arrays') 61 59 END IF … … 124 122 END SUBROUTINE recompute_diags 125 123 126 SUBROUTINE updateT ( tabres, i1, i2, j1, j2, k1, k2, before )124 SUBROUTINE updateTS( tabres, i1, i2, j1, j2, k1, k2, n1, n2, before ) 127 125 !!--------------------------------------------- 128 126 !! *** ROUTINE updateT *** … … 130 128 # include "domzgr_substitute.h90" 131 129 132 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 133 REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2 ), INTENT(inout) :: tabres130 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2 131 REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: tabres 134 132 LOGICAL, iNTENT(in) :: before 135 133 136 INTEGER :: ji,jj,jk 137 138 IF (before) THEN 139 DO jk=k1,k2 140 DO jj=j1,j2 141 DO ji=i1,i2 142 tabres(ji,jj,jk) = tn(ji,jj,jk) 143 END DO 144 END DO 145 END DO 146 ELSE 147 DO jk=k1,k2 148 DO jj=j1,j2 149 DO ji=i1,i2 150 IF( tabres(ji,jj,jk) .NE. 0. ) THEN 151 tn(ji,jj,jk) = tabres(ji,jj,jk) * tmask(ji,jj,jk) 152 ENDIF 153 END DO 154 END DO 155 END DO 156 ENDIF 157 158 END SUBROUTINE updateT 159 160 SUBROUTINE updateS( tabres, i1, i2, j1, j2, k1, k2, before ) 161 !!--------------------------------------------- 162 !! *** ROUTINE updateS *** 163 !!--------------------------------------------- 164 # include "domzgr_substitute.h90" 165 166 INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 167 REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres 168 LOGICAL, iNTENT(in) :: before 169 170 INTEGER :: ji,jj,jk 171 172 IF (before) THEN 173 DO jk=k1,k2 174 DO jj=j1,j2 175 DO ji=i1,i2 176 tabres(ji,jj,jk) = sn(ji,jj,jk) 177 END DO 178 END DO 179 END DO 180 ELSE 181 DO jk=k1,k2 182 DO jj=j1,j2 183 DO ji=i1,i2 184 IF (tabres(ji,jj,jk).NE.0.) THEN 185 sn(ji,jj,jk) = tabres(ji,jj,jk) * tmask(ji,jj,jk) 186 ENDIF 187 END DO 188 END DO 189 END DO 190 ENDIF 191 192 END SUBROUTINE updateS 134 INTEGER :: ji,jj,jk,jn 135 136 IF (before) THEN 137 DO jn = n1,n2 138 DO jk=k1,k2 139 DO jj=j1,j2 140 DO ji=i1,i2 141 tabres(ji,jj,jk,jn) = tsn(ji,jj,jk,jn) 142 END DO 143 END DO 144 END DO 145 END DO 146 ELSE 147 DO jn = n1,n2 148 DO jk=k1,k2 149 DO jj=j1,j2 150 DO ji=i1,i2 151 IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN 152 tsn(ji,jj,jk,jn) = tabres(ji,jj,jk,jn) * tmask(ji,jj,jk) 153 END IF 154 END DO 155 END DO 156 END DO 157 END DO 158 ENDIF 159 160 END SUBROUTINE updateTS 193 161 194 162 SUBROUTINE updateu( tabres, i1, i2, j1, j2, k1, k2, before ) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r2727 r2789 54 54 USE dom_oce 55 55 USE nemogcm 56 #if defined key_tradmp || defined key_esopa57 56 USE tradmp 58 #endif59 57 #if defined key_obc || defined key_esopa 60 58 USE obc_par … … 71 69 72 70 ! Specific fine grid Initializations 73 #if defined key_tradmp || defined key_esopa74 71 ! no tracer damping on fine grids 75 lk_tradmp = .FALSE. 76 #endif 72 ln_tradmp = .FALSE. 77 73 #if defined key_obc || defined key_esopa 78 74 ! no open boundary on fine grids … … 110 106 IMPLICIT NONE 111 107 ! 112 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tabtemp 108 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: tabtstemp 109 REAL(wp), DIMENSION(:,:,: ), ALLOCATABLE :: tabuvtemp 113 110 LOGICAL :: check_namelist 114 111 !!---------------------------------------------------------------------- 115 112 116 ALLOCATE( tabtemp(jpi,jpj,jpk) ) 117 118 113 ALLOCATE( tabtstemp(jpi, jpj, jpk, jpts) ) 114 ALLOCATE( tabuvtemp(jpi, jpj, jpk) ) 115 116 119 117 ! 1. Declaration of the type of variable which have to be interpolated 120 118 !--------------------------------------------------------------------- … … 125 123 Agrif_SpecialValue=0. 126 124 Agrif_UseSpecialValue = .TRUE. 127 Call Agrif_Bc_variable(tabtemp,tn_id,calledweight=1.,procname=interptn) 128 129 Call Agrif_Bc_variable(tabtemp,sn_id,calledweight=1.,procname=interpsn) 130 Call Agrif_Bc_variable(tabtemp,un_id,calledweight=1.,procname=interpu) 131 Call Agrif_Bc_variable(tabtemp,vn_id,calledweight=1.,procname=interpv) 132 133 Call Agrif_Bc_variable(tabtemp,ta_id,calledweight=1.,procname=interptn) 134 Call Agrif_Bc_variable(tabtemp,sa_id,calledweight=1.,procname=interpsn) 135 136 Call Agrif_Bc_variable(tabtemp,ua_id,calledweight=1.,procname=interpun) 137 Call Agrif_Bc_variable(tabtemp,va_id,calledweight=1.,procname=interpvn) 125 Call Agrif_Bc_variable(tabtstemp,tsn_id,calledweight=1.,procname=interptsn) 126 Call Agrif_Bc_variable(tabtstemp,tsa_id,calledweight=1.,procname=interptsn) 127 128 Call Agrif_Bc_variable(tabuvtemp,un_id,calledweight=1.,procname=interpu) 129 Call Agrif_Bc_variable(tabuvtemp,vn_id,calledweight=1.,procname=interpv) 130 Call Agrif_Bc_variable(tabuvtemp,ua_id,calledweight=1.,procname=interpun) 131 Call Agrif_Bc_variable(tabuvtemp,va_id,calledweight=1.,procname=interpvn) 138 132 Agrif_UseSpecialValue = .FALSE. 139 133 … … 192 186 nbcline = 0 193 187 ! 194 DEALLOCATE(tabtemp) 188 DEALLOCATE(tabtstemp) 189 DEALLOCATE(tabuvtemp) 195 190 ! 196 191 END SUBROUTINE Agrif_InitValues_cont … … 204 199 !!---------------------------------------------------------------------- 205 200 USE agrif_util 201 USE par_oce ! ONLY : jpts 206 202 USE oce 207 203 IMPLICIT NONE … … 210 206 ! 1. Declaration of the type of variable which have to be interpolated 211 207 !--------------------------------------------------------------------- 212 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),tn_id) 213 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),sn_id) 214 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),tb_id) 215 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),sb_id) 216 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),ta_id) 217 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),sa_id) 218 208 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsn_id) 209 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsa_id) 210 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsb_id) 211 219 212 CALL agrif_declare_variable((/1,2,0/),(/2,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),un_id) 220 213 CALL agrif_declare_variable((/2,1,0/),(/3,2,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),vn_id) … … 230 223 ! 2. Type of interpolation 231 224 !------------------------- 232 CALL Agrif_Set_bcinterp(tn_id,interp=AGRIF_linear) 233 CALL Agrif_Set_bcinterp(sn_id,interp=AGRIF_linear) 234 CALL Agrif_Set_bcinterp(ta_id,interp=AGRIF_linear) 235 CALL Agrif_Set_bcinterp(sa_id,interp=AGRIF_linear) 225 CALL Agrif_Set_bcinterp(tsn_id,interp=AGRIF_linear) 226 CALL Agrif_Set_bcinterp(tsa_id,interp=AGRIF_linear) 236 227 237 228 Call Agrif_Set_bcinterp(un_id,interp1=Agrif_linear,interp2=AGRIF_ppm) … … 252 243 Call Agrif_Set_bc(e2v_id,(/0,0/)) 253 244 254 Call Agrif_Set_bc(tn_id,(/0,1/)) 255 Call Agrif_Set_bc(sn_id,(/0,1/)) 256 257 Call Agrif_Set_bc(ta_id,(/-3*Agrif_irhox(),0/)) 258 Call Agrif_Set_bc(sa_id,(/-3*Agrif_irhox(),0/)) 245 Call Agrif_Set_bc(tsn_id,(/0,1/)) 246 Call Agrif_Set_bc(tsa_id,(/-3*Agrif_irhox(),0/)) 259 247 260 248 Call Agrif_Set_bc(ua_id,(/-2*Agrif_irhox(),0/)) … … 263 251 ! 5. Update type 264 252 !--------------- 265 Call Agrif_Set_Updatetype(tn_id, update = AGRIF_Update_Average) 266 Call Agrif_Set_Updatetype(sn_id, update = AGRIF_Update_Average) 267 268 Call Agrif_Set_Updatetype(tb_id, update = AGRIF_Update_Average) 269 Call Agrif_Set_Updatetype(sb_id, update = AGRIF_Update_Average) 253 Call Agrif_Set_Updatetype(tsn_id, update = AGRIF_Update_Average) 254 Call Agrif_Set_Updatetype(tsb_id, update = AGRIF_Update_Average) 270 255 271 256 Call Agrif_Set_Updatetype(sshn_id, update = AGRIF_Update_Average) … … 395 380 ! 1. Declaration of the type of variable which have to be interpolated 396 381 !--------------------------------------------------------------------- 397 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/), & 398 & (/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) 399 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/), & 400 & (/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trb_id) 401 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0,jptra/),(/'x','y','N','N'/), & 402 & (/1,1,1,1/),(/jpi,jpj,jpk/),tra_id) 403 382 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) 383 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trb_id) 384 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),tra_id) 404 385 # if defined key_offline 405 386 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),e1u_id) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/ASM/asmtrj.F90
r2399 r2789 105 105 ! 106 106 ! ! Write the information 107 CALL iom_rstput( kt, nitbkg_r, inum, 'rdastp' , zdate )108 CALL iom_rstput( kt, nitbkg_r, inum, 'un' , un )109 CALL iom_rstput( kt, nitbkg_r, inum, 'vn' , vn )110 CALL iom_rstput( kt, nitbkg_r, inum, 'tn' , t n)111 CALL iom_rstput( kt, nitbkg_r, inum, 'sn' , sn)112 CALL iom_rstput( kt, nitbkg_r, inum, 'sshn' , sshn )113 #if defined key_zdftke 114 CALL iom_rstput( kt, nitbkg_r, inum, 'en' , en )115 #endif 116 CALL iom_rstput( kt, nitbkg_r, inum, 'gcx' , gcx )107 CALL iom_rstput( kt, nitbkg_r, inum, 'rdastp' , zdate ) 108 CALL iom_rstput( kt, nitbkg_r, inum, 'un' , un ) 109 CALL iom_rstput( kt, nitbkg_r, inum, 'vn' , vn ) 110 CALL iom_rstput( kt, nitbkg_r, inum, 'tn' , tsn(:,:,:,jp_tem) ) 111 CALL iom_rstput( kt, nitbkg_r, inum, 'sn' , tsn(:,:,:,jp_sal) ) 112 CALL iom_rstput( kt, nitbkg_r, inum, 'sshn' , sshn ) 113 #if defined key_zdftke 114 CALL iom_rstput( kt, nitbkg_r, inum, 'en' , en ) 115 #endif 116 CALL iom_rstput( kt, nitbkg_r, inum, 'gcx' , gcx ) 117 117 ! 118 118 CALL iom_close( inum ) … … 143 143 ! 144 144 ! ! Write the information 145 CALL iom_rstput( kt, nitdin_r, inum, 'rdastp' , zdate )146 CALL iom_rstput( kt, nitdin_r, inum, 'un' , un )147 CALL iom_rstput( kt, nitdin_r, inum, 'vn' , vn )148 CALL iom_rstput( kt, nitdin_r, inum, 'tn' , t n)149 CALL iom_rstput( kt, nitdin_r, inum, 'sn' , sn)150 CALL iom_rstput( kt, nitdin_r, inum, 'sshn' , sshn )145 CALL iom_rstput( kt, nitdin_r, inum, 'rdastp' , zdate ) 146 CALL iom_rstput( kt, nitdin_r, inum, 'un' , un ) 147 CALL iom_rstput( kt, nitdin_r, inum, 'vn' , vn ) 148 CALL iom_rstput( kt, nitdin_r, inum, 'tn' , tsn(:,:,:,jp_tem) ) 149 CALL iom_rstput( kt, nitdin_r, inum, 'sn' , tsn(:,:,:,jp_sal) ) 150 CALL iom_rstput( kt, nitdin_r, inum, 'sshn' , sshn ) 151 151 ! 152 152 CALL iom_close( inum ) … … 216 216 CALL iom_rstput( it, it, inum, 'un' , un ) 217 217 CALL iom_rstput( it, it, inum, 'vn' , vn ) 218 CALL iom_rstput( it, it, inum, 'tn' , t n)219 CALL iom_rstput( it, it, inum, 'sn' , sn)218 CALL iom_rstput( it, it, inum, 'tn' , tsn(:,:,:,jp_tem) ) 219 CALL iom_rstput( it, it, inum, 'sn' , tsn(:,:,:,jp_sal) ) 220 220 CALL iom_rstput( it, it, inum, 'avmu' , avmu ) 221 221 CALL iom_rstput( it, it, inum, 'avmv' , avmv ) … … 230 230 CALL iom_rstput( it, it, inum, 'avs' , avs ) 231 231 #endif 232 CALL iom_rstput( it, it, inum, 'ta' , t a)233 CALL iom_rstput( it, it, inum, 'sa' , sa)234 CALL iom_rstput( it, it, inum, 'tb' , t b)235 CALL iom_rstput( it, it, inum, 'sb' , sb)236 #if defined key_tradmp 237 CALL iom_rstput( it, it, inum, 'strdmp', strdmp )238 CALL iom_rstput( it, it, inum, 'hmlp' , hmlp )239 #endif 232 CALL iom_rstput( it, it, inum, 'ta' , tsa(:,:,:,jp_tem) ) 233 CALL iom_rstput( it, it, inum, 'sa' , tsa(:,:,:,jp_sal) ) 234 CALL iom_rstput( it, it, inum, 'tb' , tsb(:,:,:,jp_tem) ) 235 CALL iom_rstput( it, it, inum, 'sb' , tsb(:,:,:,jp_sal) ) 236 IF( ln_tradmp ) THEN 237 CALL iom_rstput( it, it, inum, 'strdmp', strdmp ) 238 CALL iom_rstput( it, it, inum, 'hmlp' , hmlp ) 239 END IF 240 240 CALL iom_rstput( it, it, inum, 'aeiu' , aeiu ) 241 241 CALL iom_rstput( it, it, inum, 'aeiv' , aeiv ) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r2715 r2789 332 332 ij = nbj(ib,igrd) 333 333 DO ik = 1, jpkm1 334 tbdy(ib,ik) = t n(ii,ij,ik)335 sbdy(ib,ik) = sn(ii,ij,ik)334 tbdy(ib,ik) = tsn(ii,ij,ik,jp_tem) 335 sbdy(ib,ik) = tsn(ii,ij,ik,jp_sal) 336 336 END DO 337 337 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90
r2528 r2789 61 61 ij = nbj(ib,igrd) 62 62 zwgt = nbw(ib,igrd) 63 t a(ii,ij,ik) = ( ta(ii,ij,ik) * (1.-zwgt) + tbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik)64 sa(ii,ij,ik) = ( sa(ii,ij,ik) * (1.-zwgt) + sbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik)63 tsa(ii,ij,ik,jp_tem) = ( tsa(ii,ij,ik,jp_tem) * (1.-zwgt) + tbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik) 64 tsa(ii,ij,ik,jp_sal) = ( tsa(ii,ij,ik,jp_sal) * (1.-zwgt) + sbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik) 65 65 END DO 66 66 END DO 67 ! 68 CALL lbc_lnk( ta, 'T', 1. ) ; CALL lbc_lnk( sa, 'T', 1. ) ! Boundary points should be updated 67 ! ! Boundary points should be updated 68 CALL lbc_lnk( tsa(:,:,:,jp_tem), 'T', 1. ) 69 CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1. ) 69 70 ! 70 71 ENDIF ! ln_tra_frs -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
r2409 r2789 64 64 ! Update data, open boundaries, surface boundary condition (including sea-ice) 65 65 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 66 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data67 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data68 66 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 69 67 … … 127 125 IF( ln_zdfnpc ) CALL tra_npc ( kstp ) ! applied non penetrative convective adjustment on (t,s) 128 126 CALL eos( tsb, rhd, rhop ) ! now (swap=before) in situ density for dynhpg module 129 CALL tra_unswap ! udate T & S 3D arrays (to be suppressed)130 127 131 128 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
r2715 r2789 94 94 CALL iom_put( 'sshtot', zvolssh / area_tot ) 95 95 96 ! ! thermosteric ssh97 ztsn(:,:,:,jp_tem) = t n (:,:,:)96 ! 97 ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) ! thermosteric ssh 98 98 ztsn(:,:,:,jp_sal) = sn0(:,:,:) 99 99 CALL eos( ztsn, zrhd ) ! now in situ density using initial salinity … … 138 138 DO ji = 1, jpi 139 139 zztmp = area(ji,jj) * fse3t(ji,jj,jk) 140 ztemp = ztemp + zztmp * t n(ji,jj,jk)141 zsal = zsal + zztmp * sn(ji,jj,jk)140 ztemp = ztemp + zztmp * tsn(ji,jj,jk,jp_tem) 141 zsal = zsal + zztmp * tsn(ji,jj,jk,jp_sal) 142 142 END DO 143 143 END DO 144 144 END DO 145 145 IF( .NOT.lk_vvl ) THEN 146 ztemp = ztemp + SUM( zarea_ssh(:,:) * t n(:,:,1) )147 zsal = zsal + SUM( zarea_ssh(:,:) * sn(:,:,1) )146 ztemp = ztemp + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_tem) ) 147 zsal = zsal + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_sal) ) 148 148 ENDIF 149 149 IF( lk_mpp ) THEN -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
r2528 r2789 80 80 DO ji = fs_2, fs_jpim1 ! vector opt. 81 81 zwei = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj) 82 a_salb = a_salb + ( sb(ji,jj,jk) - zsm0 ) * zwei82 a_salb = a_salb + ( tsb(ji,jj,jk,jp_sal) - zsm0 ) * zwei 83 83 END DO 84 84 END DO … … 106 106 DO ji = fs_2, fs_jpim1 ! vector opt. 107 107 zwei = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj) 108 a_saln = a_saln + ( sn(ji,jj,jk) - zsm0 ) * zwei108 a_saln = a_saln + ( tsn(ji,jj,jk,jp_sal) - zsm0 ) * zwei 109 109 zvol = zvol + zwei 110 110 END DO … … 177 177 DO jj = mj0(ij0), mj1(ij1) 178 178 DO jk = 1, jpk 179 zt = 0.5 * ( t n(ji,jj,jk) + tn(ji+1,jj,jk) )180 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) )179 zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 180 zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) ) 181 181 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 182 182 … … 224 224 DO jj = mj0(ij0), mj1(ij1) 225 225 DO jk = 1, jpk 226 zt = 0.5 * ( t n(ji,jj,jk) + tn(ji+1,jj,jk) )227 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) )226 zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 227 zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) ) 228 228 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 229 229 … … 271 271 DO jj = mj0(ij0), mj1(ij1) 272 272 DO jk = 1, jpk 273 zt = 0.5 * ( t n(ji,jj,jk) + tn(ji+1,jj,jk) )274 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) )273 zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 274 zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) ) 275 275 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 276 276 … … 318 318 DO jj = mj0(ij0), mj1(ij1) 319 319 DO jk = 1, jpk 320 zt = 0.5 * ( t n(ji,jj,jk) + tn(ji+1,jj,jk) )321 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) )320 zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 321 zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) ) 322 322 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 323 323 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r2528 r2789 107 107 ! heat content variation 108 108 zdiff_hc = zdiff_hc + SUM( surf(:,:) * tmask(:,:,jk) & 109 & * ( fse3t_n(:,:,jk) * t n(:,:,jk) &109 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) & 110 110 & - hc_loc_ini(:,:,jk) ) ) 111 111 ! salt content variation 112 112 zdiff_sc = zdiff_sc + SUM( surf(:,:) * tmask(:,:,jk) & 113 & * ( fse3t_n(:,:,jk) * sn(:,:,jk) &113 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) & 114 114 & - sc_loc_ini(:,:,jk) ) ) 115 115 ENDDO … … 248 248 ! 4 - initial conservation variables ! 249 249 ! ---------------------------------- ! 250 ssh_ini(:,:) = sshn(:,:) ! initial ssh250 ssh_ini(:,:) = sshn(:,:) ! initial ssh 251 251 DO jk = 1, jpk 252 e3t_ini (:,:,jk) = fse3t_n(:,:,jk) ! initial vertical scale factors253 hc_loc_ini(:,:,jk) = t n(:,:,jk) * fse3t_n(:,:,jk) ! initial heat content254 sc_loc_ini(:,:,jk) = sn(:,:,jk) * fse3t_n(:,:,jk) ! initial salt content252 e3t_ini (:,:,jk) = fse3t_n(:,:,jk) ! initial vertical scale factors 253 hc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_tem) * fse3t_n(:,:,jk) ! initial heat content 254 sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * fse3t_n(:,:,jk) ! initial salt content 255 255 END DO 256 256 frc_v = 0.d0 ! volume trend due to forcing -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
r2715 r2789 160 160 DO ji = 1, jpi 161 161 IF( tmask(ji,jj,nla10) == 1. ) THEN 162 zu = 1779.50 + 11.250*tn(ji,jj,nla10) - 3.80*sn(ji,jj,nla10) - 0.0745*tn(ji,jj,nla10)*tn(ji,jj,nla10) & 163 & - 0.0100*tn(ji,jj,nla10)*sn(ji,jj,nla10) 164 zv = 5891.00 + 38.000*tn(ji,jj,nla10) + 3.00*sn(ji,jj,nla10) - 0.3750*tn(ji,jj,nla10)*tn(ji,jj,nla10) 165 zut = 11.25 - 0.149*tn(ji,jj,nla10) - 0.01*sn(ji,jj,nla10) 166 zvt = 38.00 - 0.750*tn(ji,jj,nla10) 162 zu = 1779.50 + 11.250 * tsn(ji,jj,nla10,jp_tem) - 3.80 * tsn(ji,jj,nla10,jp_sal) & 163 & - 0.0745 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem) & 164 & - 0.0100 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_sal) 165 zv = 5891.00 + 38.000 * tsn(ji,jj,nla10,jp_tem) + 3.00 * tsn(ji,jj,nla10,jp_sal) & 166 & - 0.3750 * tsn(ji,jj,nla10,jp_tem) * tsn(ji,jj,nla10,jp_tem) 167 zut = 11.25 - 0.149 * tsn(ji,jj,nla10,jp_tem) - 0.01 * tsn(ji,jj,nla10,jp_sal) 168 zvt = 38.00 - 0.750 * tsn(ji,jj,nla10,jp_tem) 167 169 zw = (zu + 0.698*zv) * (zu + 0.698*zv) 168 170 zdelr(ji,jj) = ztem2 * (1000.*(zut*zv - zvt*zu)/zw) … … 184 186 ! 185 187 zzdep = fsdepw(ji,jj,jk) 186 zztmp = ( t n(ji,jj,jk-1) - tn(ji,jj,jk) ) / zzdep * tmask(ji,jj,jk) ! vertical gradient of temperature (dT/dz)188 zztmp = ( tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) / zzdep * tmask(ji,jj,jk) ! vertical gradient of temperature (dT/dz) 187 189 zzdep = zzdep * tmask(ji,jj,1) 188 190 … … 221 223 zzdep = fsdepw(ji,jj,jk) * tmask(ji,jj,1) 222 224 ! 223 zztmp = t n(ji,jj,nla10) - tn(ji,jj,jk)! - delta T(10m)225 zztmp = tsn(ji,jj,nla10,jp_tem) - tsn(ji,jj,jk,jp_tem) ! - delta T(10m) 224 226 IF( ABS(zztmp) > ztem2 ) zabs2 (ji,jj) = zzdep ! abs > 0.2 225 227 IF( zztmp > ztem2 ) ztm2 (ji,jj) = zzdep ! > 0.2 … … 254 256 DO jj = 1, jpj 255 257 DO ji = 1, jpi 256 zztmp = t n(ji,jj,jk)258 zztmp = tsn(ji,jj,jk,jp_tem) 257 259 IF( zztmp >= 20. ) ik20(ji,jj) = jk 258 260 IF( zztmp >= 28. ) ik28(ji,jj) = jk … … 273 275 zztmp = fsdept(ji,jj,iid ) & ! linear interpolation 274 276 & + ( fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid) ) & 275 & * ( 20.*tmask(ji,jj,iid+1) - tn(ji,jj,iid) ) &276 & / ( tn(ji,jj,iid+1) - tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) )277 & * ( 20.*tmask(ji,jj,iid+1) - tsn(ji,jj,iid,jp_tem) ) & 278 & / ( tsn(ji,jj,iid+1,jp_tem) - tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) ) 277 279 hd20(ji,jj) = MIN( zztmp , zzdep) * tmask(ji,jj,1) ! bound by the ocean depth 278 280 ELSE … … 284 286 zztmp = fsdept(ji,jj,iid ) & ! linear interpolation 285 287 & + ( fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid) ) & 286 & * ( 28.*tmask(ji,jj,iid+1) - tn(ji,jj,iid) ) &287 & / ( tn(ji,jj,iid+1) - tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) )288 & * ( 28.*tmask(ji,jj,iid+1) - tsn(ji,jj,iid,jp_tem) ) & 289 & / ( tsn(ji,jj,iid+1,jp_tem) - tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) ) 288 290 hd28(ji,jj) = MIN( zztmp , zzdep ) * tmask(ji,jj,1) ! bound by the ocean depth 289 291 ELSE … … 309 311 ! surface boundary condition 310 312 IF( lk_vvl ) THEN ; zthick(:,:) = 0._wp ; htc3(:,:) = 0._wp 311 ELSE ; zthick(:,:) = sshn(:,:) ; htc3(:,:) = t n(:,:,jk) * sshn(:,:) * tmask(:,:,jk)313 ELSE ; zthick(:,:) = sshn(:,:) ; htc3(:,:) = tsn(:,:,jk,jp_tem) * sshn(:,:) * tmask(:,:,jk) 312 314 ENDIF 313 315 ! integration down to ilevel 314 316 DO jk = 1, ilevel 315 317 zthick(:,:) = zthick(:,:) + fse3t(:,:,jk) 316 htc3 (:,:) = htc3 (:,:) + fse3t(:,:,jk) * t n(:,:,jk) * tmask(:,:,jk)318 htc3 (:,:) = htc3 (:,:) + fse3t(:,:,jk) * tsn(:,:,jk,jp_tem) * tmask(:,:,jk) 317 319 END DO 318 320 ! deepest layer … … 320 322 DO jj = 1, jpj 321 323 DO ji = 1, jpi 322 htc3(ji,jj) = htc3(ji,jj) + t n(ji,jj,ilevel+1) * MIN( fse3t(ji,jj,ilevel+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel+1)324 htc3(ji,jj) = htc3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem) * MIN( fse3t(ji,jj,ilevel+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel+1) 323 325 END DO 324 326 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
r2715 r2789 349 349 IF( ln_diaznl ) THEN ! i-mean temperature and salinity 350 350 DO jn = 1, nptr 351 tn_jk(:,:,jn) = ptr_tjk( t n(:,:,:), btmsk(:,:,jn) ) * r1_sjk(:,:,jn)351 tn_jk(:,:,jn) = ptr_tjk( tsn(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 352 352 END DO 353 353 ENDIF … … 368 368 ! 369 369 ! ! Transports 370 ! ! local heat & salt transports at T-points ( t n*mj[vn+v_eiv] )370 ! ! local heat & salt transports at T-points ( tsn*mj[vn+v_eiv] ) 371 371 vt(:,:,jpk) = 0._wp ; vs(:,:,jpk) = 0._wp 372 372 DO jk= 1, jpkm1 … … 378 378 zv = ( vn(ji,jj,jk) + vn(ji,jj-1,jk) ) * 0.5_wp 379 379 #endif 380 vt(:,jj,jk) = zv * t n(:,jj,jk)381 vs(:,jj,jk) = zv * sn(:,jj,jk)380 vt(:,jj,jk) = zv * tsn(:,jj,jk,jp_tem) 381 vs(:,jj,jk) = zv * tsn(:,jj,jk,jp_sal) 382 382 END DO 383 383 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r2715 r2789 46 46 USE limwri_2 47 47 #endif 48 USE dtatem49 USE dtasal50 48 USE lib_mpp ! MPP library 51 49 … … 116 114 !! ** Method : use iom_put 117 115 !!---------------------------------------------------------------------- 118 USE oce, ONLY : z3d => ta ! use ta as 3D workspace119 116 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 117 USE wrk_nemo, ONLY: z3d => wrk_3d_1 120 118 USE wrk_nemo, ONLY: z2d => wrk_2d_1 121 119 !! … … 126 124 !!---------------------------------------------------------------------- 127 125 ! 128 IF( wrk_in_use(2, 1))THEN 129 CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.') 130 RETURN 126 IF( wrk_in_use(3, 1) .OR. wrk_in_use(2, 1) ) THEN 127 CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.') ; RETURN 131 128 END IF 132 129 ! … … 137 134 ENDIF 138 135 139 CALL iom_put( "toce" , t n) ! temperature140 CALL iom_put( "soce" , sn) ! salinity141 CALL iom_put( "sst" , t n(:,:,1)) ! sea surface temperature142 CALL iom_put( "sst2" , t n(:,:,1) * tn(:,:,1) ) ! square of sea surface temperature143 CALL iom_put( "sss" , sn(:,:,1)) ! sea surface salinity144 CALL iom_put( "sss2" , sn(:,:,1) * sn(:,:,1) ) ! square of sea surface salinity145 CALL iom_put( "uoce" , un ) ! i-current146 CALL iom_put( "voce" , vn ) ! j-current136 CALL iom_put( "toce" , tsn(:,:,:,jp_tem) ) ! temperature 137 CALL iom_put( "soce" , tsn(:,:,:,jp_sal) ) ! salinity 138 CALL iom_put( "sst" , tsn(:,:,1,jp_tem) ) ! sea surface temperature 139 CALL iom_put( "sst2" , tsn(:,:,1,jp_tem) * tsn(:,:,1,jp_tem) ) ! square of sea surface temperature 140 CALL iom_put( "sss" , tsn(:,:,1,jp_sal) ) ! sea surface salinity 141 CALL iom_put( "sss2" , tsn(:,:,1,jp_sal) * tsn(:,:,1,jp_sal) ) ! square of sea surface salinity 142 CALL iom_put( "uoce" , un ) ! i-current 143 CALL iom_put( "voce" , vn ) ! j-current 147 144 148 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef.149 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef.145 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 146 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 150 147 IF( lk_zdfddm ) THEN 151 CALL iom_put( "avs" , fsavs(:,:,:) ) ! S vert. eddy diff. coef.148 CALL iom_put( "avs" , fsavs(:,:,:) ) ! S vert. eddy diff. coef. 152 149 ENDIF 153 150 154 151 DO jj = 2, jpjm1 ! sst gradient 155 152 DO ji = fs_2, fs_jpim1 ! vector opt. 156 zztmp = t n(ji,jj,1)157 zztmpx = ( t n(ji+1,jj ,1) - zztmp ) / e1u(ji,jj) + ( zztmp - tn(ji-1,jj ,1) ) / e1u(ji-1,jj )158 zztmpy = ( t n(ji ,jj+1,1) - zztmp ) / e2v(ji,jj) + ( zztmp - tn(ji ,jj-1,1) ) / e2v(ji ,jj-1)153 zztmp = tsn(ji,jj,1,jp_tem) 154 zztmpx = ( tsn(ji+1,jj ,1,jp_tem) - zztmp ) / e1u(ji,jj) + ( zztmp - tsn(ji-1,jj ,1,jp_tem) ) / e1u(ji-1,jj ) 155 zztmpy = ( tsn(ji ,jj+1,1,jp_tem) - zztmp ) / e2v(ji,jj) + ( zztmp - tsn(ji ,jj-1,1,jp_tem) ) / e2v(ji ,jj-1) 159 156 z2d(ji,jj) = 0.25 * ( zztmpx * zztmpx + zztmpy * zztmpy ) & 160 157 & * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * umask(ji,jj-1,1) … … 178 175 DO jj = 2, jpjm1 179 176 DO ji = fs_2, fs_jpim1 ! vector opt. 180 z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( t n(ji,jj,jk) + tn(ji+1,jj,jk) )177 z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 181 178 END DO 182 179 END DO … … 192 189 DO jj = 2, jpjm1 193 190 DO ji = fs_2, fs_jpim1 ! vector opt. 194 z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( t n(ji,jj,jk) + tn(ji,jj+1,jk) )191 z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) ) 195 192 END DO 196 193 END DO … … 200 197 ENDIF 201 198 ! 202 IF( wrk_not_released( 2, 1))THEN199 IF( wrk_not_released(3, 1) .OR. wrk_not_released(2, 1) ) THEN 203 200 CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.') 204 201 RETURN … … 516 513 517 514 ! Write fields on T grid 518 CALL histwrite( nid_T, "votemper", it, t n, ndim_T , ndex_T ) ! temperature519 CALL histwrite( nid_T, "vosaline", it, sn, ndim_T , ndex_T ) ! salinity520 CALL histwrite( nid_T, "sosstsst", it, t n(:,:,1), ndim_hT, ndex_hT ) ! sea surface temperature521 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1), ndim_hT, ndex_hT ) ! sea surface salinity515 CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem), ndim_T , ndex_T ) ! temperature 516 CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal), ndim_T , ndex_T ) ! salinity 517 CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem), ndim_hT, ndex_hT ) ! sea surface temperature 518 CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal), ndim_hT, ndex_hT ) ! sea surface salinity 522 519 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 523 520 !!$#if defined key_lim3 || defined key_lim2 … … 528 525 !!$ CALL histwrite( nid_T, "sorunoff", it, runoff , ndim_hT, ndex_hT ) ! runoff 529 526 CALL histwrite( nid_T, "sowaflcd", it, ( emps-rnf ) , ndim_hT, ndex_hT ) ! c/d water flux 530 zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * sn(:,:,1) * tmask(:,:,1)527 zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 531 528 CALL histwrite( nid_T, "sosalflx", it, zw2d , ndim_hT, ndex_hT ) ! c/d salt flux 532 529 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux … … 539 536 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 540 537 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 541 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1)538 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 542 539 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 543 540 #endif … … 545 542 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 546 543 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 547 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1)544 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 548 545 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 549 546 #endif … … 711 708 712 709 ! Write all fields on T grid 713 CALL histwrite( id_i, "votemper", kt, t n, jpi*jpj*jpk, idex ) ! now temperature714 CALL histwrite( id_i, "vosaline", kt, sn, jpi*jpj*jpk, idex ) ! now salinity715 CALL histwrite( id_i, "sossheig", kt, sshn , jpi*jpj , idex ) ! sea surface height716 CALL histwrite( id_i, "vozocrtx", kt, un , jpi*jpj*jpk, idex ) ! now i-velocity717 CALL histwrite( id_i, "vomecrty", kt, vn , jpi*jpj*jpk, idex ) ! now j-velocity718 CALL histwrite( id_i, "vovecrtz", kt, wn , jpi*jpj*jpk, idex ) ! now k-velocity719 CALL histwrite( id_i, "sowaflup", kt, (emp-rnf ), jpi*jpj , idex ) ! freshwater budget720 CALL histwrite( id_i, "sohefldo", kt, qsr + qns , jpi*jpj , idex ) ! total heat flux721 CALL histwrite( id_i, "soshfldo", kt, qsr , jpi*jpj , idex ) ! solar heat flux722 CALL histwrite( id_i, "soicecov", kt, fr_i , jpi*jpj , idex ) ! ice fraction723 CALL histwrite( id_i, "sozotaux", kt, utau , jpi*jpj , idex ) ! i-wind stress724 CALL histwrite( id_i, "sometauy", kt, vtau , jpi*jpj , idex ) ! j-wind stress710 CALL histwrite( id_i, "votemper", kt, tsn(:,:,:,jp_tem), jpi*jpj*jpk, idex ) ! now temperature 711 CALL histwrite( id_i, "vosaline", kt, tsn(:,:,:,jp_sal), jpi*jpj*jpk, idex ) ! now salinity 712 CALL histwrite( id_i, "sossheig", kt, sshn , jpi*jpj , idex ) ! sea surface height 713 CALL histwrite( id_i, "vozocrtx", kt, un , jpi*jpj*jpk, idex ) ! now i-velocity 714 CALL histwrite( id_i, "vomecrty", kt, vn , jpi*jpj*jpk, idex ) ! now j-velocity 715 CALL histwrite( id_i, "vovecrtz", kt, wn , jpi*jpj*jpk, idex ) ! now k-velocity 716 CALL histwrite( id_i, "sowaflup", kt, (emp-rnf ) , jpi*jpj , idex ) ! freshwater budget 717 CALL histwrite( id_i, "sohefldo", kt, qsr + qns , jpi*jpj , idex ) ! total heat flux 718 CALL histwrite( id_i, "soshfldo", kt, qsr , jpi*jpj , idex ) ! solar heat flux 719 CALL histwrite( id_i, "soicecov", kt, fr_i , jpi*jpj , idex ) ! ice fraction 720 CALL histwrite( id_i, "sozotaux", kt, utau , jpi*jpj , idex ) ! i-wind stress 721 CALL histwrite( id_i, "sometauy", kt, vtau , jpi*jpj , idex ) ! j-wind stress 725 722 726 723 ! 3. Close the file -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r2715 r2789 152 152 wm(:,:,:)=wm(:,:,:) + wn (:,:,:) 153 153 avtm(:,:,:)=avtm(:,:,:) + avt (:,:,:) 154 tm(:,:,:)=tm(:,:,:) + t n (:,:,:)155 sm(:,:,:)=sm(:,:,:) + sn (:,:,:)154 tm(:,:,:)=tm(:,:,:) + tsn(:,:,:,jp_tem) 155 sm(:,:,:)=sm(:,:,:) + tsn(:,:,:,jp_sal) 156 156 ! 157 157 fsel(:,:,1 ) = fsel(:,:,1 ) + utau(:,:) * umask(:,:,1) … … 159 159 fsel(:,:,3 ) = fsel(:,:,3 ) + qsr (:,:) + qns (:,:) 160 160 fsel(:,:,4 ) = fsel(:,:,4 ) + ( emp(:,:)-rnf(:,:) ) 161 ! fsel(:,:,5 ) = fsel(:,:,5 ) + t b (:,:,1) !RB not used161 ! fsel(:,:,5 ) = fsel(:,:,5 ) + tsb(:,:,1,jp_tem) !RB not used 162 162 fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:) 163 163 fsel(:,:,7 ) = fsel(:,:,7 ) + qsr(:,:) … … 226 226 fsel(:,:,3 ) = (qsr (:,:) + qns (:,:)) * tmask(:,:,1) 227 227 fsel(:,:,4 ) = ( emp(:,:)-rnf(:,:) ) * tmask(:,:,1) 228 ! fsel(:,:,5 ) = (t b (:,:,1) - sf_sst(1)%fnow(:,:) ) *tmask(:,:,1) !RB not used228 ! fsel(:,:,5 ) = (tsb(:,:,1,jp_tem) - sf_sst(1)%fnow(:,:) ) *tmask(:,:,1) !RB not used 229 229 230 230 fsel(:,:,6 ) = sshn(:,:) … … 302 302 303 303 IF( ll_dia_inst) THEN 304 CALL dia_wri_dimg(clname, cltext, t n, jpk, 'T')305 ELSE 306 CALL dia_wri_dimg(clname, cltext, tm , jpk, 'T')304 CALL dia_wri_dimg(clname, cltext, tsn(:,:,:,jp_tem), jpk, 'T') 305 ELSE 306 CALL dia_wri_dimg(clname, cltext, tm , jpk, 'T') 307 307 ENDIF 308 308 ! … … 314 314 315 315 IF( ll_dia_inst) THEN 316 CALL dia_wri_dimg(clname, cltext, sn, jpk, 'T')317 ELSE 318 CALL dia_wri_dimg(clname, cltext, sm , jpk, 'T')316 CALL dia_wri_dimg(clname, cltext, tsn(:,:,:,jp_sal), jpk, 'T') 317 ELSE 318 CALL dia_wri_dimg(clname, cltext, sm , jpk, 'T') 319 319 ENDIF 320 320 ! -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
r2777 r2789 13 13 !! 2.0 ! 2006-07 (S. Masson) distributed restart using iom 14 14 !! 3.3 ! 2010-10 (C. Ethe) merge TRC-TRA 15 !! 3.4 ! 2011-04 (G. Madec) Merge of dtatem and dtasal & suppression of tb,tn/sb,sn 15 16 !!---------------------------------------------------------------------- 16 17 … … 30 31 USE zdf_oce ! ocean vertical physics 31 32 USE phycst ! physical constants 32 USE dtatem ! temperature data (dta_tem routine) 33 USE dtasal ! salinity data (dta_sal routine) 33 USE dtatsd ! data temperature and salinity (dta_tsd routine) 34 34 USE restart ! ocean restart (rst_read routine) 35 35 USE in_out_manager ! I/O manager … … 42 42 USE dynspg_exp ! pressure gradient schemes 43 43 USE dynspg_ts ! pressure gradient schemes 44 USE traswp ! Swap arrays (tra_swp routine)45 44 USE lib_mpp ! MPP library 46 45 … … 73 72 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 74 73 75 rhd (:,:,:) = 0.e0 76 rhop (:,:,:) = 0.e0 77 rn2 (:,:,:) = 0.e0 78 ta (:,:,:) = 0.e0 79 sa (:,:,:) = 0.e0 74 CALL dta_tsd_init ! Initialisation of T & S input data 75 76 rhd (:,:,: ) = 0.e0 77 rhop (:,:,: ) = 0.e0 78 rn2 (:,:,: ) = 0.e0 79 tsa (:,:,:,:) = 0.e0 80 80 81 81 IF( ln_rstart ) THEN ! Restart from a file … … 83 83 neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 84 84 CALL rst_read ! Read the restart file 85 CALL tra_swap ! swap 3D arrays (t,s) in a 4D array (ts)86 85 CALL day_init ! model calendar (using both namelist and restart infos) 87 86 ELSE … … 99 98 hdivb(:,:,:) = 0.e0 ; hdivn(:,:,:) = 0.e0 100 99 ! 101 IF( cp_cfg == 'eel' ) THEN100 IF( cp_cfg == 'eel' ) THEN 102 101 CALL istate_eel ! EEL configuration : start from pre-defined U,V T-S fields 103 102 ELSEIF( cp_cfg == 'gyre' ) THEN 104 103 CALL istate_gyre ! GYRE configuration : start from pre-defined T-S fields 105 ELSE 106 ! ! Other configurations: Initial T-S fields 107 #if defined key_dtatem 108 CALL dta_tem( nit000 ) ! read 3D temperature data 109 tb(:,:,:) = t_dta(:,:,:) ; tn(:,:,:) = t_dta(:,:,:) 110 111 #else 112 IF(lwp) WRITE(numout,*) ! analytical temperature profile 113 IF(lwp) WRITE(numout,*)' Temperature initialization using an analytic profile' 114 CALL istate_tem 115 #endif 116 #if defined key_dtasal 117 CALL dta_sal( nit000 ) ! read 3D salinity data 118 sb(:,:,:) = s_dta(:,:,:) ; sn(:,:,:) = s_dta(:,:,:) 119 #else 120 ! No salinity data 121 IF(lwp)WRITE(numout,*) ! analytical salinity profile 122 IF(lwp)WRITE(numout,*)' Salinity initialisation using a constant value' 123 CALL istate_sal 124 #endif 104 ELSEIF( ln_tsd_init ) THEN ! Initial T-S fields read in files 105 CALL dta_tsd( nit000, tsb ) ! read 3D T and S data at nit000 106 tsn(:,:,:,:) = tsb(:,:,:,:) 107 ! 108 ELSE ! Initial T-S fields defined analytically 109 CALL istate_t_s 125 110 ENDIF 126 111 ! 127 CALL tra_swap ! swap 3D arrays (tb,sb,tn,sn) in a 4D array128 112 CALL eos( tsb, rhd, rhop ) ! before potential and in situ densities 129 113 #if ! defined key_c1d … … 150 134 END SUBROUTINE istate_init 151 135 152 153 SUBROUTINE istate_tem 136 SUBROUTINE istate_t_s 154 137 !!--------------------------------------------------------------------- 155 !! *** ROUTINE istate_t em***138 !! *** ROUTINE istate_t_s *** 156 139 !! 157 140 !! ** Purpose : Intialization of the temperature field with an 158 141 !! analytical profile or a file (i.e. in EEL configuration) 159 142 !! 160 !! ** Method : Use Philander analytic profile of temperature 143 !! ** Method : - temperature: use Philander analytic profile 144 !! - salinity : use to a constant value 35.5 161 145 !! 162 146 !! References : Philander ??? 163 147 !!---------------------------------------------------------------------- 164 INTEGER :: ji, jj, jk 148 INTEGER :: ji, jj, jk 149 REAL(wp) :: zsal = 35.50 165 150 !!---------------------------------------------------------------------- 166 151 ! 167 152 IF(lwp) WRITE(numout,*) 168 IF(lwp) WRITE(numout,*) 'istate_t em :initial temperature profile'169 IF(lwp) WRITE(numout,*) '~~~~~~~~~~ '153 IF(lwp) WRITE(numout,*) 'istate_t_s : Philander s initial temperature profile' 154 IF(lwp) WRITE(numout,*) '~~~~~~~~~~ and constant salinity (',zsal,' psu)' 170 155 ! 171 156 DO jk = 1, jpk 172 DO jj = 1, jpj 173 DO ji = 1, jpi 174 tn(ji,jj,jk) = ( ( ( 7.5 - 0.*ABS(gphit(ji,jj))/30. ) & 175 & *( 1.-TANH((fsdept(ji,jj,jk)-80.)/30.) ) & 176 & + 10.*(5000.-fsdept(ji,jj,jk))/5000.) ) * tmask(ji,jj,jk) 177 tb(ji,jj,jk) = tn(ji,jj,jk) 178 END DO 179 END DO 157 tsn(:,:,jk,jp_tem) = ( ( ( 7.5 - 0. * ABS( gphit(:,:) )/30. ) * ( 1.-TANH((fsdept(:,:,jk)-80.)/30.) ) & 158 & + 10. * ( 5000. - fsdept(:,:,jk) ) /5000.) ) * tmask(:,:,jk) 159 tsb(:,:,jk,jp_tem) = tsn(:,:,jk,jp_tem) 180 160 END DO 181 ! 182 IF(lwp) CALL prizre( tn , jpi , jpj , jpk , jpj/2 , & 183 & 1 , jpi , 5 , 1 , jpk , & 184 & 1 , 1. , numout ) 185 ! 186 END SUBROUTINE istate_tem 187 188 189 SUBROUTINE istate_sal 190 !!--------------------------------------------------------------------- 191 !! *** ROUTINE istate_sal *** 192 !! 193 !! ** Purpose : Intialize the salinity field with an analytic profile 194 !! 195 !! ** Method : Use to a constant value 35.5 196 !! 197 !! ** Action : Initialize sn and sb 198 !!---------------------------------------------------------------------- 199 REAL(wp) :: zsal = 35.50_wp 200 !!---------------------------------------------------------------------- 201 ! 202 IF(lwp) WRITE(numout,*) 203 IF(lwp) WRITE(numout,*) 'istate_sal : initial salinity : ', zsal 204 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 205 ! 206 sn(:,:,:) = zsal * tmask(:,:,:) 207 sb(:,:,:) = sn(:,:,:) 208 ! 209 END SUBROUTINE istate_sal 161 tsn(:,:,:,jp_sal) = zsal * tmask(:,:,:) 162 tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 163 ! 164 END SUBROUTINE istate_t_s 210 165 211 166 … … 254 209 ! 255 210 DO jk = 1, jpk 256 t n(:,:,jk) = ( zt2 + zt1 * exp( - fsdept(:,:,jk) / 1000 ) ) * tmask(:,:,jk)257 t b(:,:,jk) = tn(:,:,jk)211 tsn(:,:,jk,jp_tem) = ( zt2 + zt1 * exp( - fsdept(:,:,jk) / 1000 ) ) * tmask(:,:,jk) 212 tsb(:,:,jk,jp_tem) = tsn(:,:,jk,jp_tem) 258 213 END DO 259 214 ! 260 IF(lwp) CALL prizre( t n, jpi , jpj , jpk , jpj/2 , &261 & 1 , jpi , 5 , 1 , jpk , &262 & 1 , 1. , numout )215 IF(lwp) CALL prizre( tsn(:,:,:,jp_tem), jpi , jpj , jpk , jpj/2 , & 216 & 1 , jpi , 5 , 1 , jpk , & 217 & 1 , 1. , numout ) 263 218 ! 264 219 ! set salinity field to a constant value … … 268 223 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 269 224 ! 270 sn(:,:,:) = zsal * tmask(:,:,:)271 sb(:,:,:) = sn(:,:,:)225 tsn(:,:,:,jp_sal) = zsal * tmask(:,:,:) 226 tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 272 227 ! 273 228 ! set the dynamics: U,V, hdiv, rot (and ssh if necessary) … … 323 278 ! 324 279 CALL iom_open ( 'eel.initemp', inum ) 325 CALL iom_get ( inum, jpdom_data, 'initemp', t b) ! read before temprature (tb)280 CALL iom_get ( inum, jpdom_data, 'initemp', tsb(:,:,:,jp_tem) ) ! read before temprature (tb) 326 281 CALL iom_close( inum ) 327 282 ! 328 t n(:,:,:) = tb(:,:,:) ! set nox temperature to tb329 ! 330 IF(lwp) CALL prizre( t n, jpi , jpj , jpk , jpj/2 , &331 & 1 , jpi , 5 , 1 , jpk , &332 & 1 , 1. , numout )283 tsn(:,:,:,jp_tem) = tsb(:,:,:,jp_tem) ! set nox temperature to tb 284 ! 285 IF(lwp) CALL prizre( tsn(:,:,:,jp_tem), jpi , jpj , jpk , jpj/2 , & 286 & 1 , jpi , 5 , 1 , jpk , & 287 & 1 , 1. , numout ) 333 288 ! 334 289 ! set salinity field to a constant value … … 338 293 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 339 294 ! 340 sn(:,:,:) = zsal * tmask(:,:,:)341 sb(:,:,:) = sn(:,:,:)295 tsn(:,:,:,jp_sal) = zsal * tmask(:,:,:) 296 tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 342 297 ! 343 298 ! ! =========================== … … 377 332 DO jj = 1, jpj 378 333 DO ji = 1, jpi 379 t n(ji,jj,jk) = ( 16. - 12. * TANH( (fsdept(ji,jj,jk) - 400) / 700 ) ) &334 tsn(ji,jj,jk,jp_tem) = ( 16. - 12. * TANH( (fsdept(ji,jj,jk) - 400) / 700 ) ) & 380 335 & * (-TANH( (500-fsdept(ji,jj,jk)) / 150 ) + 1) / 2 & 381 336 & + ( 15. * ( 1. - TANH( (fsdept(ji,jj,jk)-50.) / 1500.) ) & … … 383 338 & + 7. * (1500. - fsdept(ji,jj,jk)) / 1500. ) & 384 339 & * (-TANH( (fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 385 t n(ji,jj,jk) = tn(ji,jj,jk) * tmask(ji,jj,jk)386 t b(ji,jj,jk) = tn(ji,jj,jk)387 388 sn(ji,jj,jk) = ( 36.25 - 1.13 * TANH( (fsdept(ji,jj,jk) - 305) / 460 ) ) &340 tsn(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) 341 tsb(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem) 342 343 tsn(ji,jj,jk,jp_sal) = ( 36.25 - 1.13 * TANH( (fsdept(ji,jj,jk) - 305) / 460 ) ) & 389 344 & * (-TANH((500 - fsdept(ji,jj,jk)) / 150) + 1) / 2 & 390 345 & + ( 35.55 + 1.25 * (5000. - fsdept(ji,jj,jk)) / 5000. & … … 393 348 & + 0.2 * TANH( (fsdept(ji,jj,jk) - 1000.) / 5000.) ) & 394 349 & * (-TANH((fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 395 sn(ji,jj,jk) = sn(ji,jj,jk) * tmask(ji,jj,jk)396 sb(ji,jj,jk) = sn(ji,jj,jk)350 tsn(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk) 351 tsb(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal) 397 352 END DO 398 353 END DO … … 408 363 ! ---------------------- 409 364 CALL iom_open ( 'data_tem', inum ) 410 CALL iom_get ( inum, jpdom_data, 'votemper', t n)365 CALL iom_get ( inum, jpdom_data, 'votemper', tsn(:,:,:,jp_tem) ) 411 366 CALL iom_close( inum ) 412 367 413 t n(:,:,:) = tn(:,:,:) * tmask(:,:,:)414 t b(:,:,:) = tn(:,:,:)368 tsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) * tmask(:,:,:) 369 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 415 370 416 371 ! Read salinity field 417 372 ! ------------------- 418 373 CALL iom_open ( 'data_sal', inum ) 419 CALL iom_get ( inum, jpdom_data, 'vosaline', sn)374 CALL iom_get ( inum, jpdom_data, 'vosaline', tsn(:,:,:,jp_sal) ) 420 375 CALL iom_close( inum ) 421 376 422 sn(:,:,:) = sn(:,:,:) * tmask(:,:,:)423 sb(:,:,:) = sn(:,:,:)377 tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) * tmask(:,:,:) 378 tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 424 379 425 380 END SELECT … … 429 384 WRITE(numout,*) ' Initial temperature and salinity profiles:' 430 385 WRITE(numout, "(9x,' level gdept_0 temperature salinity ')" ) 431 WRITE(numout, "(10x, i4, 3f10.2)" ) ( jk, gdept_0(jk), t n(2,2,jk), sn(2,2,jk), jk = 1, jpk )386 WRITE(numout, "(10x, i4, 3f10.2)" ) ( jk, gdept_0(jk), tsn(2,2,jk,jp_tem), tsn(2,2,jk,jp_sal), jk = 1, jpk ) 432 387 ENDIF 433 388 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90
r2715 r2789 48 48 !!---------------------------------------------------------------------- 49 49 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 50 USE oce , ONLY: zfu => ta , zfv => sa ! (ta,sa) used as3D workspace50 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 51 51 USE wrk_nemo, ONLY: zfu_t => wrk_3d_1 , zfv_t => wrk_3d_4 , zfu_uw =>wrk_3d_6 ! 3D workspaces 52 52 USE wrk_nemo, ONLY: zfu_f => wrk_3d_2 , zfv_f => wrk_3d_5 , zfv_vw =>wrk_3d_7 53 USE wrk_nemo, ONLY: zfw => wrk_3d_3 53 USE wrk_nemo, ONLY: zfw => wrk_3d_3 54 54 ! 55 55 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 57 57 INTEGER :: ji, jj, jk ! dummy loop indices 58 58 REAL(wp) :: zbu, zbv ! local scalars 59 REAL(wp), POINTER, DIMENSION(:,:,:) :: zfu, zfv 59 60 !!---------------------------------------------------------------------- 60 61 … … 69 70 CALL ctl_stop('dyn_adv_cen2 : requested workspace array unavailable') ; RETURN 70 71 ENDIF 71 72 ! 73 zfu => tsa(:,:,:,1) 74 zfv => tsa(:,:,:,2) 75 ! 72 76 IF( l_trddyn ) THEN ! Save ua and va trends 73 77 zfu_uw(:,:,:) = ua(:,:,:) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90
r2715 r2789 69 69 !!---------------------------------------------------------------------- 70 70 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 71 USE oce , ONLY: zfu => ta , zfv => sa ! (ta,sa) used as3D workspace71 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 72 72 USE wrk_nemo, ONLY: zfu_t => wrk_3d_1 , zfv_t =>wrk_3d_4 , zfu_uw =>wrk_3d_6 ! 3D workspace 73 73 USE wrk_nemo, ONLY: zfu_f => wrk_3d_2 , zfv_f =>wrk_3d_5 , zfv_vw =>wrk_3d_7 … … 81 81 REAL(wp) :: zbu, zbv ! temporary scalars 82 82 REAL(wp) :: zui, zvj, zfuj, zfvi, zl_u, zl_v ! temporary scalars 83 REAL(wp), POINTER, DIMENSION(:,:,:) :: zfu, zfv 83 84 !!---------------------------------------------------------------------- 84 85 … … 93 94 CALL ctl_stop('dyn_adv_ubs: requested workspace array unavailable') ; RETURN 94 95 ENDIF 95 96 ! 97 zfu => tsa(:,:,:,1) 98 zfv => tsa(:,:,:,2) 99 ! 96 100 zfu_t(:,:,:) = 0._wp 97 101 zfv_t(:,:,:) = 0._wp -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
r2715 r2789 77 77 !! - Save the trend (l_trddyn=T) 78 78 !!---------------------------------------------------------------------- 79 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 80 USE wrk_nemo, ONLY: ztrdu => wrk_3d_1 , ztrdv => wrk_3d_2 ! 3D workspace 79 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 81 80 !! 82 81 INTEGER, INTENT(in) :: kt ! ocean time-step index 83 !!---------------------------------------------------------------------- 84 ! 85 IF( wrk_in_use(3, 1,2) ) THEN 86 CALL ctl_stop('dyn_hpg: requested workspace arrays are unavailable') ; RETURN 87 ENDIF 82 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 83 !!---------------------------------------------------------------------- 88 84 ! 89 85 IF( l_trddyn ) THEN ! Temporary saving of ua and va trends (l_trddyn) 86 ztrdu => tsa(:,:,:,1) 87 ztrdv => tsa(:,:,:,2) 88 ! 90 89 ztrdu(:,:,:) = ua(:,:,:) 91 90 ztrdv(:,:,:) = va(:,:,:) … … 110 109 IF(ln_ctl) CALL prt_ctl( tab3d_1=ua, clinfo1=' hpg - Ua: ', mask1=umask, & 111 110 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 112 !113 IF( wrk_not_released(3, 1,2) ) CALL ctl_stop('dyn_hpg: failed to release workspace arrays')114 111 ! 115 112 END SUBROUTINE dyn_hpg … … 193 190 !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 194 191 !!---------------------------------------------------------------------- 195 USE oce, ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace192 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 196 193 !! 197 194 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 199 196 INTEGER :: ji, jj, jk ! dummy loop indices 200 197 REAL(wp) :: zcoef0, zcoef1 ! temporary scalars 198 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 201 199 !!---------------------------------------------------------------------- 202 200 201 zhpi => tsa(:,:,:,1) 202 zhpj => tsa(:,:,:,2) 203 ! 203 204 IF( kt == nit000 ) THEN 204 205 IF(lwp) WRITE(numout,*) … … 221 222 END DO 222 223 END DO 224 223 225 ! 224 226 ! interior value (2=<jk=<jpkm1) … … 253 255 !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 254 256 !!---------------------------------------------------------------------- 255 USE oce, ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace257 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 256 258 !! 257 259 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 260 262 INTEGER :: iku, ikv ! temporary integers 261 263 REAL(wp) :: zcoef0, zcoef1, zcoef2, zcoef3 ! temporary scalars 262 !!---------------------------------------------------------------------- 263 264 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 265 !!---------------------------------------------------------------------- 266 267 zhpi => tsa(:,:,:,1) 268 zhpj => tsa(:,:,:,2) 269 ! 264 270 IF( kt == nit000 ) THEN 265 271 IF(lwp) WRITE(numout,*) … … 267 273 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ z-coordinate with partial steps - vector optimization' 268 274 ENDIF 275 269 276 270 277 ! Local constant initialization … … 284 291 END DO 285 292 293 286 294 ! interior value (2=<jk=<jpkm1) 287 295 DO jk = 2, jpkm1 … … 303 311 END DO 304 312 END DO 313 305 314 306 315 ! partial steps correction at the last level (use gru & grv computed in zpshde.F90) … … 333 342 END DO 334 343 ! 344 335 345 END SUBROUTINE hpg_zps 336 346 … … 354 364 !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 355 365 !!---------------------------------------------------------------------- 356 USE oce, ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace366 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 357 367 !! 358 368 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 360 370 INTEGER :: ji, jj, jk ! dummy loop indices 361 371 REAL(wp) :: zcoef0, zuap, zvap, znad ! temporary scalars 362 !!---------------------------------------------------------------------- 363 372 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 373 !!---------------------------------------------------------------------- 374 375 zhpi => tsa(:,:,:,1) 376 zhpj => tsa(:,:,:,2) 377 ! 364 378 IF( kt == nit000 ) THEN 365 379 IF(lwp) WRITE(numout,*) … … 439 453 !! - Save the trend (l_trddyn=T) 440 454 !!---------------------------------------------------------------------- 441 USE oce, ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace455 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 442 456 !! 443 457 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 445 459 INTEGER :: ji, jj, jk ! dummy loop indices 446 460 REAL(wp) :: zcoef0, zuap, zvap ! temporary scalars 447 !!---------------------------------------------------------------------- 448 461 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 462 !!---------------------------------------------------------------------- 463 464 zhpi => tsa(:,:,:,1) 465 zhpj => tsa(:,:,:,2) 466 ! 449 467 IF( kt == nit000 ) THEN 450 468 IF(lwp) WRITE(numout,*) … … 515 533 !! Reference : Song, Mon. Wea. Rev., 126, 3213-3230, 1998. 516 534 !!---------------------------------------------------------------------- 517 USE oce, ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace535 USE oce, ONLY: tsa ! (tsa) used as 2 3D workspace 518 536 !! 519 537 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 522 540 REAL(wp) :: zcoef0, zuap, zvap ! temporary scalars 523 541 REAL(wp) :: zalph , zbeta ! " " 524 !!---------------------------------------------------------------------- 525 542 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 543 !!---------------------------------------------------------------------- 544 ! 545 zhpi => tsa(:,:,:,1) 546 zhpj => tsa(:,:,:,2) 547 ! 526 548 IF( kt == nit000 ) THEN 527 549 IF(lwp) WRITE(numout,*) … … 595 617 !!---------------------------------------------------------------------- 596 618 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 597 USE oce , ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace619 USE oce , ONLY: tsa ! (tsa) used as 2 3D workspace 598 620 USE wrk_nemo, ONLY: drhox => wrk_3d_1 , dzx => wrk_3d_2 599 621 USE wrk_nemo, ONLY: drhou => wrk_3d_3 , dzu => wrk_3d_4 , rho_i => wrk_3d_5 … … 610 632 REAL(wp) :: z1_10, cffu, cffx ! " " 611 633 REAL(wp) :: z1_12, cffv, cffy ! " " 634 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 612 635 !!---------------------------------------------------------------------- 613 636 … … 615 638 CALL ctl_stop('dyn:hpg_djc: requested workspace arrays unavailable') ; RETURN 616 639 ENDIF 640 ! 641 zhpi => tsa(:,:,:,1) 642 zhpj => tsa(:,:,:,2) 617 643 618 644 IF( kt == nit000 ) THEN … … 826 852 !!---------------------------------------------------------------------- 827 853 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 828 USE oce , ONLY: zhpi => ta , zhpj => sa ! (ta,sa) used as3D workspace854 USE oce , ONLY: tsa ! (tsa) used as 2 3D workspace 829 855 USE wrk_nemo, ONLY: zdistr => wrk_2d_1 , zsina => wrk_2d_2 , zcosa => wrk_2d_3 830 856 USE wrk_nemo, ONLY: zhpiorg => wrk_3d_1 , zhpirot => wrk_3d_2 … … 838 864 REAL(wp) :: zforg, zcoef0, zuap, zmskd1, zmskd1m ! temporary scalar 839 865 REAL(wp) :: zfrot , zvap, zmskd2, zmskd2m ! " " 866 REAL(wp), POINTER, DIMENSION(:,:,:) :: zhpi, zhpj 840 867 !!---------------------------------------------------------------------- 841 868 … … 844 871 CALL ctl_stop('dyn:hpg_rot: requested workspace arrays unavailable') ; RETURN 845 872 ENDIF 873 ! 874 zhpi => tsa(:,:,:,1) 875 zhpj => tsa(:,:,:,2) 846 876 847 877 IF( kt == nit000 ) THEN -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
r2777 r2789 53 53 !!---------------------------------------------------------------------- 54 54 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 55 USE oce , ONLY: ztrdu => ta , ztrdv => sa ! (ta,sa) used as 3D workspace55 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 56 56 USE wrk_nemo, ONLY: zhke => wrk_3d_1 ! 3D workspace 57 57 !! … … 60 60 INTEGER :: ji, jj, jk ! dummy loop indices 61 61 REAL(wp) :: zu, zv ! temporary scalars 62 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 62 63 !!---------------------------------------------------------------------- 63 64 … … 73 74 74 75 IF( l_trddyn ) THEN ! Save ua and va trends 76 ztrdu => tsa(:,:,:,1) 77 ztrdv => tsa(:,:,:,2) 78 ! 75 79 ztrdu(:,:,:) = ua(:,:,:) 76 80 ztrdv(:,:,:) = va(:,:,:) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
r2715 r2789 86 86 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 87 87 USE wrk_nemo, ONLY: zwk1 => wrk_3d_3 , zwk2 => wrk_3d_4 ! 3D workspace 88 USE oce , ONLY: zwk3 => ta , zwk4 => sa ! ta, sa used as 3D workspace88 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 89 89 ! 90 90 INTEGER, INTENT( in ) :: kt ! ocean time-step index 91 91 ! 92 92 INTEGER :: ji, jj, jk ! dummy loop indices 93 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwk3, zwk4 93 94 !!---------------------------------------------------------------------- 94 95 … … 96 97 CALL ctl_stop('dyn_ldf_bilapg: requested workspace arrays unavailable') ; RETURN 97 98 ENDIF 98 99 ! 100 zwk3 => tsa(:,:,:,1) 101 zwk4 => tsa(:,:,:,2) 102 ! 99 103 IF( kt == nit000 ) THEN 100 104 IF(lwp) WRITE(numout,*) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
r2779 r2789 93 93 !!---------------------------------------------------------------------- 94 94 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 95 USE oce , ONLY: ze3u_f => ta , ze3v_f => sa ! (ta,sa) used as3D workspace95 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 96 96 USE wrk_nemo, ONLY: zs_t => wrk_2d_1 , zs_u_1 => wrk_2d_2 , zs_v_1 => wrk_2d_3 97 97 ! … … 105 105 REAL(wp) :: zve3a, zve3n, zve3b, zvf ! - - 106 106 REAL(wp) :: zec, zv_t_ij, zv_t_ip1j, zv_t_ijp1 107 REAL(wp), POINTER, DIMENSION(:,:,:) :: ze3u_f, ze3v_f 107 108 !!---------------------------------------------------------------------- 108 109 … … 110 111 CALL ctl_stop('dyn_nxt: requested workspace arrays unavailable') ; RETURN 111 112 ENDIF 112 113 ! 114 ze3u_f => tsa(:,:,:,1) 115 ze3v_f => tsa(:,:,:,2) 116 ! 113 117 IF( kt == nit000 ) THEN 114 118 IF(lwp) WRITE(numout,*) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r2715 r2789 103 103 !! References : Roullet and Madec 1999, JGR. 104 104 !!--------------------------------------------------------------------- 105 USE oce, ONLY: zub => ta , zvb => sa ! (ta,sa) used asworkspace105 USE oce, ONLY: tsa ! tsa used as 2 3D workspace 106 106 !! 107 107 INTEGER, INTENT(in ) :: kt ! ocean time-step index … … 110 110 INTEGER :: ji, jj, jk ! dummy loop indices 111 111 REAL(wp) :: z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv ! local scalars 112 REAL(wp), POINTER, DIMENSION(:,:,:) :: zub, zvb 112 113 !!---------------------------------------------------------------------- 114 ! 115 zub => tsa(:,:,:,1) 116 zvb => tsa(:,:,:,2) 113 117 ! 114 118 IF( kt == nit000 ) THEN -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
r2715 r2789 71 71 !! and planetary vorticity trends) ('key_trddyn') 72 72 !!---------------------------------------------------------------------- 73 USE oce, ONLY: ztrdu => ta , ztrdv => sa ! (ta,sa) used as3D workspace74 ! 73 USE oce, ONLY: tsa ! tsa used as 2 3D workspace 74 !! 75 75 INTEGER, INTENT( in ) :: kt ! ocean time-step index 76 !!---------------------------------------------------------------------- 76 ! 77 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 78 !!---------------------------------------------------------------------- 79 ! 80 IF( l_trddyn ) THEN 81 ztrdu => tsa(:,:,:,1) 82 ztrdv => tsa(:,:,:,2) 83 END IF 77 84 ! 78 85 ! ! vorticity term -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
r2715 r2789 52 52 !! ** Action : - Update (ua,va) with the vert. momentum adv. trends 53 53 !! - Save the trends in (ztrdu,ztrdv) ('key_trddyn') 54 !!----------------------------------------------------------------------55 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released54 !!---------------------------------------------------------------------- 55 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 56 56 USE wrk_nemo, ONLY: zww => wrk_2d_1 ! 2D workspace 57 USE oce , ONLY: zwuw => ta , zwvw => sa ! (ta,sa) used as3D workspace57 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 58 58 USE wrk_nemo, ONLY: ztrdu => wrk_3d_1 , ztrdv => wrk_3d_2 ! 3D workspace 59 ! 59 !! 60 60 INTEGER, INTENT(in) :: kt ! ocean time-step inedx 61 61 ! 62 62 INTEGER :: ji, jj, jk ! dummy loop indices 63 63 REAL(wp) :: zua, zva ! temporary scalars 64 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwuw , zwvw 64 65 !!---------------------------------------------------------------------- 65 66 66 IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1,2) ) THEN 67 IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1,2) ) THEN 67 68 CALL ctl_stop('dyn_zad: requested workspace arrays unavailable') ; RETURN 68 69 ENDIF 69 70 ! 71 zwuw => tsa(:,:,:,1) 72 zwvw => tsa(:,:,:,2) 73 ! 70 74 IF( kt == nit000 ) THEN 71 75 IF(lwp)WRITE(numout,*) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
r2715 r2789 55 55 !!--------------------------------------------------------------------- 56 56 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 57 USE oce , ONLY: zwx => ta , zwy => sa ! (ta,sa) used as3D workspace58 USE wrk_nemo, ONLY: zwz => wrk_3d_ 1 , zww => wrk_3d_2! 3D workspace57 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 58 USE wrk_nemo, ONLY: zwz => wrk_3d_3 , zww => wrk_3d_4 ! 3D workspace 59 59 ! 60 60 INTEGER , INTENT(in) :: kt ! ocean time-step index … … 63 63 INTEGER :: ji, jj, jk, jl ! dummy loop indices 64 64 REAL(wp) :: zrau0r, zlavmr, zua, zva ! local scalars 65 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwx, zwy 65 66 !!---------------------------------------------------------------------- 66 67 67 IF( wrk_in_use(3, 1,2) ) THEN68 IF( wrk_in_use(3, 3,4) ) THEN 68 69 CALL ctl_stop('dyn_zdf_exp: requested workspace arrays unavailable') ; RETURN 69 70 ENDIF 70 71 ! 72 zwx => tsa(:,:,:,1) 73 zwy => tsa(:,:,:,2) 74 ! 71 75 IF( kt == nit000 .AND. lwp ) THEN 72 76 WRITE(numout,*) … … 120 124 END DO ! End of time splitting 121 125 ! 122 IF( wrk_not_released(3, 1,2) ) CALL ctl_stop('dyn_zdf_exp: failed to release workspace arrays')126 IF( wrk_not_released(3, 3,4) ) CALL ctl_stop('dyn_zdf_exp: failed to release workspace arrays') 123 127 ! 124 128 END SUBROUTINE dyn_zdf_exp -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
r2715 r2789 55 55 !!--------------------------------------------------------------------- 56 56 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 57 USE oce , ONLY: zwd => ta , zws => sa ! (ta,sa) used as3D workspace57 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 58 58 USE wrk_nemo, ONLY: zwi => wrk_3d_3 ! 3D workspace 59 59 !! … … 63 63 INTEGER :: ji, jj, jk ! dummy loop indices 64 64 REAL(wp) :: z1_p2dt, zcoef, zzwi, zzws, zrhs ! local scalars 65 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwd, zws 65 66 !!---------------------------------------------------------------------- 66 67 … … 68 69 CALL ctl_stop('dyn_zdf_imp: requested workspace array unavailable') ; RETURN 69 70 END IF 70 71 ! 72 zwd => tsa(:,:,:,1) 73 zws => tsa(:,:,:,2) 74 ! 71 75 IF( kt == nit000 ) THEN 72 76 IF(lwp) WRITE(numout,*) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r2715 r2789 75 75 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 76 76 !!---------------------------------------------------------------------- 77 USE wrk_nemo, ONLY: 78 USE oce , ONLY: z3d => ta ! ta used as3D workspace79 USE wrk_nemo, ONLY: zhdiv => wrk_2d_1 , z2d => wrk_2d_2 ! 2D workspace80 ! 77 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 78 USE oce , ONLY: tsa ! tsa used as 2 3D workspace 79 USE wrk_nemo, ONLY: zhdiv => wrk_2d_1, z2d => wrk_2d_2 80 !! 81 81 INTEGER, INTENT(in) :: kt ! time step 82 82 ! 83 83 INTEGER :: ji, jj, jk ! dummy loop indices 84 84 REAL(wp) :: zcoefu, zcoefv, zcoeff, z2dt, z1_2dt, z1_rau0 ! local scalars 85 REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d 85 86 !!---------------------------------------------------------------------- 86 87 … … 230 231 IF( lk_diaar5 ) THEN ! vertical mass transport & its square value 231 232 ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 233 z3d => tsa(:,:,:,1) 232 234 z2d(:,:) = rau0 * e1t(:,:) * e2t(:,:) 233 235 DO jk = 1, jpk -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90
r2715 r2789 127 127 ! Change by Alexandra Bozec et Jean-Philippe Boulanger 128 128 ! We save the instantaneous profile of T and S of the column 129 ! ztemp(jfl)=t n(iafloc,ibfloc,icfl)130 ! zsal(jfl)= sn(iafloc,ibfloc,icfl)131 ztemp(1:jpk,jfl) = t n(iafloc,ibfloc,1:jpk)132 zsal (1:jpk,jfl) = sn(iafloc,ibfloc,1:jpk)129 ! ztemp(jfl)=tsn(iafloc,ibfloc,icfl,jp_tem) 130 ! zsal(jfl)=tsn(iafloc,ibfloc,icfl,jp_sal) 131 ztemp(1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_tem) 132 zsal (1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_sal) 133 133 ELSE 134 134 flxx(jfl) = 0. … … 187 187 ! Change by Alexandra Bozec et Jean-Philippe Boulanger 188 188 ! We save the instantaneous profile of T and S of the column 189 ! ztemp(jfl)=t n(iafloc,ibfloc,icfl)190 ! zsal(jfl)= sn(iafloc,ibfloc,icfl)191 ztemp(1:jpk,jfl) = t n(iafloc,ibfloc,1:jpk)192 zsal (1:jpk,jfl) = sn(iafloc,ibfloc,1:jpk)189 ! ztemp(jfl)=tsn(iafloc,ibfloc,icfl,jp_tem) 190 ! zsal(jfl)=tsn(iafloc,ibfloc,icfl,jp_sal) 191 ztemp(1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_tem) 192 zsal (1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_sal) 193 193 END DO 194 194 ENDIF … … 224 224 ! ibfloc=ibfln 225 225 !# endif 226 ! ztemp(jfl)=t n(iafloc,ibfloc,jk)227 ! zsal(jfl)= sn(iaflo!,ibfloc,jk)226 ! ztemp(jfl)=tsn(iafloc,ibfloc,jk,jp_tem) 227 ! zsal(jfl)=tsn(iaflo!,ibfloc,jk,jp_sal) 228 228 !# if defined key_mpp_mpi 229 229 ! ELSE -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r2528 r2789 24 24 USE trdmld_oce ! ocean active mixed layer tracers trends variables 25 25 USE domvvl ! variable volume 26 USE traswp ! swap from 4D T-S to 3D T & S and vice versa27 26 28 27 IMPLICIT NONE … … 117 116 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub ) ! before fields 118 117 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb ) 119 CALL iom_rstput( kt, nitrst, numrow, 'tb' , t b)120 CALL iom_rstput( kt, nitrst, numrow, 'sb' , sb)118 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tsb(:,:,:,jp_tem) ) 119 CALL iom_rstput( kt, nitrst, numrow, 'sb' , tsb(:,:,:,jp_sal) ) 121 120 CALL iom_rstput( kt, nitrst, numrow, 'rotb' , rotb ) 122 121 CALL iom_rstput( kt, nitrst, numrow, 'hdivb' , hdivb ) … … 126 125 CALL iom_rstput( kt, nitrst, numrow, 'un' , un ) ! now fields 127 126 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vn ) 128 CALL iom_rstput( kt, nitrst, numrow, 'tn' , t n)129 CALL iom_rstput( kt, nitrst, numrow, 'sn' , sn)127 CALL iom_rstput( kt, nitrst, numrow, 'tn' , tsn(:,:,:,jp_tem) ) 128 CALL iom_rstput( kt, nitrst, numrow, 'sn' , tsn(:,:,:,jp_sal) ) 130 129 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn ) 131 130 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn ) … … 186 185 CALL iom_get( numror, jpdom_autoglo, 'ub' , ub ) ! before fields 187 186 CALL iom_get( numror, jpdom_autoglo, 'vb' , vb ) 188 CALL iom_get( numror, jpdom_autoglo, 'tb' , t b)189 CALL iom_get( numror, jpdom_autoglo, 'sb' , sb)187 CALL iom_get( numror, jpdom_autoglo, 'tb' , tsb(:,:,:,jp_tem) ) 188 CALL iom_get( numror, jpdom_autoglo, 'sb' , tsb(:,:,:,jp_sal) ) 190 189 CALL iom_get( numror, jpdom_autoglo, 'rotb' , rotb ) 191 190 CALL iom_get( numror, jpdom_autoglo, 'hdivb' , hdivb ) … … 195 194 CALL iom_get( numror, jpdom_autoglo, 'un' , un ) ! now fields 196 195 CALL iom_get( numror, jpdom_autoglo, 'vn' , vn ) 197 CALL iom_get( numror, jpdom_autoglo, 'tn' , t n)198 CALL iom_get( numror, jpdom_autoglo, 'sn' , sn)196 CALL iom_get( numror, jpdom_autoglo, 'tn' , tsn(:,:,:,jp_tem) ) 197 CALL iom_get( numror, jpdom_autoglo, 'sn' , tsn(:,:,:,jp_sal) ) 199 198 CALL iom_get( numror, jpdom_autoglo, 'rotn' , rotn ) 200 199 CALL iom_get( numror, jpdom_autoglo, 'hdivn' , hdivn ) … … 205 204 CALL iom_get( numror, jpdom_autoglo, 'rhd' , rhd ) ! now in situ density anomaly 206 205 ELSE 207 CALL tra_swap208 206 CALL eos( tsn, rhd ) ! compute rhd 209 207 ENDIF … … 211 209 ! 212 210 IF( neuler == 0 ) THEN ! Euler restart (neuler=0) 213 tb (:,:,:) = tn (:,:,:) ! all before fields set to now values 214 sb (:,:,:) = sn (:,:,:) 215 ub (:,:,:) = un (:,:,:) 216 vb (:,:,:) = vn (:,:,:) 217 rotb (:,:,:) = rotn (:,:,:) 218 hdivb(:,:,:) = hdivn(:,:,:) 219 sshb (:,:) = sshn (:,:) 211 tsb (:,:,:,:) = tsn (:,:,:,:) ! all before fields set to now values 212 ub (:,:,:) = un (:,:,:) 213 vb (:,:,:) = vn (:,:,:) 214 rotb (:,:,:) = rotn (:,:,:) 215 hdivb(:,:,:) = hdivn(:,:,:) 216 sshb (:,:) = sshn (:,:) 220 217 IF( lk_vvl ) THEN 221 218 DO jk = 1, jpk -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90
r2715 r2789 387 387 DO ji = mi0(161), mi1(161) 388 388 DO jk = 1, jpkm1 ! surf inflow + reciculation (from Gulf of Aden) 389 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_161_88_kt(jk) * tn(ji,jj,jk)390 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_161_88_kt(jk) * sn(ji,jj,jk)389 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_161_88_kt(jk) * tsn(ji,jj,jk,jp_tem) 390 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_161_88_kt(jk) * tsn(ji,jj,jk,jp_sal) 391 391 END DO 392 392 END DO … … 395 395 DO ji = mi0(161), mi1(161) 396 396 jk = 21 ! deep outflow + recirulation (combined flux) 397 t a(ji,jj,jk) = ta(ji,jj,jk) + hdiv_161_88(20) * tn(ji ,jj+1,20) & ! upper recirculation from Gulf of Aden398 & + hdiv_161_88(21) * t n(ji ,jj+1,21) & ! deep recirculation from Gulf of Aden399 & + hdiv_160_89(16) * t n(ji-1,jj+2,16) ! deep inflow from Red sea400 sa(ji,jj,jk) = sa(ji,jj,jk) + hdiv_161_88(20) * sn(ji ,jj+1,20) &401 & + hdiv_161_88(21) * sn(ji ,jj+1,21) &402 & + hdiv_160_89(16) * sn(ji-1,jj+2,16)397 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + hdiv_161_88(20) * tsn(ji ,jj+1,20,jp_tem) & ! upper recirculation from Gulf of Aden 398 & + hdiv_161_88(21) * tsn(ji ,jj+1,21,jp_tem) & ! deep recirculation from Gulf of Aden 399 & + hdiv_160_89(16) * tsn(ji-1,jj+2,16,jp_tem) ! deep inflow from Red sea 400 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) + hdiv_161_88(20) * tsn(ji ,jj+1,20,jp_sal) & 401 & + hdiv_161_88(21) * tsn(ji ,jj+1,21,jp_sal) & 402 & + hdiv_160_89(16) * tsn(ji-1,jj+2,16,jp_sal) 403 403 END DO 404 404 END DO … … 406 406 DO ji = mi0(160), mi1(160) 407 407 DO jk = 1, 14 ! surface inflow (from Gulf of Aden) 408 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_160_89_kt(jk) * tn(ji+1,jj-1,jk)409 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_160_89_kt(jk) * sn(ji+1,jj-1,jk)410 END DO 411 ! 412 t a(ji,jj,16) = ta(ji,jj,16) - hdiv_160_89(jk) * tn(ji,jj,jk)413 sa(ji,jj,16) = sa(ji,jj,16) - hdiv_160_89(jk) * sn(ji,jj,jk)408 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_160_89_kt(jk) * tsn(ji+1,jj-1,jk,jp_tem) 409 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_160_89_kt(jk) * tsn(ji+1,jj-1,jk,jp_sal) 410 END DO 411 ! ! deep outflow (from Red sea) 412 tsa(ji,jj,16,jp_tem) = tsa(ji,jj,16,jp_tem) - hdiv_160_89(16) * tsn(ji,jj,16,jp_tem) 413 tsa(ji,jj,16,jp_sal) = tsa(ji,jj,16,jp_sal) - hdiv_160_89(16) * tsn(ji,jj,16,jp_sal) 414 414 END DO 415 415 END DO … … 577 577 DO ji = mi0(139), mi1(139) 578 578 DO jk = 1, jpkm1 ! surf inflow + mid. & bottom reciculation (from Atlantic) 579 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_139_101_kt(jk) * tn(ji,jj,jk)580 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_139_101_kt(jk) * sn(ji,jj,jk)579 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_139_101_kt(jk) * tsn(ji,jj,jk,jp_tem) 580 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_139_101_kt(jk) * tsn(ji,jj,jk,jp_sal) 581 581 END DO 582 582 END DO … … 586 586 DO ji = mi0(139), mi1(139) 587 587 DO jk = 15, 20 ! middle reciculation (Atl 101 -> Atl 102) (div <0) 588 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_139_102(jk) * tn(ji,jj-1,jk) ! middle Atlantic recirculation589 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_139_102(jk) * sn(ji,jj-1,jk)588 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_139_102(jk) * tsn(ji,jj-1,jk,jp_tem) ! middle Atlantic recirculation 589 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_139_102(jk) * tsn(ji,jj-1,jk,jp_sal) 590 590 END DO 591 591 ! ! upper & bottom Atl. reciculation (Atl 101 -> Atl 102) - (div <0) 592 592 ! ! deep Med flow (Med 102 -> Atl 102) - (div <0) 593 t a(ji,jj,22) = ta(ji,jj,22) + hdiv_141_102(21) * tn(ji+2,jj ,21) & ! deep Med flow594 & + hdiv_139_101(21) * t n(ji ,jj-1,21) & ! upper Atlantic recirculation595 & + hdiv_139_101(22) * t n(ji ,jj-1,22) ! bottom Atlantic recirculation596 sa(ji,jj,22) = sa(ji,jj,22) + hdiv_141_102(21) * sn(ji+2,jj ,21) &597 & + hdiv_139_101(21) * sn(ji ,jj-1,21) &598 & + hdiv_139_101(22) * sn(ji ,jj-1,22)593 tsa(ji,jj,22,jp_tem) = tsa(ji,jj,22,jp_tem) + hdiv_141_102(21) * tsn(ji+2,jj,21,jp_tem) & ! deep Med flow 594 & + hdiv_139_101(21) * tsn(ji,jj-1,21,jp_tem) & ! upper Atlantic recirculation 595 & + hdiv_139_101(22) * tsn(ji,jj-1,22,jp_tem) ! bottom Atlantic recirculation 596 tsa(ji,jj,22,jp_sal) = tsa(ji,jj,22,jp_sal) + hdiv_141_102(21) * tsn(ji+2,jj,21,jp_sal) & 597 & + hdiv_139_101(21) * tsn(ji,jj-1,21,jp_sal) & 598 & + hdiv_139_101(22) * tsn(ji,jj-1,22,jp_sal) 599 599 END DO 600 600 END DO … … 602 602 DO ji = mi0(141), mi1(141) 603 603 DO jk = 1, 14 ! surface flow from Atlantic to Med sea 604 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_141_102_kt(jk) * tn(ji-2,jj-1,jk)605 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_141_102_kt(jk) * sn(ji-2,jj-1,jk)604 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_141_102_kt(jk) * tsn(ji-2,jj-1,jk,jp_tem) 605 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_141_102_kt(jk) * tsn(ji-2,jj-1,jk,jp_sal) 606 606 END DO 607 607 ! ! deeper flow from Med sea to Atlantic 608 t a(ji,jj,21) = ta(ji,jj,21) - hdiv_141_102(21) * tn(ji,jj,21)609 sa(ji,jj,21) = sa(ji,jj,21) - hdiv_141_102(21) * sn(ji,jj,21)608 tsa(ji,jj,21,jp_tem) = tsa(ji,jj,21,jp_tem) - hdiv_141_102(21) * tsn(ji,jj,21,jp_tem) 609 tsa(ji,jj,21,jp_sal) = tsa(ji,jj,21,jp_sal) - hdiv_141_102(21) * tsn(ji,jj,21,jp_sal) 610 610 END DO 611 611 END DO … … 707 707 DO ji = mi0(172), mi1(172) 708 708 DO jk = 1, 8 ! surface inflow (Indian ocean to Persian Gulf) (div<0) 709 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_172_94(jk) * tn(ji,jj,jk)710 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_172_94(jk) * sn(ji,jj,jk)709 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_172_94(jk) * tsn(ji,jj,jk,jp_tem) 710 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_172_94(jk) * tsn(ji,jj,jk,jp_sal) 711 711 END DO 712 712 DO jk = 16, 18 ! deep outflow (Persian Gulf to Indian ocean) (div>0) 713 t a(ji,jj,jk) = ta(ji,jj,jk) - hdiv_172_94(jk) * t_171_94_hor(jk)714 sa(ji,jj,jk) = sa(ji,jj,jk) - hdiv_172_94(jk) * s_171_94_hor(jk)713 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_172_94(jk) * t_171_94_hor(jk) 714 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_172_94(jk) * s_171_94_hor(jk) 715 715 END DO 716 716 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
r2772 r2789 116 116 !!---------------------------------------------------------------------- 117 117 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 118 USE oce , ONLY: z gru=> ua , zww => va ! (ua,va) used as workspace119 USE oce , ONLY: zgrv => ta , zwz => sa ! (ta,sa) used as workspace120 USE wrk_nemo, ONLY: zdzr => wrk_3d_1 118 USE oce , ONLY: zwz => ua , zww => va ! (ua,va) used as workspace 119 USE oce , ONLY: tsa ! (tsa) used as workspace 120 USE wrk_nemo, ONLY: zdzr => wrk_3d_1 ! 3D workspace 121 121 !! 122 122 INTEGER , INTENT(in) :: kt ! ocean time-step index … … 131 131 REAL(wp) :: zcj, zfj, zav, zbv, zaj, zbj ! - - 132 132 REAL(wp) :: zck, zfk, zbw ! - - 133 REAL(wp), POINTER, DIMENSION(:,:,:) :: zgru, zgrv 133 134 !!---------------------------------------------------------------------- 134 135 … … 136 137 CALL ctl_stop('ldf_slp: requested workspace arrays are unavailable') ; RETURN 137 138 ENDIF 139 ! 140 zgru => tsa(:,:,:,1) 141 zgrv => tsa(:,:,:,2) 138 142 139 143 zeps = 1.e-20_wp !== Local constant initialization ==! … … 379 383 ENDIF 380 384 ! 381 IF( wrk_not_released(3, 1) ) CALL ctl_stop('ldf_slp: failed to release workspace arrays')385 IF( wrk_not_released(3, 1) ) CALL ctl_stop('ldf_slp: failed to release workspace arrays.') 382 386 ! 383 387 END SUBROUTINE ldf_slp … … 399 403 !!---------------------------------------------------------------------- 400 404 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 401 USE oce , ONLY: zdit => ua , zdis => va ! (ua,va) used as workspace402 USE oce , ONLY: zdjt => ta , zdjs => sa ! (ta,sa) used as workspace403 USE wrk_nemo, ONLY: zdkt => wrk_3d_2 , zdks => wrk_3d_3 ! 3D workspace404 USE wrk_nemo, ONLY: zalpha => wrk_3d_4 , zbeta => wrk_3d_5 ! alpha, beta at T points, at depth fsgdept405 405 USE wrk_nemo, ONLY: z1_mlbw => wrk_2d_1 406 ! 407 INTEGER, INTENT( in ) :: kt ! ocean time-step index 408 ! 409 INTEGER :: ji, jj, jk, jl, ip, jp, kp ! dummy loop indices 406 USE wrk_nemo, ONLY: zalpha => wrk_3d_2 , zbeta => wrk_3d_3 ! alpha, beta at T points, at depth fsgdept 407 USE wrk_nemo, ONLY: zdits => wrk_4d_1 , zdjts => wrk_4d_2, zdkts => wrk_4d_3 ! 4D workspace 408 !! 409 INTEGER, INTENT( in ) :: kt ! ocean time-step index 410 !! 411 INTEGER :: ji, jj, jk, jn, jl, ip, jp, kp ! dummy loop indices 410 412 INTEGER :: iku, ikv ! local integer 411 413 REAL(wp) :: zfacti, zfactj, zatempw,zatempu,zatempv ! local scalars … … 416 418 !!---------------------------------------------------------------------- 417 419 418 IF( wrk_in_use( 3, 2,3,4,5) .OR. wrk_in_use(2, 1) )THEN419 CALL ctl_stop('ldf_slp_grif: requested workspace arrays are unavailable') ; RETURN420 END IF421 420 IF( wrk_in_use(4, 1,2,3) .OR. wrk_in_use(3, 2,3) .OR. wrk_in_use(2, 1) ) THEN 421 CALL ctl_stop('ldf_slp_grif: ERROR: requested workspace arrays are unavailable.') ; RETURN 422 END IF 423 ! 422 424 !--------------------------------! 423 425 ! Some preliminary calculation ! … … 426 428 CALL eos_alpbet( tsb, zalpha, zbeta ) !== before thermal and haline expension coeff. at T-points ==! 427 429 ! 428 DO jk = 1, jpkm1 !== before lateral T & S gradients at T-level jk ==! 429 DO jj = 1, jpjm1 430 DO ji = 1, fs_jpim1 ! vector opt. 431 zdit(ji,jj,jk) = ( tb(ji+1,jj,jk) - tb(ji,jj,jk) ) * umask(ji,jj,jk) ! i-gradient of T and S at jj 432 zdis(ji,jj,jk) = ( sb(ji+1,jj,jk) - sb(ji,jj,jk) ) * umask(ji,jj,jk) 433 zdjt(ji,jj,jk) = ( tb(ji,jj+1,jk) - tb(ji,jj,jk) ) * vmask(ji,jj,jk) ! j-gradient of T and S at jj 434 zdjs(ji,jj,jk) = ( sb(ji,jj+1,jk) - sb(ji,jj,jk) ) * vmask(ji,jj,jk) 435 END DO 436 END DO 437 END DO 438 IF( ln_zps ) THEN ! partial steps: correction at the last level 430 DO jn = 1, jpts 431 DO jk = 1, jpkm1 !== before lateral T & S gradients at T-level jk ==! 432 DO jj = 1, jpjm1 433 DO ji = 1, fs_jpim1 ! vector opt. 434 zdits(ji,jj,jk,jn) = ( tsb(ji+1,jj,jk,jn) - tsb(ji,jj,jk,jn) ) * umask(ji,jj,jk) ! i-gradient of T and S at jj 435 zdjts(ji,jj,jk,jn) = ( tsb(ji,jj+1,jk,jn) - tsb(ji,jj,jk,jn) ) * vmask(ji,jj,jk) ! j-gradient of T and S at jj 436 END DO 437 END DO 438 END DO 439 IF( ln_zps ) THEN ! partial steps: correction at the last level 439 440 # if defined key_vectopt_loop 440 DO jj = 1, 1441 DO ji = 1, jpij-jpi ! vector opt. (forced unrolling)441 DO jj = 1, 1 442 DO ji = 1, jpij-jpi ! vector opt. (forced unrolling) 442 443 # else 443 DO jj = 1, jpjm1444 DO ji = 1, jpim1444 DO jj = 1, jpjm1 445 DO ji = 1, jpim1 445 446 # endif 446 zdit(ji,jj,mbku(ji,jj)) = gtsu(ji,jj,jp_tem) ! i-gradient of T and S 447 zdis(ji,jj,mbku(ji,jj)) = gtsu(ji,jj,jp_sal) 448 zdjt(ji,jj,mbkv(ji,jj)) = gtsv(ji,jj,jp_tem) ! j-gradient of T and S 449 zdjs(ji,jj,mbkv(ji,jj)) = gtsv(ji,jj,jp_sal) 450 END DO 451 END DO 452 ENDIF 453 ! 454 zdkt(:,:,1) = 0._wp !== before vertical T & S gradient at w-level ==! 455 zdks(:,:,1) = 0._wp 456 DO jk = 2, jpk 457 zdkt(:,:,jk) = ( tb(:,:,jk-1) - tb(:,:,jk) ) * tmask(:,:,jk) 458 zdks(:,:,jk) = ( sb(:,:,jk-1) - sb(:,:,jk) ) * tmask(:,:,jk) 459 END DO 460 ! 447 zdits(ji,jj,mbku(ji,jj),jn) = gtsu(ji,jj,jn) ! i-gradient of T and S 448 zdjts(ji,jj,mbkv(ji,jj),jn) = gtsv(ji,jj,jn) ! j-gradient of T and S 449 END DO 450 END DO 451 ENDIF 452 ! 453 zdkts(:,:,1,jn) = 0._wp !== before vertical T & S gradient at w-level ==! 454 DO jk = 2, jpk 455 zdkts(:,:,jk,jn) = ( tsb(:,:,jk-1,jn) - tsb(:,:,jk,jn) ) * tmask(:,:,jk) 456 END DO 457 ! 458 END DO 461 459 ! 462 460 DO jl = 0, 1 !== density i-, j-, and k-gradients ==! … … 465 463 DO jj = 1, jpjm1 ! NB: not masked due to the minimum value set 466 464 DO ji = 1, fs_jpim1 ! vector opt. 467 zdxrho_raw = ( zalpha(ji+ip,jj ,jk) * zdit (ji,jj,jk) + zbeta(ji+ip,jj ,jk) * zdis(ji,jj,jk) ) / e1u(ji,jj)468 zdyrho_raw = ( zalpha(ji ,jj+jp,jk) * zdjt (ji,jj,jk) + zbeta(ji ,jj+jp,jk) * zdjs(ji,jj,jk) ) / e2v(ji,jj)465 zdxrho_raw = ( zalpha(ji+ip,jj ,jk) * zdits(ji,jj,jk,jp_tem) + zbeta(ji+ip,jj ,jk) * zdits(ji,jj,jk,jp_sal) ) / e1u(ji,jj) 466 zdyrho_raw = ( zalpha(ji ,jj+jp,jk) * zdjts(ji,jj,jk,jp_tem) + zbeta(ji ,jj+jp,jk) * zdjts(ji,jj,jk,jp_sal) ) / e2v(ji,jj) 469 467 zdxrho(ji+ip,jj ,jk,1-ip) = SIGN( MAX( repsln, ABS( zdxrho_raw ) ), zdxrho_raw ) ! keep the sign 470 468 zdyrho(ji ,jj+jp,jk,1-jp) = SIGN( MAX( repsln, ABS( zdyrho_raw ) ), zdyrho_raw ) … … 477 475 DO jj = 1, jpj ! NB: not masked due to the minimum value set 478 476 DO ji = 1, jpi ! vector opt. 479 zdzrho_raw = ( zalpha(ji,jj,jk) * zdkt (ji,jj,jk+kp) + zbeta(ji,jj,jk) * zdks(ji,jj,jk+kp) ) &477 zdzrho_raw = ( zalpha(ji,jj,jk) * zdkts(ji,jj,jk+kp,jp_tem) + zbeta(ji,jj,jk) * zdkts(ji,jj,jk+kp,jp_sal) ) & 480 478 & / fse3w(ji,jj,jk+kp) 481 479 zdzrho(ji ,jj ,jk, kp) = - MIN( - repsln, zdzrho_raw ) ! force zdzrho >= repsln … … 600 598 CALL lbc_lnk( wslp2, 'W', 1. ) ! lateral boundary confition on wslp2 only ==>>> gm : necessary ? to be checked 601 599 ! 602 IF( wrk_not_released(3, 2,3,4,5) .OR. & 603 wrk_not_released(2, 1) ) CALL ctl_stop('ldf_slp_grif: failed to release workspace arrays') 600 IF( wrk_not_released(4, 1,2,3) .OR. & 601 wrk_not_released(3, 2,3 ) .OR. & 602 wrk_not_released(2, 1 ) ) CALL ctl_stop('ldf_slp_grif: ERROR: failed to release workspace arrays.') 604 603 ! 605 604 END SUBROUTINE ldf_slp_grif -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/OBC/obcdta.F90
r2722 r2789 304 304 IF (lp_obc_east) THEN ! East 305 305 DO ji = nie0 , nie1 306 sfoe(nje0:nje1,:) = temsk(nje0:nje1,:) * sn (ji+1 , nje0:nje1 , :) * tmask(ji+1,nje0:nje1 , :)307 tfoe(nje0:nje1,:) = temsk(nje0:nje1,:) * t n (ji+1 , nje0:nje1 , :) * tmask(ji+1,nje0:nje1 , :)308 ufoe(nje0:nje1,:) = uemsk(nje0:nje1,:) * un (ji , nje0:nje1 , :) * umask(ji, nje0:nje1 , :)309 vfoe(nje0:nje1,:) = vemsk(nje0:nje1,:) * vn (ji+1 , nje0:nje1 , :) * vmask(ji+1,nje0:nje1 , :)306 sfoe(nje0:nje1,:) = temsk(nje0:nje1,:) * tsn(ji+1 , nje0:nje1 , :,jp_sal) * tmask(ji+1,nje0:nje1 , :) 307 tfoe(nje0:nje1,:) = temsk(nje0:nje1,:) * tsn(ji+1 , nje0:nje1 , :,jp_tem) * tmask(ji+1,nje0:nje1 , :) 308 ufoe(nje0:nje1,:) = uemsk(nje0:nje1,:) * un (ji , nje0:nje1 , :) * umask(ji, nje0:nje1 , :) 309 vfoe(nje0:nje1,:) = vemsk(nje0:nje1,:) * vn (ji+1 , nje0:nje1 , :) * vmask(ji+1,nje0:nje1 , :) 310 310 END DO 311 311 ENDIF … … 313 313 IF (lp_obc_west) THEN ! West 314 314 DO ji = niw0 , niw1 315 sfow(njw0:njw1,:) = twmsk(njw0:njw1,:) * sn (ji , njw0:njw1 , :) * tmask(ji , njw0:njw1 , :)316 tfow(njw0:njw1,:) = twmsk(njw0:njw1,:) * t n (ji , njw0:njw1 , :) * tmask(ji , njw0:njw1 , :)317 ufow(njw0:njw1,:) = uwmsk(njw0:njw1,:) * un (ji , njw0:njw1 , :) * umask(ji , njw0:njw1 , :)318 vfow(njw0:njw1,:) = vwmsk(njw0:njw1,:) * vn (ji , njw0:njw1 , :) * vmask(ji , njw0:njw1 , :)315 sfow(njw0:njw1,:) = twmsk(njw0:njw1,:) * tsn(ji , njw0:njw1 , :,jp_sal) * tmask(ji , njw0:njw1 , :) 316 tfow(njw0:njw1,:) = twmsk(njw0:njw1,:) * tsn(ji , njw0:njw1 , :,jp_tem) * tmask(ji , njw0:njw1 , :) 317 ufow(njw0:njw1,:) = uwmsk(njw0:njw1,:) * un (ji , njw0:njw1 , :) * umask(ji , njw0:njw1 , :) 318 vfow(njw0:njw1,:) = vwmsk(njw0:njw1,:) * vn (ji , njw0:njw1 , :) * vmask(ji , njw0:njw1 , :) 319 319 END DO 320 320 ENDIF … … 322 322 IF (lp_obc_north) THEN ! North 323 323 DO jj = njn0 , njn1 324 sfon(nin0:nin1,:) = tnmsk(nin0:nin1,:) * sn (nin0:nin1 , jj+1 , :) * tmask(nin0:nin1 , jj+1 , :)325 tfon(nin0:nin1,:) = tnmsk(nin0:nin1,:) * t n (nin0:nin1 , jj+1 , :) * tmask(nin0:nin1 , jj+1 , :)326 ufon(nin0:nin1,:) = unmsk(nin0:nin1,:) * un (nin0:nin1 , jj+1 , :) * umask(nin0:nin1 , jj+1 , :)327 vfon(nin0:nin1,:) = vnmsk(nin0:nin1,:) * vn (nin0:nin1 , jj , :) * vmask(nin0:nin1 , jj , :)324 sfon(nin0:nin1,:) = tnmsk(nin0:nin1,:) * tsn(nin0:nin1 , jj+1 , :,jp_sal) * tmask(nin0:nin1 , jj+1 , :) 325 tfon(nin0:nin1,:) = tnmsk(nin0:nin1,:) * tsn(nin0:nin1 , jj+1 , :,jp_tem) * tmask(nin0:nin1 , jj+1 , :) 326 ufon(nin0:nin1,:) = unmsk(nin0:nin1,:) * un (nin0:nin1 , jj+1 , :) * umask(nin0:nin1 , jj+1 , :) 327 vfon(nin0:nin1,:) = vnmsk(nin0:nin1,:) * vn (nin0:nin1 , jj , :) * vmask(nin0:nin1 , jj , :) 328 328 END DO 329 329 ENDIF … … 331 331 IF (lp_obc_south) THEN ! South 332 332 DO jj = njs0 , njs1 333 sfos(nis0:nis1,:) = tsmsk(nis0:nis1,:) * sn (nis0:nis1 , jj , :) * tmask(nis0:nis1 , jj , :)334 tfos(nis0:nis1,:) = tsmsk(nis0:nis1,:) * t n (nis0:nis1 , jj , :) * tmask(nis0:nis1 , jj , :)335 ufos(nis0:nis1,:) = usmsk(nis0:nis1,:) * un (nis0:nis1 , jj , :) * umask(nis0:nis1 , jj , :)336 vfos(nis0:nis1,:) = vsmsk(nis0:nis1,:) * vn (nis0:nis1 , jj , :) * vmask(nis0:nis1 , jj , :)333 sfos(nis0:nis1,:) = tsmsk(nis0:nis1,:) * tsn(nis0:nis1 , jj , :,jp_sal) * tmask(nis0:nis1 , jj , :) 334 tfos(nis0:nis1,:) = tsmsk(nis0:nis1,:) * tsn(nis0:nis1 , jj , :,jp_tem) * tmask(nis0:nis1 , jj , :) 335 ufos(nis0:nis1,:) = usmsk(nis0:nis1,:) * un (nis0:nis1 , jj , :) * umask(nis0:nis1 , jj , :) 336 vfos(nis0:nis1,:) = vsmsk(nis0:nis1,:) * vn (nis0:nis1 , jj , :) * vmask(nis0:nis1 , jj , :) 337 337 END DO 338 338 ENDIF -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/OBC/obcrad.F90
r2715 r2789 215 215 sebnd(jj,jk,nibm,nitm) = sebnd(jj,jk,nibm,nit)*temsk(jj,jk) 216 216 ! ... fields nit <== now (kt+1) 217 tebnd(jj,jk,nib ,nit) = t n(ji ,jj,jk)*temsk(jj,jk)218 tebnd(jj,jk,nibm ,nit) = t n(ji-1,jj,jk)*temsk(jj,jk)219 sebnd(jj,jk,nib ,nit) = sn(ji ,jj,jk)*temsk(jj,jk)220 sebnd(jj,jk,nibm ,nit) = sn(ji-1,jj,jk)*temsk(jj,jk)217 tebnd(jj,jk,nib ,nit) = tsn(ji ,jj,jk,jp_tem)*temsk(jj,jk) 218 tebnd(jj,jk,nibm ,nit) = tsn(ji-1,jj,jk,jp_tem)*temsk(jj,jk) 219 sebnd(jj,jk,nib ,nit) = tsn(ji ,jj,jk,jp_sal)*temsk(jj,jk) 220 sebnd(jj,jk,nibm ,nit) = tsn(ji-1,jj,jk,jp_sal)*temsk(jj,jk) 221 221 END DO 222 222 END DO … … 481 481 swbnd(jj,jk,nibm ,nitm) = swbnd(jj,jk,nibm ,nit)*twmsk(jj,jk) 482 482 ! ... fields nit <== now (kt+1) 483 twbnd(jj,jk,nib ,nit) = t n(ji ,jj,jk)*twmsk(jj,jk)484 twbnd(jj,jk,nibm ,nit) = t n(ji+1 ,jj,jk)*twmsk(jj,jk)485 swbnd(jj,jk,nib ,nit) = sn(ji ,jj,jk)*twmsk(jj,jk)486 swbnd(jj,jk,nibm ,nit) = sn(ji+1 ,jj,jk)*twmsk(jj,jk)483 twbnd(jj,jk,nib ,nit) = tsn(ji ,jj,jk,jp_tem)*twmsk(jj,jk) 484 twbnd(jj,jk,nibm ,nit) = tsn(ji+1 ,jj,jk,jp_tem)*twmsk(jj,jk) 485 swbnd(jj,jk,nib ,nit) = tsn(ji ,jj,jk,jp_sal)*twmsk(jj,jk) 486 swbnd(jj,jk,nibm ,nit) = tsn(ji+1 ,jj,jk,jp_sal)*twmsk(jj,jk) 487 487 END DO 488 488 END DO … … 750 750 snbnd(ji,jk,nibm ,nitm) = snbnd(ji,jk,nibm ,nit)*tnmsk(ji,jk) 751 751 ! ... fields nit <== now (kt+1) 752 tnbnd(ji,jk,nib ,nit) = t n(ji,jj, jk)*tnmsk(ji,jk)753 tnbnd(ji,jk,nibm ,nit) = t n(ji,jj-1,jk)*tnmsk(ji,jk)754 snbnd(ji,jk,nib ,nit) = sn(ji,jj, jk)*tnmsk(ji,jk)755 snbnd(ji,jk,nibm ,nit) = sn(ji,jj-1,jk)*tnmsk(ji,jk)752 tnbnd(ji,jk,nib ,nit) = tsn(ji,jj, jk,jp_tem)*tnmsk(ji,jk) 753 tnbnd(ji,jk,nibm ,nit) = tsn(ji,jj-1,jk,jp_tem)*tnmsk(ji,jk) 754 snbnd(ji,jk,nib ,nit) = tsn(ji,jj, jk,jp_sal)*tnmsk(ji,jk) 755 snbnd(ji,jk,nibm ,nit) = tsn(ji,jj-1,jk,jp_sal)*tnmsk(ji,jk) 756 756 END DO 757 757 END DO … … 1022 1022 ssbnd(ji,jk,nibm ,nitm) = ssbnd(ji,jk,nibm ,nit)*tsmsk(ji,jk) 1023 1023 ! ... fields nit <== now (kt+1) 1024 tsbnd(ji,jk,nib ,nit) = t n(ji,jj ,jk)*tsmsk(ji,jk)1025 tsbnd(ji,jk,nibm ,nit) = t n(ji,jj+1 ,jk)*tsmsk(ji,jk)1026 ssbnd(ji,jk,nib ,nit) = sn(ji,jj ,jk)*tsmsk(ji,jk)1027 ssbnd(ji,jk,nibm ,nit) = sn(ji,jj+1 ,jk)*tsmsk(ji,jk)1024 tsbnd(ji,jk,nib ,nit) = tsn(ji,jj ,jk,jp_tem)*tsmsk(ji,jk) 1025 tsbnd(ji,jk,nibm ,nit) = tsn(ji,jj+1 ,jk,jp_tem)*tsmsk(ji,jk) 1026 ssbnd(ji,jk,nib ,nit) = tsn(ji,jj ,jk,jp_sal)*tsmsk(ji,jk) 1027 ssbnd(ji,jk,nibm ,nit) = tsn(ji,jj+1 ,jk,jp_sal)*tsmsk(ji,jk) 1028 1028 END DO 1029 1029 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/OBC/obctra.F90
r2528 r2789 58 58 !! 59 59 !! ** Purpose : Compute tracer fields (t,s) along the open boundaries. 60 !! This routine is called by the tranxt.F routine and updates t a,sa60 !! This routine is called by the tranxt.F routine and updates tsa 61 61 !! which are the actual temperature and salinity fields. 62 62 !! The logical variable lp_obc_east, and/or lp_obc_west, and/or lp_obc_north, … … 101 101 IF( lk_mpp ) THEN !!bug ??? 102 102 IF( kt >= nit000+3 .AND. ln_rstart ) THEN 103 CALL lbc_lnk( t b, 'T', 1. )104 CALL lbc_lnk( sb, 'T', 1. )103 CALL lbc_lnk( tsb(:,:,:,jp_tem), 'T', 1. ) 104 CALL lbc_lnk( tsb(:,:,:,jp_sal), 'T', 1. ) 105 105 END IF 106 CALL lbc_lnk( t a, 'T', 1. )107 CALL lbc_lnk( sa, 'T', 1. )106 CALL lbc_lnk( tsa(:,:,:,jp_tem), 'T', 1. ) 107 CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1. ) 108 108 ENDIF 109 109 … … 116 116 !! 117 117 !! ** Purpose : 118 !! Apply the radiation algorithm on east OBC tracers t a,sa using the118 !! Apply the radiation algorithm on east OBC tracers tsa using the 119 119 !! phase velocities calculated in obc_rad_east subroutine in obcrad.F90 module 120 120 !! If the logical lfbceast is .TRUE., there is no radiation but only fixed OBC … … 143 143 DO jk = 1, jpkm1 144 144 DO jj = 1, jpj 145 t a(ji,jj,jk) = ta(ji,jj,jk) * (1. - temsk(jj,jk)) + &146 tfoe(jj,jk)*temsk(jj,jk)147 sa(ji,jj,jk) = sa(ji,jj,jk) * (1. - temsk(jj,jk)) + &148 sfoe(jj,jk)*temsk(jj,jk)145 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1. - temsk(jj,jk)) + & 146 tfoe(jj,jk)*temsk(jj,jk) 147 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1. - temsk(jj,jk)) + & 148 sfoe(jj,jk)*temsk(jj,jk) 149 149 END DO 150 150 END DO … … 191 191 ztau = (1.-zin ) * rtauein + zin * rtaue 192 192 z05cx = z05cx * zin 193 ! ... update ( ta, sa ) with radiative or climatological (t, s)194 t a(ji,jj,jk) = ta(ji,jj,jk) * (1. - temsk(jj,jk)) + &193 ! ... update tsa with radiative or climatological ts 194 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1. - temsk(jj,jk)) + & 195 195 temsk(jj,jk) * ( ( 1. - z05cx - ztau ) & 196 196 * tebnd(jj,jk,nib ,nitm) + 2.*z05cx & 197 197 * tebnd(jj,jk,nibm,nit ) + ztau * tfoe (jj,jk) ) & 198 198 / (1. + z05cx) 199 sa(ji,jj,jk) = sa(ji,jj,jk) * (1. - temsk(jj,jk)) + &199 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1. - temsk(jj,jk)) + & 200 200 temsk(jj,jk) * ( ( 1. - z05cx - ztau ) & 201 201 * sebnd(jj,jk,nib ,nitm) + 2.*z05cx & … … 216 216 !! 217 217 !! ** Purpose : 218 !! Apply the radiation algorithm on west OBC tracers t a,sa using the218 !! Apply the radiation algorithm on west OBC tracers tsa using the 219 219 !! phase velocities calculated in obc_rad_west subroutine in obcrad.F90 module 220 220 !! If the logical lfbcwest is .TRUE., there is no radiation but only fixed OBC … … 244 244 DO jk = 1, jpkm1 245 245 DO jj = 1, jpj 246 t a(ji,jj,jk) = ta(ji,jj,jk) * (1. - twmsk(jj,jk)) + &247 tfow(jj,jk)*twmsk(jj,jk)248 sa(ji,jj,jk) = sa(ji,jj,jk) * (1. - twmsk(jj,jk)) + &249 sfow(jj,jk)*twmsk(jj,jk)246 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1. - twmsk(jj,jk)) + & 247 tfow(jj,jk)*twmsk(jj,jk) 248 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1. - twmsk(jj,jk)) + & 249 sfow(jj,jk)*twmsk(jj,jk) 250 250 END DO 251 251 END DO … … 290 290 ztau = (1.-zin )*rtauwin + zin * rtauw 291 291 z05cx = z05cx * zin 292 ! ... update (ta,sa) with radiative or climatological (t,s)293 t a(ji,jj,jk) = ta(ji,jj,jk) * (1. - twmsk(jj,jk)) + &292 ! ... update tsa with radiative or climatological (ts) 293 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1. - twmsk(jj,jk)) + & 294 294 twmsk(jj,jk) * ( ( 1. + z05cx - ztau ) & 295 295 * twbnd(jj,jk,nib ,nitm) - 2.*z05cx & 296 296 * twbnd(jj,jk,nibm,nit ) + ztau * tfow (jj,jk) ) & 297 297 / (1. - z05cx) 298 sa(ji,jj,jk) = sa(ji,jj,jk) * (1. - twmsk(jj,jk)) + &298 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1. - twmsk(jj,jk)) + & 299 299 twmsk(jj,jk) * ( ( 1. + z05cx - ztau ) & 300 300 * swbnd(jj,jk,nib ,nitm) - 2.*z05cx & … … 343 343 DO jk = 1, jpkm1 344 344 DO ji = 1, jpi 345 t a(ji,jj,jk)= ta(ji,jj,jk) * (1.-tnmsk(ji,jk)) + &346 tnmsk(ji,jk) * tfon(ji,jk)347 sa(ji,jj,jk)= sa(ji,jj,jk) * (1.-tnmsk(ji,jk)) + &348 tnmsk(ji,jk) * sfon(ji,jk)345 tsa(ji,jj,jk,jp_tem)= tsa(ji,jj,jk,jp_tem) * (1.-tnmsk(ji,jk)) + & 346 tnmsk(ji,jk) * tfon(ji,jk) 347 tsa(ji,jj,jk,jp_sal)= tsa(ji,jj,jk,jp_sal) * (1.-tnmsk(ji,jk)) + & 348 tnmsk(ji,jk) * sfon(ji,jk) 349 349 END DO 350 350 END DO … … 392 392 ztau = (1.-zin ) * rtaunin + zin * rtaun 393 393 z05cx = z05cx * zin 394 ! ... update (ta,sa)with radiative or climatological (t, s)395 t a(ji,jj,jk) = ta(ji,jj,jk) * (1.-tnmsk(ji,jk)) + &394 ! ... update tsa with radiative or climatological (t, s) 395 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1.-tnmsk(ji,jk)) + & 396 396 tnmsk(ji,jk) * ( ( 1. - z05cx - ztau ) & 397 397 * tnbnd(ji,jk,nib ,nitm) + 2.*z05cx & 398 398 * tnbnd(ji,jk,nibm,nit ) + ztau * tfon (ji,jk) ) & 399 399 / (1. + z05cx) 400 sa(ji,jj,jk) = sa(ji,jj,jk) * (1.-tnmsk(ji,jk)) + &400 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1.-tnmsk(ji,jk)) + & 401 401 tnmsk(ji,jk) * ( ( 1. - z05cx - ztau ) & 402 402 * snbnd(ji,jk,nib ,nitm) + 2.*z05cx & … … 417 417 !! 418 418 !! ** Purpose : 419 !! Apply the radiation algorithm on south OBC tracers t a,sa using the419 !! Apply the radiation algorithm on south OBC tracers tsa using the 420 420 !! phase velocities calculated in obc_rad_south subroutine in obcrad.F90 module 421 421 !! If the logical lfbcsouth is .TRUE., there is no radiation but only fixed OBC … … 445 445 DO jk = 1, jpkm1 446 446 DO ji = 1, jpi 447 t a(ji,jj,jk)= ta(ji,jj,jk) * (1.-tsmsk(ji,jk)) + &448 tsmsk(ji,jk) * tfos(ji,jk)449 sa(ji,jj,jk)= sa(ji,jj,jk) * (1.-tsmsk(ji,jk)) + &450 tsmsk(ji,jk) * sfos(ji,jk)447 tsa(ji,jj,jk,jp_tem)= tsa(ji,jj,jk,jp_tem) * (1.-tsmsk(ji,jk)) + & 448 tsmsk(ji,jk) * tfos(ji,jk) 449 tsa(ji,jj,jk,jp_sal)= tsa(ji,jj,jk,jp_sal) * (1.-tsmsk(ji,jk)) + & 450 tsmsk(ji,jk) * sfos(ji,jk) 451 451 END DO 452 452 END DO … … 493 493 z05cx = z05cx * zin 494 494 495 !... update (ta,sa)with radiative or climatological (t, s)496 t a(ji,jj,jk) = ta(ji,jj,jk) * (1.-tsmsk(ji,jk)) + &495 !... update tsa with radiative or climatological (t, s) 496 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) * (1.-tsmsk(ji,jk)) + & 497 497 tsmsk(ji,jk) * ( ( 1. + z05cx - ztau ) & 498 498 * tsbnd(ji,jk,nib ,nitm) - 2.*z05cx & 499 499 * tsbnd(ji,jk,nibm,nit ) + ztau * tfos (ji,jk) ) & 500 500 / (1. - z05cx) 501 sa(ji,jj,jk) = sa(ji,jj,jk) * (1.-tsmsk(ji,jk)) + &501 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) * (1.-tsmsk(ji,jk)) + & 502 502 tsmsk(ji,jk) * ( ( 1. + z05cx - ztau ) & 503 503 * ssbnd(ji,jk,nib ,nitm) - 2.*z05cx & -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
r2733 r2789 1011 1011 & rday 1012 1012 USE oce, ONLY : & ! Ocean dynamics and tracers variables 1013 & tn, & 1014 & sn, & 1013 & tsn, & 1015 1014 & un, vn, & 1016 1015 & sshn … … 1066 1065 DO jprofset = 1, nprofsets 1067 1066 IF ( ld_enact(jprofset) ) THEN 1068 CALL obs_pro_opt( prodatqc(jprofset), & 1069 & kstp, jpi, jpj, jpk, nit000, idaystp, tn, sn,& 1070 & gdept_0, tmask, n1dint, n2dint, & 1067 CALL obs_pro_opt( prodatqc(jprofset), & 1068 & kstp, jpi, jpj, jpk, nit000, idaystp, & 1069 & tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal), & 1070 & gdept_0, tmask, n1dint, n2dint, & 1071 1071 & kdailyavtypes = endailyavtypes ) 1072 1072 ELSE 1073 CALL obs_pro_opt( prodatqc(jprofset), & 1074 & kstp, jpi, jpj, jpk, nit000, idaystp, tn, sn,& 1073 CALL obs_pro_opt( prodatqc(jprofset), & 1074 & kstp, jpi, jpj, jpk, nit000, idaystp, & 1075 & tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal), & 1075 1076 & gdept_0, tmask, n1dint, n2dint ) 1076 1077 ENDIF … … 1091 1092 DO jsstset = 1, nsstsets 1092 1093 CALL obs_sst_opt( sstdatqc(jsstset), & 1093 & kstp, jpi, jpj, nit000, t n(:,:,1), &1094 & kstp, jpi, jpj, nit000, tsn(:,:,1,jp_tem), & 1094 1095 & tmask(:,:,1), n2dint ) 1095 1096 END DO -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90
r2715 r2789 193 193 ! 23.5 deg : tropics 194 194 qsr (ji,jj) = 230 * COS( 3.1415 * ( gphit(ji,jj) - 23.5 * zcos_sais1 ) / ( 0.9 * 180 ) ) 195 qns (ji,jj) = ztrp * ( t b(ji,jj,1) - t_star ) - qsr(ji,jj)195 qns (ji,jj) = ztrp * ( tsb(ji,jj,1,jp_tem) - t_star ) - qsr(ji,jj) 196 196 IF( gphit(ji,jj) >= 14.845 .AND. 37.2 >= gphit(ji,jj) ) THEN ! zero at 37.8 deg, max at 24.6 deg 197 197 emp (ji,jj) = zemp_S * zconv & -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r2715 r2789 41 41 USE geo2ocean ! 42 42 USE restart ! 43 USE oce , ONLY : t n, un, vn43 USE oce , ONLY : tsn, un, vn 44 44 USE albedo ! 45 45 USE in_out_manager ! I/O manager … … 1086 1086 !!---------------------------------------------------------------------- 1087 1087 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 1088 USE wrk_nemo, ONLY: zcptn => wrk_2d_1 ! rcp * t n(:,:,1)1088 USE wrk_nemo, ONLY: zcptn => wrk_2d_1 ! rcp * tsn(:,:,1,jp_tem) 1089 1089 USE wrk_nemo, ONLY: ztmp => wrk_2d_2 ! temporary array 1090 1090 USE wrk_nemo, ONLY: zsnow => wrk_2d_3 ! snow precipitation … … 1115 1115 1116 1116 zicefr(:,:,1) = 1.- p_frld(:,:,1) 1117 IF( lk_diaar5 ) zcptn(:,:) = rcp * t n(:,:,1)1117 IF( lk_diaar5 ) zcptn(:,:) = rcp * tsn(:,:,1,jp_tem) 1118 1118 ! 1119 1119 ! ! ========================= ! … … 1270 1270 ! ! ------------------------- ! 1271 1271 SELECT CASE( cn_snd_temperature) 1272 CASE( 'oce only' ) ; ztmp1(:,:) = t n(:,:,1) + rt01273 CASE( 'weighted oce and ice' ) ; ztmp1(:,:) = ( t n(:,:,1) + rt0 ) * zfr_l(:,:)1272 CASE( 'oce only' ) ; ztmp1(:,:) = tsn(:,:,1,jp_tem) + rt0 1273 CASE( 'weighted oce and ice' ) ; ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:) 1274 1274 ztmp2(:,:) = tn_ice(:,:,1) * fr_i(:,:) 1275 CASE( 'mixed oce-ice' ) ; ztmp1(:,:) = ( t n(:,:,1) + rt0 ) * zfr_l(:,:) + tn_ice(:,:,1) * fr_i(:,:)1275 CASE( 'mixed oce-ice' ) ; ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:) + tn_ice(:,:,1) * fr_i(:,:) 1276 1276 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of cn_snd_temperature' ) 1277 1277 END SELECT -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90
r2715 r2789 110 110 ENDIF 111 111 112 t n(ji,jj,1) = MAX( tn(ji,jj,1), zt_fzp ) ! avoid over-freezing point temperature112 tsn(ji,jj,1,jp_tem) = MAX( tsn(ji,jj,1,jp_tem), zt_fzp ) ! avoid over-freezing point temperature 113 113 114 114 qsr(ji,jj) = ( 1. - zfr_obs ) * qsr(ji,jj) ! solar heat flux : zero below observed ice cover … … 117 117 ! # ztrp*(t-(tgel-1.)) if observed ice and no opa ice (zfr_obs=1 fr_i=0) 118 118 ! # ztrp*min(0,t-tgel) if observed ice and opa ice (zfr_obs=1 fr_i=1) 119 zqri = ztrp * ( t b(ji,jj,1) - ( zt_fzp - 1.) )120 zqrj = ztrp * MIN( 0., t b(ji,jj,1) - zt_fzp )119 zqri = ztrp * ( tsb(ji,jj,1,jp_tem) - ( zt_fzp - 1.) ) 120 zqrj = ztrp * MIN( 0., tsb(ji,jj,1,jp_tem) - zt_fzp ) 121 121 zqrp = ( zfr_obs * ( (1. - fr_i(ji,jj) ) * zqri & 122 122 & + fr_i(ji,jj) * zqrj ) ) * tmask(ji,jj,1) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r2715 r2789 327 327 ! 328 328 IF(ln_ctl) THEN ! print mean trends (used for debugging) 329 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 )330 CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 )331 CALL prt_ctl(tab2d_1=(emps-rnf) , clinfo1=' emps-rnf - : ', mask1=tmask, ovlap=1 )332 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask, ovlap=1 )333 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1 )334 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask - : ', mask1=tmask, ovlap=1, kdim=jpk )335 CALL prt_ctl(tab3d_1=t n, clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1 )336 CALL prt_ctl(tab3d_1= sn, clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1 )337 CALL prt_ctl(tab2d_1=utau , clinfo1=' utau - : ', mask1=umask, &338 & tab2d_2=vtau , clinfo2=' vtau - : ', mask2=vmask, ovlap=1 )329 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 330 CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 ) 331 CALL prt_ctl(tab2d_1=(emps-rnf) , clinfo1=' emps-rnf - : ', mask1=tmask, ovlap=1 ) 332 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask, ovlap=1 ) 333 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1 ) 334 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask - : ', mask1=tmask, ovlap=1, kdim=jpk ) 335 CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1 ) 336 CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_sal), clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1 ) 337 CALL prt_ctl(tab2d_1=utau , clinfo1=' utau - : ', mask1=umask, & 338 & tab2d_2=vtau , clinfo2=' vtau - : ', mask2=vmask, ovlap=1 ) 339 339 ENDIF 340 340 ! -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r2715 r2789 64 64 ssu_m(:,:) = ub(:,:,1) 65 65 ssv_m(:,:) = vb(:,:,1) 66 sst_m(:,:) = t n(:,:,1)67 sss_m(:,:) = sn(:,:,1)66 sst_m(:,:) = tsn(:,:,1,jp_tem) 67 sss_m(:,:) = tsn(:,:,1,jp_sal) 68 68 ! ! removed inverse barometer ssh when Patm forcing is used (for sea-ice dynamics) 69 69 IF( ln_apr_dyn ) THEN ; ssh_m(:,:) = sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) … … 104 104 ssu_m(:,:) = zcoef * ub(:,:,1) 105 105 ssv_m(:,:) = zcoef * vb(:,:,1) 106 sst_m(:,:) = zcoef * t n(:,:,1)107 sss_m(:,:) = zcoef * sn(:,:,1)106 sst_m(:,:) = zcoef * tsn(:,:,1,jp_tem) 107 sss_m(:,:) = zcoef * tsn(:,:,1,jp_sal) 108 108 ! ! removed inverse barometer ssh when Patm forcing is used 109 109 IF( ln_apr_dyn ) THEN ; ssh_m(:,:) = zcoef * ( sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) ) … … 126 126 ssu_m(:,:) = ssu_m(:,:) + ub(:,:,1) 127 127 ssv_m(:,:) = ssv_m(:,:) + vb(:,:,1) 128 sst_m(:,:) = sst_m(:,:) + t n(:,:,1)129 sss_m(:,:) = sss_m(:,:) + sn(:,:,1)128 sst_m(:,:) = sst_m(:,:) + tsn(:,:,1,jp_tem) 129 sss_m(:,:) = sss_m(:,:) + tsn(:,:,1,jp_sal) 130 130 ! ! removed inverse barometer ssh when Patm forcing is used (for sea-ice dynamics) 131 131 IF( ln_apr_dyn ) THEN ; ssh_m(:,:) = ssh_m(:,:) + sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
r2715 r2789 111 111 !!---------------------------------------------------------------------- 112 112 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 113 USE oce , ONLY: zwx => ua , zwy => va! (ua,va) used as 3D workspace114 USE wrk_nemo, ONLY: zwz => wrk_3d_1 , zind => wrk_3d_2! 3D workspace115 USE wrk_nemo, ONLY: ztfreez => wrk_2d_1 ! 2D -113 USE oce , ONLY: zwx => ua , zwy => va ! (ua,va) used as 3D workspace 114 USE wrk_nemo, ONLY: zwz => wrk_3d_12 , zind => wrk_3d_13 ! 3D workspace 115 USE wrk_nemo, ONLY: ztfreez => wrk_2d_1 ! 2D - 116 116 ! 117 117 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 131 131 !!---------------------------------------------------------------------- 132 132 133 IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1 ,2) ) THEN133 IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 12,13) ) THEN 134 134 CALL ctl_stop('tra_adv_cen2: requested workspace arrays unavailable') ; RETURN 135 135 ENDIF … … 276 276 ! 277 277 IF( wrk_not_released(2, 1) .OR. & 278 wrk_not_released(3, 1 ,2) ) CALL ctl_stop('tra_adv_cen2: failed to release workspace arrays')278 wrk_not_released(3, 12,13) ) CALL ctl_stop('tra_adv_cen2: failed to release workspace arrays') 279 279 ! 280 280 END SUBROUTINE tra_adv_cen2 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
r2715 r2789 63 63 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 64 64 USE oce , ONLY: zwx => ua , zwy => va ! (ua,va) used as workspace 65 USE wrk_nemo, ONLY: zslpx => wrk_3d_1 , zslpy => wrk_3d_2 ! 3D workspace65 USE wrk_nemo, ONLY: zslpx => wrk_3d_11 , zslpy => wrk_3d_12 ! 3D workspace 66 66 ! 67 67 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 79 79 !!---------------------------------------------------------------------- 80 80 81 IF( wrk_in_use(3, 1 ,2) ) THEN81 IF( wrk_in_use(3, 11,12) ) THEN 82 82 CALL ctl_stop('tra_adv_muscl: requested workspace arrays unavailable') ; RETURN 83 83 ENDIF … … 252 252 ENDDO 253 253 ! 254 IF( wrk_not_released(3, 1 ,2) ) CALL ctl_stop('tra_adv_muscl: requested workspace arrays unavailable')254 IF( wrk_not_released(3, 11,12) ) CALL ctl_stop('tra_adv_muscl: requested workspace arrays unavailable') 255 255 ! 256 256 END SUBROUTINE tra_adv_muscl -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
r2715 r2789 61 61 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 62 62 USE oce , ONLY: zwx => ua , zwy => va ! (ua,va) used as 3D workspace 63 USE wrk_nemo, ONLY: zslpx => wrk_3d_1 , zslpy => wrk_3d_2 ! 3D workspace63 USE wrk_nemo, ONLY: zslpx => wrk_3d_11, zslpy => wrk_3d_12 ! 3D workspace 64 64 !! 65 65 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 77 77 !!---------------------------------------------------------------------- 78 78 79 IF( wrk_in_use(3, 1 ,2) ) THEN79 IF( wrk_in_use(3, 11,12) ) THEN 80 80 CALL ctl_stop('tra_adv_muscl2: requested workspace arrays are unavailable') ; RETURN 81 81 ENDIF … … 285 285 END DO 286 286 ! 287 IF( wrk_not_released(3, 1 ,2) ) CALL ctl_stop('tra_adv_muscl2: failed to release workspace arrays')287 IF( wrk_not_released(3, 11,12) ) CALL ctl_stop('tra_adv_muscl2: failed to release workspace arrays') 288 288 ! 289 289 END SUBROUTINE tra_adv_muscl2 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
r2715 r2789 117 117 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 118 118 USE oce , ONLY: zwx => ua ! ua used as workspace 119 USE wrk_nemo, ONLY: zfu => wrk_3d_1 , zfc => wrk_3d_2, zfd => wrk_3d_3 ! 3D workspace119 USE wrk_nemo, ONLY: zfu => wrk_3d_11 , zfc => wrk_3d_12, zfd => wrk_3d_13 ! 3D workspace 120 120 ! 121 121 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 131 131 !---------------------------------------------------------------------- 132 132 ! 133 IF( wrk_in_use(3, 1 ,2,3) ) THEN133 IF( wrk_in_use(3, 11,12,13) ) THEN 134 134 CALL ctl_stop('tra_adv_qck_i: requested workspace arrays unavailable') ; RETURN 135 135 ENDIF … … 228 228 END DO 229 229 ! 230 IF( wrk_not_released(3, 1 ,2,3) ) CALL ctl_stop('tra_adv_qck_i: failed to release workspace arrays')230 IF( wrk_not_released(3, 11,12,13) ) CALL ctl_stop('tra_adv_qck_i: failed to release workspace arrays') 231 231 ! 232 232 END SUBROUTINE tra_adv_qck_i … … 240 240 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 241 241 USE oce , ONLY: zwy => ua ! ua used as workspace 242 USE wrk_nemo, ONLY: zfu => wrk_3d_1 , zfc => wrk_3d_2, zfd => wrk_3d_3 ! 3D workspace242 USE wrk_nemo, ONLY: zfu => wrk_3d_11 , zfc => wrk_3d_12, zfd => wrk_3d_13 ! 3D workspace 243 243 ! 244 244 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 254 254 !---------------------------------------------------------------------- 255 255 ! 256 IF(wrk_in_use(3, 1 ,2,3))THEN256 IF(wrk_in_use(3, 11,12,13))THEN 257 257 CALL ctl_stop('tra_adv_qck_j: ERROR: requested workspace arrays unavailable') 258 258 RETURN … … 359 359 END DO 360 360 ! 361 IF( wrk_not_released(3, 1 ,2,3) ) CALL ctl_stop('tra_adv_qck_j: failed to release workspace arrays')361 IF( wrk_not_released(3, 11,12,13) ) CALL ctl_stop('tra_adv_qck_j: failed to release workspace arrays') 362 362 ! 363 363 END SUBROUTINE tra_adv_qck_j -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
r2715 r2789 14 14 !! 3.2 ! 2009-08 (G. Madec, C. Talandier) DOCTOR norm for namelist parameter 15 15 !! 3.3 ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 16 !! 3.4 ! 2011-04 (G. Madec, C. Ethe) Merge of dtatem and dtasal + suppression of CPP keys 16 17 !!---------------------------------------------------------------------- 17 #if defined key_tradmp || defined key_esopa 18 !!---------------------------------------------------------------------- 19 !! 'key_tradmp' internal damping 18 20 19 !!---------------------------------------------------------------------- 21 20 !! tra_dmp_alloc : allocate tradmp arrays … … 32 31 USE zdf_oce ! ocean: vertical physics 33 32 USE phycst ! physical constants 34 USE dtatem ! data: temperature 35 USE dtasal ! data: salinity 33 USE dtatsd ! data: temperature & salinity 36 34 USE zdfmxl ! vertical physics: mixed layer depth 37 35 USE in_out_manager ! I/O manager … … 47 45 PUBLIC dtacof_zoom ! routine called by in both tradmp.F90 and trcdmp.F90 48 46 49 #if ! defined key_agrif 50 LOGICAL, PUBLIC, PARAMETER :: lk_tradmp = .TRUE. !: internal damping flag 51 #else 52 LOGICAL, PUBLIC :: lk_tradmp = .TRUE. !: internal damping flag 53 #endif 47 ! !!* Namelist namtra_dmp : T & S newtonian damping * 48 LOGICAL, PUBLIC :: ln_tradmp = .TRUE. !: internal damping flag 49 INTEGER :: nn_hdmp = -1 ! = 0/-1/'latitude' for damping over T and S 50 INTEGER :: nn_zdmp = 0 ! = 0/1/2 flag for damping in the mixed layer 51 REAL(wp) :: rn_surf = 50._wp ! surface time scale for internal damping [days] 52 REAL(wp) :: rn_bot = 360._wp ! bottom time scale for internal damping [days] 53 REAL(wp) :: rn_dep = 800._wp ! depth of transition between rn_surf and rn_bot [meters] 54 INTEGER :: nn_file = 2 ! = 1 create a damping.coeff NetCDF file 55 54 56 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: strdmp !: damping salinity trend (psu/s) 55 57 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ttrdmp !: damping temperature trend (Celcius/s) 56 58 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: resto !: restoring coeff. on T and S (s-1) 57 58 ! !!* Namelist namtra_dmp : T & S newtonian damping *59 INTEGER :: nn_hdmp = -1 ! = 0/-1/'latitude' for damping over T and S60 INTEGER :: nn_zdmp = 0 ! = 0/1/2 flag for damping in the mixed layer61 REAL(wp) :: rn_surf = 50._wp ! surface time scale for internal damping [days]62 REAL(wp) :: rn_bot = 360._wp ! bottom time scale for internal damping [days]63 REAL(wp) :: rn_dep = 800._wp ! depth of transition between rn_surf and rn_bot [meters]64 INTEGER :: nn_file = 2 ! = 1 create a damping.coeff NetCDF file65 59 66 60 !! * Substitutions … … 76 70 INTEGER FUNCTION tra_dmp_alloc() 77 71 !!---------------------------------------------------------------------- 78 !! *** FUNCTION tra_ bbl_alloc ***79 !!---------------------------------------------------------------------- 80 ALLOCATE( strdmp(jpi,jpj,jpk) , ttrdmp(jpi,jpj,jpk) 72 !! *** FUNCTION tra_dmp_alloc *** 73 !!---------------------------------------------------------------------- 74 ALLOCATE( strdmp(jpi,jpj,jpk) , ttrdmp(jpi,jpj,jpk), resto(jpi,jpj,jpk), STAT= tra_dmp_alloc ) 81 75 ! 82 76 IF( lk_mpp ) CALL mpp_sum ( tra_dmp_alloc ) 83 77 IF( tra_dmp_alloc > 0 ) CALL ctl_warn('tra_dmp_alloc: allocation of arrays failed') 78 ! 84 79 END FUNCTION tra_dmp_alloc 85 80 … … 103 98 !! ** Action : - (ta,sa) tracer trends updated with the damping trend 104 99 !!---------------------------------------------------------------------- 100 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 101 USE wrk_nemo, ONLY: zts_dta => wrk_4d_2 ! 4D workspace 102 ! 105 103 INTEGER, INTENT(in) :: kt ! ocean time-step index 106 104 !! 107 105 INTEGER :: ji, jj, jk ! dummy loop indices 108 REAL(wp) :: zta, zsa ! local scalars 109 !!---------------------------------------------------------------------- 106 REAL(wp) :: zta, zsa ! local scalars 107 !!---------------------------------------------------------------------- 108 ! 109 IF( wrk_in_use(4, 2) ) THEN 110 CALL ctl_stop('tra_dmp: requested workspace arrays unavailable') ; RETURN 111 ENDIF 112 ! !== input T-S data at kt ==! 113 CALL dta_tsd( kt, zts_dta ) ! read and interpolates T-S data at kt 110 114 ! 111 115 SELECT CASE ( nn_zdmp ) !== type of damping ==! … … 115 119 DO jj = 2, jpjm1 116 120 DO ji = fs_2, fs_jpim1 ! vector opt. 117 zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_tem) )118 zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_sal) )121 zta = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) ) 122 zsa = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) ) 119 123 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + zta 120 124 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) + zsa 121 strdmp(ji,jj,jk) = zsa ! save the salinitytrend (used in asmtrj)122 ttrdmp(ji,jj,jk) = zta 125 strdmp(ji,jj,jk) = zsa ! save the trend (used in asmtrj) 126 ttrdmp(ji,jj,jk) = zta 123 127 END DO 124 128 END DO … … 130 134 DO ji = fs_2, fs_jpim1 ! vector opt. 131 135 IF( avt(ji,jj,jk) <= 5.e-4_wp ) THEN 132 zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_tem) )133 zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_sal) )136 zta = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) ) 137 zsa = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) ) 134 138 ELSE 135 139 zta = 0._wp … … 149 153 DO ji = fs_2, fs_jpim1 ! vector opt. 150 154 IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN 151 zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_tem) )152 zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - tsb(ji,jj,jk,jp_sal) )155 zta = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) ) 156 zsa = resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) ) 153 157 ELSE 154 158 zta = 0._wp … … 173 177 & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 174 178 ! 179 IF( wrk_not_released(4, 2) ) CALL ctl_stop('tra_dmp: failed to release workspace arrays') 180 ! 175 181 END SUBROUTINE tra_dmp 176 182 … … 184 190 !! ** Method : read the nammbf namelist and check the parameters 185 191 !!---------------------------------------------------------------------- 186 NAMELIST/namtra_dmp/ nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file192 NAMELIST/namtra_dmp/ ln_tradmp, nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file 187 193 !!---------------------------------------------------------------------- 188 194 … … 194 200 IF(lwp) THEN ! Namelist print 195 201 WRITE(numout,*) 196 WRITE(numout,*) 'tra_dmp : T and S newtonian damping'202 WRITE(numout,*) 'tra_dmp_init : T and S newtonian damping' 197 203 WRITE(numout,*) '~~~~~~~' 198 204 WRITE(numout,*) ' Namelist namtra_dmp : set damping parameter' 199 WRITE(numout,*) ' T and S damping option nn_hdmp = ', nn_hdmp 200 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '(zoom: forced to 0)' 201 WRITE(numout,*) ' surface time scale (days) rn_surf = ', rn_surf 202 WRITE(numout,*) ' bottom time scale (days) rn_bot = ', rn_bot 203 WRITE(numout,*) ' depth of transition (meters) rn_dep = ', rn_dep 204 WRITE(numout,*) ' create a damping.coeff file nn_file = ', nn_file 205 ENDIF 206 207 ! ! allocate tradmp arrays 208 IF( tra_dmp_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 209 210 SELECT CASE ( nn_hdmp ) 211 CASE ( -1 ) ; IF(lwp) WRITE(numout,*) ' tracer damping in the Med & Red seas only' 212 CASE ( 1:90 ) ; IF(lwp) WRITE(numout,*) ' tracer damping poleward of', nn_hdmp, ' degrees' 213 CASE DEFAULT 214 WRITE(ctmp1,*) ' bad flag value for nn_hdmp = ', nn_hdmp 215 CALL ctl_stop(ctmp1) 216 END SELECT 217 218 SELECT CASE ( nn_zdmp ) 219 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column' 220 CASE ( 1 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline (avt > 5 cm2/s)' 221 CASE ( 2 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the mixed layer' 222 CASE DEFAULT 223 WRITE(ctmp1,*) 'bad flag value for nn_zdmp = ', nn_zdmp 224 CALL ctl_stop(ctmp1) 225 END SELECT 226 227 IF( .NOT.lk_dtasal .OR. .NOT.lk_dtatem ) & 228 & CALL ctl_stop( 'no temperature and/or salinity data define key_dtatem and key_dtasal' ) 229 230 strdmp(:,:,:) = 0._wp ! internal damping salinity trend (used in asmtrj) 231 ttrdmp(:,:,:) = 0._wp 232 ! ! Damping coefficients initialization 233 IF( lzoom ) THEN ; CALL dtacof_zoom( resto ) 234 ELSE ; CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, & 235 & nn_file, 'TRA' , resto ) 205 WRITE(numout,*) ' add a damping termn or not ln_tradmp = ', ln_tradmp 206 WRITE(numout,*) ' T and S damping option nn_hdmp = ', nn_hdmp 207 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '(zoom: forced to 0)' 208 WRITE(numout,*) ' surface time scale (days) rn_surf = ', rn_surf 209 WRITE(numout,*) ' bottom time scale (days) rn_bot = ', rn_bot 210 WRITE(numout,*) ' depth of transition (meters) rn_dep = ', rn_dep 211 WRITE(numout,*) ' create a damping.coeff file nn_file = ', nn_file 212 WRITE(numout,*) 213 ENDIF 214 215 IF( ln_tradmp ) THEN ! initialization for T-S damping 216 ! 217 IF( tra_dmp_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 218 ! 219 SELECT CASE ( nn_hdmp ) 220 CASE ( -1 ) ; IF(lwp) WRITE(numout,*) ' tracer damping in the Med & Red seas only' 221 CASE ( 1:90 ) ; IF(lwp) WRITE(numout,*) ' tracer damping poleward of', nn_hdmp, ' degrees' 222 CASE DEFAULT 223 WRITE(ctmp1,*) ' bad flag value for nn_hdmp = ', nn_hdmp 224 CALL ctl_stop(ctmp1) 225 END SELECT 226 ! 227 SELECT CASE ( nn_zdmp ) 228 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column' 229 CASE ( 1 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline (avt > 5 cm2/s)' 230 CASE ( 2 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the mixed layer' 231 CASE DEFAULT 232 WRITE(ctmp1,*) 'bad flag value for nn_zdmp = ', nn_zdmp 233 CALL ctl_stop(ctmp1) 234 END SELECT 235 ! 236 IF( .NOT.ln_tsd_tradmp ) THEN 237 CALL ctl_warn( 'tra_dmp_init: read T-S data not initialized, we force ln_tsd_tradmp=T' ) 238 CALL dta_tsd_init( ld_tradmp=ln_tradmp ) ! forces the initialisation of T-S data 239 ENDIF 240 ! 241 strdmp(:,:,:) = 0._wp ! internal damping salinity trend (used in asmtrj) 242 ttrdmp(:,:,:) = 0._wp 243 ! ! Damping coefficients initialization 244 IF( lzoom ) THEN ; CALL dtacof_zoom( resto ) 245 ELSE ; CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, nn_file, 'TRA', resto ) 246 ENDIF 247 ! 236 248 ENDIF 237 249 ! … … 347 359 !!---------------------------------------------------------------------- 348 360 349 IF( wrk_in_use(1, 1) .OR. & 350 wrk_in_use(2, 1) .OR. & 351 wrk_in_use(3, 1) ) THEN 361 IF( wrk_in_use(1, 1) .OR. wrk_in_use(2, 1) .OR. wrk_in_use(3, 1) ) THEN 352 362 CALL ctl_stop('dtacof: requested workspace arrays unavailable') ; RETURN 353 363 ENDIF … … 529 539 ELSE ! No damping ! 530 540 ! !--------------------! 531 CALL ctl_stop( 'Choose a correct value of nn_hdmp or DO NOT defined key_tradmp' )541 CALL ctl_stop( 'Choose a correct value of nn_hdmp or put ln_tradmp to FALSE' ) 532 542 ENDIF 533 543 … … 544 554 ENDIF 545 555 ! 546 IF( wrk_not_released(1, 1) .OR. & 547 wrk_not_released(2, 1) .OR. & 548 wrk_not_released(3, 1) ) CALL ctl_stop('dtacof: failed to release workspace arrays') 556 IF( wrk_not_released(1, 1) .OR. wrk_not_released(2, 1) .OR. wrk_not_released(3, 1) ) & 557 & CALL ctl_stop('dtacof: failed to release workspace arrays') 549 558 ! 550 559 END SUBROUTINE dtacof … … 572 581 !!---------------------------------------------------------------------- 573 582 USE ioipsl ! IOipsl librairy 574 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 575 USE wrk_nemo, ONLY: zxt => wrk_2d_1 , zyt => wrk_2d_2 , zzt => wrk_2d_3, zmask => wrk_2d_4 583 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 584 USE wrk_nemo, ONLY: zxt => wrk_2d_1, zyt => wrk_2d_2 585 USE wrk_nemo, ONLY: zzt => wrk_2d_3, zmask => wrk_2d_4 576 586 !! 577 587 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) :: pdct ! distance to the coastline … … 585 595 !!---------------------------------------------------------------------- 586 596 587 IF( wrk_in_use(2, 1,2,3,4) .OR. & 588 wrk_in_use(1, 1,2,3,4) ) THEN 597 IF( wrk_in_use(2, 1,2,3,4) ) THEN 589 598 CALL ctl_stop('cofdis: requested workspace arrays unavailable') ; RETURN 590 599 ENDIF … … 745 754 CALL restclo( icot ) 746 755 ! 747 IF( wrk_not_released(2, 1,2,3,4) .OR. & 748 wrk_not_released(1, 1,2,3,4) ) CALL ctl_stop('cofdis: failed to release workspace arrays') 749 DEALLOCATE( llcotu , llcotv , llcotf , & 750 & zxc , zyc , zzc , zdis ) 756 IF( wrk_not_released(2, 1,2,3,4) ) CALL ctl_stop('cofdis: failed to release workspace arrays') 757 DEALLOCATE( llcotu, llcotv, llcotf, zyc, zzc, zdis ) 751 758 ! 752 759 END SUBROUTINE cofdis 753 754 #else755 !!----------------------------------------------------------------------756 !! Default key NO internal damping757 !!----------------------------------------------------------------------758 LOGICAL , PUBLIC, PARAMETER :: lk_tradmp = .FALSE. !: internal damping flag759 CONTAINS760 SUBROUTINE tra_dmp( kt ) ! Empty routine761 WRITE(*,*) 'tra_dmp: You should not have seen this print! error?', kt762 END SUBROUTINE tra_dmp763 SUBROUTINE tra_dmp_init ! Empty routine764 END SUBROUTINE tra_dmp_init765 #endif766 767 760 !!====================================================================== 768 761 END MODULE tradmp -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r2715 r2789 42 42 USE prtctl ! Print control 43 43 USE traqsr ! penetrative solar radiation (needed for nksr) 44 USE traswp ! swap array45 44 USE obc_oce 46 45 #if defined key_agrif … … 111 110 CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1. ) 112 111 ! 113 #if defined key_obc || defined key_bdy || defined key_agrif114 CALL tra_unswap115 #endif116 117 112 #if defined key_obc 118 113 IF( lk_obc ) CALL obc_tra( kt ) ! OBC open boundaries … … 123 118 #if defined key_agrif 124 119 CALL Agrif_tra ! AGRIF zoom boundaries 125 #endif126 127 #if defined key_obc || defined key_bdy || defined key_agrif128 CALL tra_swap129 120 #endif 130 121 … … 155 146 #if defined key_agrif 156 147 ! Update tracer at AGRIF zoom boundaries 157 CALL tra_unswap158 148 IF( .NOT.Agrif_Root() ) CALL Agrif_Update_Tra( kt ) ! children only 159 CALL tra_swap160 149 #endif 161 150 ! -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90
r2781 r2789 106 106 ! 107 107 CASE( 'TRA' ) ! Tracers 108 t2(ktrd) = SUM( ptrd2dx(:,:) * e1e2t(:,:) * fse3t(:,:,1) * t n(:,:,1) )109 s2(ktrd) = SUM( ptrd2dy(:,:) * e1e2t(:,:) * fse3t(:,:,1) * sn(:,:,1) )108 t2(ktrd) = SUM( ptrd2dx(:,:) * e1e2t(:,:) * fse3t(:,:,1) * tsn(:,:,1,jp_tem) ) 109 s2(ktrd) = SUM( ptrd2dy(:,:) * e1e2t(:,:) * fse3t(:,:,1) * tsn(:,:,1,jp_sal) ) 110 110 ! 111 111 END SELECT … … 184 184 s2(ktrd) = 0._wp 185 185 DO jk = 1, jpkm1 186 t2(ktrd) = t2(ktrd) + SUM( ptrd3dx(:,:,jk) * t n(:,:,jk) * e1e2t(:,:) * fse3t(:,:,jk) )187 s2(ktrd) = s2(ktrd) + SUM( ptrd3dy(:,:,jk) * sn(:,:,jk) * e1e2t(:,:) * fse3t(:,:,jk) )186 t2(ktrd) = t2(ktrd) + SUM( ptrd3dx(:,:,jk) * tsn(:,:,jk,jp_tem) * e1e2t(:,:) * fse3t(:,:,jk) ) 187 s2(ktrd) = s2(ktrd) + SUM( ptrd3dy(:,:,jk) * tsn(:,:,jk,jp_sal) * e1e2t(:,:) * fse3t(:,:,jk) ) 188 188 END DO 189 189 ! -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90
r2715 r2789 293 293 zavt = avt(ji,jj,ik) 294 294 tmltrd(ji,jj,jpmld_zdf) = - zavt / fse3w(ji,jj,ik) * tmask(ji,jj,ik) & 295 & * ( t n(ji,jj,ik-1) - tn(ji,jj,ik) ) &295 & * ( tsn(ji,jj,ik-1,jp_tem) - tsn(ji,jj,ik,jp_tem) ) & 296 296 & / MAX( 1., rmld(ji,jj) ) * tmask(ji,jj,1) 297 297 zavt = fsavs(ji,jj,ik) 298 298 smltrd(ji,jj,jpmld_zdf) = - zavt / fse3w(ji,jj,ik) * tmask(ji,jj,ik) & 299 & * ( sn(ji,jj,ik-1) - sn(ji,jj,ik) ) &299 & * ( tsn(ji,jj,ik-1,jp_sal) - tsn(ji,jj,ik,jp_sal) ) & 300 300 & / MAX( 1., rmld(ji,jj) ) * tmask(ji,jj,1) 301 301 END DO … … 334 334 tml(:,:) = 0.e0 ; sml(:,:) = 0.e0 335 335 DO jk = 1, jpktrd - 1 336 tml(:,:) = tml(:,:) + wkx(:,:,jk) * t n(:,:,jk)337 sml(:,:) = sml(:,:) + wkx(:,:,jk) * sn(:,:,jk)336 tml(:,:) = tml(:,:) + wkx(:,:,jk) * tsn(:,:,jk,jp_tem) 337 sml(:,:) = sml(:,:) + wkx(:,:,jk) * tsn(:,:,jk,jp_sal) 338 338 END DO 339 339 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90
r2715 r2789 101 101 CASE ( jptra_trd_zad ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_zad, ctype ) ! z- vertical adv 102 102 CALL trd_icp( ptrdx, ptrdy, jpicpt_zad, ctype ) 103 ! compute the surface flux condition wn(:,:,1)*t n(:,:,1)104 z2dx(:,:) = wn(:,:,1)*t n(:,:,1)/fse3t(:,:,1)105 z2dy(:,:) = wn(:,:,1)* sn(:,:,1)/fse3t(:,:,1)103 ! compute the surface flux condition wn(:,:,1)*tsn(:,:,1,jp_tem) 104 z2dx(:,:) = wn(:,:,1)*tsn(:,:,1,jp_tem)/fse3t(:,:,1) 105 z2dy(:,:) = wn(:,:,1)*tsn(:,:,1,jp_sal)/fse3t(:,:,1) 106 106 CALL trd_icp( z2dx , z2dy , jpicpt_zl1, ctype ) ! 1st z- vertical adv 107 107 END SELECT -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
r2715 r2789 131 131 !! coefficients using the GLS turbulent closure scheme. 132 132 !!---------------------------------------------------------------------- 133 USE oce, z_elem_a => ua ! use ua as workspace 134 USE oce, z_elem_b => va ! use va as workspace 135 USE oce, z_elem_c => ta ! use ta as workspace 136 USE oce, psi => sa ! use sa as workspace 133 USE oce , ONLY z_elem_a => ua ! use ua as workspace 134 USE oce , ONLY z_elem_b => va ! use va as workspace 135 USE oce , ONLY tsa ! use tsa as workspace 137 136 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 138 137 USE wrk_nemo, ONLY: zdep => wrk_2d_1 … … 152 151 REAL(wp) :: prod, buoy, diss, zdiss, sm ! - - 153 152 REAL(wp) :: gh, gm, shr, dif, zsqen, zav ! - - 153 REAL(wp), POINTER, DIMENSION(:,:,:) :: z_elem_c, psi 154 154 !!-------------------------------------------------------------------- 155 155 … … 157 157 CALL ctl_stop('zdf_gls: requested workspace arrays unavailable.') ; RETURN 158 158 END IF 159 ! 160 z_elem_c => tsa(:,:,:,1) 161 psi => tsa(:,:,:,2) 159 162 160 163 ! Preliminary computing -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
r2715 r2789 206 206 !! the equation number. (LMD94, here after) 207 207 !!---------------------------------------------------------------------- 208 #if defined key_zdfddm209 208 USE oce , zviscos => ua ! temp. array for viscosities use ua as workspace 210 USE oce , zdiffut => ta ! temp. array for diffusivities use sa as workspace 211 USE oce , zdiffus => sa ! temp. array for diffusivities use sa as workspace 212 #else 213 USE oce , zviscos => ua ! temp. array for viscosities use ua as workspace 214 USE oce , zdiffut => ta ! temp. array for diffusivities use sa as workspace 215 #endif 209 USE oce , zdiffut => va ! temp. array for diffusivities use sa as workspace 216 210 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, wrk_in_use_xz, wrk_not_released_xz 217 211 USE wrk_nemo, ONLY: zBo => wrk_2d_1, & ! Surface buoyancy forcing, … … 229 223 zblct => wrk_xz_2 ! diffusivities/viscosities 230 224 #if defined key_zdfddm 231 USE wrk_nemo, ONLY: zblcs => wrk_xz_3 225 USE wrk_nemo, ONLY: zdiffus => wrk_3d_1 226 USE wrk_nemo, ONLY: zblcs => wrk_xz_3 232 227 #endif 233 228 !! … … 270 265 REAL(wp), POINTER, DIMENSION(:,:) :: zdifs 271 266 REAL(wp), POINTER, DIMENSION(:) :: za2s, za3s, zkmps 272 REAL(wp) :: zkm1s267 REAL(wp) :: zkm1s 273 268 #endif 274 269 !!-------------------------------------------------------------------- … … 276 271 IF( wrk_in_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. & 277 272 wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11) .OR. & 273 wrk_in_use(3, 1) .OR. & 278 274 wrk_in_use_xz(1,2,3) ) THEN 279 275 CALL ctl_stop('zdf_kpp : requested workspace arrays unavailable.') ; RETURN … … 369 365 ! only retains positive value of rrau 370 366 zrrau = MAX( rrau(ji,jj,jk), epsln ) 371 zds = sn(ji,jj,jk-1) - sn(ji,jj,jk)367 zds = tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) 372 368 IF( zrrau > 1. .AND. zds > 0.) THEN 373 369 ! … … 418 414 DO ji = fs_2, fs_jpim1 419 415 IF( nn_eos < 1) THEN 420 zt = t n(ji,jj,1)421 zs = sn(ji,jj,1) - 35.0416 zt = tsn(ji,jj,1,jp_tem) 417 zs = tsn(ji,jj,1,jp_sal) - 35.0 422 418 zh = fsdept(ji,jj,1) 423 419 ! potential volumic mass … … 449 445 450 446 zthermal = zbeta * zalbet / ( rcp * zrhos + epsln ) 451 zhalin = zbeta * sn(ji,jj,1) * rcs447 zhalin = zbeta * tsn(ji,jj,1,jp_sal) * rcs 452 448 ELSE 453 449 zrhos = rhop(ji,jj,1) + rau0 * ( 1. - tmask(ji,jj,1) ) 454 450 zthermal = rn_alpha / ( rcp * zrhos + epsln ) 455 zhalin = rn_beta * sn(ji,jj,1) * rcs451 zhalin = rn_beta * tsn(ji,jj,1,jp_sal) * rcs 456 452 ENDIF 457 453 ! Radiative surface buoyancy force … … 462 458 wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* ro0cpr * tmask(ji,jj,1) 463 459 ! Surface salinity flux for non-local term 464 ws0(ji,jj) = - ( ( emps(ji,jj)-rnf(ji,jj) ) * sn(ji,jj,1) * rcs ) * tmask(ji,jj,1)460 ws0(ji,jj) = - ( ( emps(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal) * rcs ) * tmask(ji,jj,1) 465 461 ENDDO 466 462 ENDDO … … 543 539 ! zref = gdept(1) 544 540 zref = fsdept(ji,jj,1) 545 zt = t n(ji,jj,1)546 zs = sn(ji,jj,1)541 zt = tsn(ji,jj,1,jp_tem) 542 zs = tsn(ji,jj,1,jp_sal) 547 543 zrh = rhop(ji,jj,1) 548 544 zu = ( ub(ji,jj,1) + ub(ji - 1,jj ,1) ) / MAX( 1. , umask(ji,jj,1) + umask(ji - 1,jj ,1) ) … … 556 552 ! vertically integration over the upper epsilon*gdept(jk) ; del () array is computed once in zdf_kpp_init 557 553 DO jm = 1, jpkm1 558 zt = zt + del(jk,jm) * t n(ji,jj,jm)559 zs = zs + del(jk,jm) * sn(ji,jj,jm)554 zt = zt + del(jk,jm) * tsn(ji,jj,jm,jp_tem) 555 zs = zs + del(jk,jm) * tsn(ji,jj,jm,jp_sal) 560 556 zu = zu + 0.5 * del(jk,jm) & 561 557 & * ( ub(ji,jj,jm) + ub(ji - 1,jj,jm) ) & … … 567 563 END DO 568 564 #endif 569 zsr = SQRT( ABS( sn(ji,jj,jk) ) )565 zsr = SQRT( ABS( tsn(ji,jj,jk,jp_sal) ) ) 570 566 ! depth 571 567 zh = fsdept(ji,jj,jk) … … 1234 1230 ENDIF 1235 1231 1236 IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. 1237 wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11) .OR. 1238 wrk_not_released _xz(1,2,3) )&1239 CALL ctl_stop('zdf_kpp : failed to release workspace arrays')1232 IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. & 1233 wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11) .OR. & 1234 wrk_not_released(3, 1) .OR. & 1235 wrk_not_released_xz(1,2,3) ) CALL ctl_stop('zdf_kpp : failed to release workspace arrays') 1240 1236 ! 1241 1237 END SUBROUTINE zdf_kpp -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r2715 r2789 191 191 !! --------------------------------------------------------------------- 192 192 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released 193 USE oce , ONLY: zdiag => ua , zd_up => va , zd_lw => ta ! (ua,va,ta) used as workspace 193 USE oce , ONLY: zdiag => ua ! (ua,va) used as workspace 194 USE oce , ONLY: tsa ! (tsa) used as workspace 194 195 USE wrk_nemo, ONLY: imlc => iwrk_2d_1 ! 2D INTEGER workspace 195 196 USE wrk_nemo, ONLY: zhlc => wrk_2d_1 ! 2D REAL workspace 196 197 USE wrk_nemo, ONLY: zpelc => wrk_3d_1 ! 3D REAL workspace 197 ! 198 !! 198 199 INTEGER :: ji, jj, jk ! dummy loop arguments 199 200 !!bfr INTEGER :: ikbu, ikbv, ikbum1, ikbvm1 ! temporary scalar … … 208 209 REAL(wp) :: zzd_up, zzd_lw ! - - 209 210 !!bfr REAL(wp) :: zebot ! - - 211 REAL(wp), POINTER, DIMENSION(:,:,:) :: zd_up, zd_lw 210 212 !!-------------------------------------------------------------------- 211 213 ! … … 215 217 CALL ctl_stop('tke_tke: requested workspace arrays unavailable') ; RETURN 216 218 END IF 219 ! 220 zd_up => tsa(:,:,:,1) 221 zd_lw => tsa(:,:,:,2) 217 222 218 223 zbbrau = rn_ebb / rau0 ! Local constant initialisation … … 471 476 !! - avmu, avmv : now vertical eddy viscosity at uw- and vw-points 472 477 !!---------------------------------------------------------------------- 473 USE oce, ONLY: zmpdl => ua , zmxlm => va , zmxld => ta ! (ua,va,ta) used as workspace 478 USE oce, ONLY: zmpdl => ua ! ua used as workspace 479 USE oce, ONLY: tsa ! use tsa as workspace 474 480 !! 475 481 INTEGER :: ji, jj, jk ! dummy loop indices … … 477 483 REAL(wp) :: zdku, zpdlr, zri, zsqen ! - - 478 484 REAL(wp) :: zdkv, zemxl, zemlm, zemlp ! - - 485 REAL(wp), POINTER, DIMENSION(:,:,:) :: zmxlm, zmxld 479 486 !!-------------------------------------------------------------------- 487 ! 488 zmxlm => tsa(:,:,:,1) 489 zmxld => tsa(:,:,:,2) 480 490 481 491 ! !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r2715 r2789 320 320 CALL tra_bbc_init ! bottom heat flux 321 321 IF( lk_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 322 IF( l k_tradmp ) CALL tra_dmp_init ! internal damping trends322 IF( ln_tradmp ) CALL tra_dmp_init ! internal damping trends 323 323 CALL tra_adv_init ! horizontal & vertical advection 324 324 CALL tra_ldf_init ! lateral mixing -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/oce.F90
r2715 r2789 25 25 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rotb , rotn !: relative vorticity [s-1] 26 26 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivb, hdivn !: horizontal divergence [s-1] 27 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tb , tn , ta !: potential temperature [Celcius] 28 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sb , sn , sa !: salinity [psu] 29 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsb , tsn , tsa !: 4D T-S fields [Celcius,psu] 27 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tsb , tsn !: 4D T-S fields [Celcius,psu] 30 28 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rn2b , rn2 !: brunt-vaisala frequency**2 [s-2] 29 ! 30 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:), TARGET :: tsa !: 4D T-S trends fields & work array 31 31 ! 32 32 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rhd !: in situ density anomalie rhd=(rho-rau0)/rau0 [no units] … … 66 66 & rotb (jpi,jpj,jpk) , rotn (jpi,jpj,jpk) , & 67 67 & hdivb(jpi,jpj,jpk) , hdivn(jpi,jpj,jpk) , & 68 & tb (jpi,jpj,jpk) , tn (jpi,jpj,jpk) , ta(jpi,jpj,jpk) , &69 & sb (jpi,jpj,jpk) , sn (jpi,jpj,jpk) , sa (jpi,jpj,jpk) , &70 68 & tsb (jpi,jpj,jpk,jpts) , tsn (jpi,jpj,jpk,jpts) , tsa(jpi,jpj,jpk,jpts) , & 71 69 & rn2b (jpi,jpj,jpk) , rn2 (jpi,jpj,jpk) , STAT=ierr(1) ) -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/step.F90
r2715 r2789 23 23 !! 3.3 ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 24 24 !! - ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase + merge TRC-TRA 25 !! 3.4 ! 2011-04 (G. Madec, C. Ethe) Merge of dtatem and dtasal 25 26 !!---------------------------------------------------------------------- 26 27 … … 94 95 ! Update data, open boundaries, surface boundary condition (including sea-ice) 95 96 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 96 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data97 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data98 97 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 99 98 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries … … 107 106 108 107 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 109 ! Ocean physics update (ua, va, t a,sa used as workspace)108 ! Ocean physics update (ua, va, tsa used as workspace) 110 109 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 111 110 CALL bn2( tsb, rn2b ) ! before Brunt-Vaisala frequency … … 158 157 159 158 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 160 ! diagnostics and outputs (ua, va, t a,sa used as workspace)159 ! diagnostics and outputs (ua, va, tsa used as workspace) 161 160 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 162 161 IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats … … 185 184 IF( ln_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 186 185 IF( lk_trabbl ) CALL tra_bbl ( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 187 IF( l k_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends186 IF( ln_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 188 187 CALL tra_adv ( kstp ) ! horizontal & vertical advection 189 188 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 190 189 CALL tra_ldf ( kstp ) ! lateral mixing 191 190 #if defined key_agrif 192 CALL tra_unswap193 191 IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra ! tracers sponge 194 CALL tra_swap195 192 #endif 196 193 CALL tra_zdf ( kstp ) ! vertical mixing and after tracer fields … … 210 207 CALL tra_nxt( kstp ) ! tracer fields at next time step 211 208 ENDIF 212 CALL tra_unswap ! udate T & S 3D arrays (to be suppressed) 213 214 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 215 ! Dynamics (ta, sa used as workspace) 209 210 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 211 ! Dynamics (tsa used as workspace) 216 212 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 217 213 ua(:,:,:) = 0.e0 ! set dynamics trends to zero … … 250 246 251 247 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 252 ! Trends (ua, va, t a,sa used as workspace)248 ! Trends (ua, va, tsa used as workspace) 253 249 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 254 250 IF( nstop == 0 ) THEN -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r2528 r2789 17 17 USE daymod ! calendar (day routine) 18 18 19 USE dtatem ! ocean temperature data (dta_tem routine)20 USE dtasal ! ocean salinity data (dta_sal routine)21 19 USE sbcmod ! surface boundary condition (sbc routine) 22 20 USE sbcrnf ! surface boundary condition: runoff variables … … 92 90 USE prtctl ! Print control (prt_ctl routine) 93 91 94 USE traswp ! Swap arrays (tra_swp, tra_unswp routine)95 96 92 USE diaobs ! Observation operator 97 93 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r2528 r2789 108 108 ! !* Test minimum of salinity 109 109 ! ! ------------------------ 110 !! zsmin = MINVAL( sn(:,:,1), mask = tmask(:,:,1) == 1.e0 ) slower than the following loop on NEC SX5110 !! zsmin = MINVAL( tsn(:,:,1,jp_sal), mask = tmask(:,:,1) == 1.e0 ) slower than the following loop on NEC SX5 111 111 zsmin = 100.e0 112 112 DO jj = 2, jpjm1 113 113 DO ji = 1, jpi 114 IF( tmask(ji,jj,1) == 1) zsmin = MIN(zsmin, sn(ji,jj,1))114 IF( tmask(ji,jj,1) == 1) zsmin = MIN(zsmin,tsn(ji,jj,1,jp_sal)) 115 115 END DO 116 116 END DO … … 121 121 IF( zsmin < 0.) THEN 122 122 IF (lk_mpp) THEN 123 CALL mpp_minloc ( sn(:,:,1),tmask(:,:,1), zsmin, ii,ij )123 CALL mpp_minloc ( tsn(:,:,1,jp_sal),tmask(:,:,1), zsmin, ii,ij ) 124 124 ELSE 125 ilocs = MINLOC( sn(:,:,1), mask = tmask(:,:,1) == 1.e0 )125 ilocs = MINLOC( tsn(:,:,1,jp_sal), mask = tmask(:,:,1) == 1.e0 ) 126 126 ii = ilocs(1) + nimpp - 1 127 127 ij = ilocs(2) + njmpp - 1 -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90
r2749 r2789 73 73 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) , TARGET, PUBLIC :: wrk_3d_6 , wrk_3d_7 , wrk_3d_8 , wrk_3d_9 , wrk_3d_10 74 74 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) , TARGET, PUBLIC :: wrk_3d_11, wrk_3d_12, wrk_3d_13, wrk_3d_14, wrk_3d_15 75 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) , TARGET, PUBLIC :: wrk_3d_16, wrk_3d_17, wrk_3d_18, wrk_3d_19 75 76 76 77 ! !!** 4D, x-y-z-tra, REAL(wp) workspaces ** … … 169 170 ALLOCATE( wrk_3d_1 (jpi,jpj,jpk) , wrk_3d_2 (jpi,jpj,jpk) , wrk_3d_3 (jpi,jpj,jpk) , wrk_3d_4 (jpi,jpj,jpk) , & 170 171 & wrk_3d_5 (jpi,jpj,jpk) , wrk_3d_6 (jpi,jpj,jpk) , wrk_3d_7 (jpi,jpj,jpk) , wrk_3d_8 (jpi,jpj,jpk) , & 171 & wrk_3d_9 (jpi,jpj,jpk) , wrk_3d_10(jpi,jpj,jpk) 172 & wrk_3d_1 1(jpi,jpj,jpk) , wrk_3d_12(jpi,jpj,jpk) , wrk_3d_13(jpi,jpj,jpk) , wrk_3d_14(jpi,jpj,jpk) , &173 & wrk_3d_1 5(jpi,jpj,jpk), STAT=ierror(3) )172 & wrk_3d_9 (jpi,jpj,jpk) , wrk_3d_10(jpi,jpj,jpk) , wrk_3d_11(jpi,jpj,jpk) , wrk_3d_12(jpi,jpj,jpk) , & 173 & wrk_3d_13(jpi,jpj,jpk) , wrk_3d_14(jpi,jpj,jpk) , wrk_3d_15(jpi,jpj,jpk) , wrk_3d_16(jpi,jpj,jpk) , & 174 & wrk_3d_17(jpi,jpj,jpk) , wrk_3d_18(jpi,jpj,jpk) , wrk_3d_19(jpi,jpj,jpk) , STAT=ierror(3) ) 174 175 ! 175 176 ALLOCATE( wrk_4d_1(jpi,jpj,jpk,jpts) , wrk_4d_2(jpi,jpj,jpk,jpts), & -
branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
r2787 r2789 184 184 USE oce , ONLY : vn => vn !: j-horizontal velocity (m s-1) 185 185 USE oce , ONLY : wn => wn !: vertical velocity (m s-1) 186 USE oce , ONLY : tn => tn !: pot. temperature (celsius)187 USE oce , ONLY : sn => sn !: salinity (psu)188 186 USE oce , ONLY : tsn => tsn !: 4D array contaning ( tn, sn ) 189 187 USE oce , ONLY : tsb => tsb !: 4D array contaning ( tb, sb )
Note: See TracChangeset
for help on using the changeset viewer.