Changeset 4927 for branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO
- Timestamp:
- 2014-12-01T10:09:19+01:00 (10 years ago)
- Location:
- branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90
r4765 r4927 77 77 z1_area = 1.d0 / MAX( glob_sum( area(:,:) * tms(:,:) ), epsi06 ) 78 78 79 zinda = MAX( 0. d0 , SIGN( 1.d0, glob_sum( area(:,:) * tms(:,:) ) - epsi06 ) )79 zinda = MAX( 0._wp , SIGN( 1._wp , glob_sum( area(:,:) * tms(:,:) ) - epsi06 ) ) 80 80 ! ----------------------- ! 81 81 ! 1 - Content variations ! … … 153 153 ! 3 - Diagnostics writing ! 154 154 ! ----------------------- ! 155 zindb = MAX( 0. d0 , SIGN( 1.d0, zbg_ivo - epsi06 ) )155 zindb = MAX( 0._wp , SIGN( 1._wp , zbg_ivo - epsi06 ) ) 156 156 ! 157 157 CALL iom_put( 'ibgvoltot' , zbg_ivo * rhoic * r1_rau0 * 1.e-9 ) ! ice volume (km3 equivalent liquid) -
branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r4765 r4927 301 301 302 302 IF(lwp) THEN 303 WRITE(numout,*) ,' ztests : ', ztests303 WRITE(numout,*) ' ztests : ', ztests 304 304 IF ( ztests .NE. 4 ) THEN 305 305 WRITE(numout,*) 306 WRITE(numout,*) ,' !!!! ALERT !!! '307 WRITE(numout,*) ,' !!!! Something is wrong in the LIM3 initialization procedure '306 WRITE(numout,*) ' !!!! ALERT !!! ' 307 WRITE(numout,*) ' !!!! Something is wrong in the LIM3 initialization procedure ' 308 308 WRITE(numout,*) 309 WRITE(numout,*) ,' *** ztests is not equal to 4 '310 WRITE(numout,*) ,' *** ztest_i (i=1,4) = ', ztest_1, ztest_2, ztest_3, ztest_4311 WRITE(numout,*) ,' zat_i_ini : ', zat_i_ini(i_hemis)312 WRITE(numout,*) ,' zht_i_ini : ', zht_i_ini(i_hemis)309 WRITE(numout,*) ' *** ztests is not equal to 4 ' 310 WRITE(numout,*) ' *** ztest_i (i=1,4) = ', ztest_1, ztest_2, ztest_3, ztest_4 311 WRITE(numout,*) ' zat_i_ini : ', zat_i_ini(i_hemis) 312 WRITE(numout,*) ' zht_i_ini : ', zht_i_ini(i_hemis) 313 313 ENDIF ! ztests .NE. 4 314 314 ENDIF -
branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
r4306 r4927 21 21 USE ice_2 22 22 # endif 23 # if defined key_cice 23 # if defined key_cice 24 24 USE ice_domain_size, only: ncat 25 25 #endif -
branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
r4689 r4927 90 90 area = glob_sum( e1e2t(:,:) ) ! interior global domain surface 91 91 ! 92 #if ! defined key_lim2 && ! defined key_lim3 && ! defined key_cice 92 #if ! defined key_lim2 && ! defined key_lim3 && ! defined key_cice 93 93 snwice_mass_b(:,:) = 0.e0 ! no sea-ice model is being used : no snow+ice mass 94 94 snwice_mass (:,:) = 0.e0 -
branches/2014/dev_CNRS_CICE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r4627 r4927 17 17 USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic 18 18 USE in_out_manager ! I/O manager 19 USE iom, only : iom_put ! I/O manager library !!Joakim edit 19 20 USE lib_mpp ! distributed memory computing library 20 21 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 23 24 USE daymod ! calendar 24 25 USE fldread ! read input fields 25 26 26 USE sbc_oce ! Surface boundary condition: ocean fields 27 27 USE sbc_ice ! Surface boundary condition: ice fields … … 38 38 USE ice_calendar, only: dt 39 39 USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen 40 # if defined key_cice4 40 41 USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow, & 41 42 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm, & … … 44 45 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl, & 45 46 swvdr,swvdf,swidr,swidf 47 USE ice_therm_vertical, only: calc_Tsfc 48 #else 49 USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow, & 50 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai, & 51 fresh_ai,fhocn_ai,fswthru_ai,frzmlt, & 52 flatn_f,fsurfn_f,fcondtopn_f, & 53 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl, & 54 swvdr,swvdf,swidr,swidf 55 USE ice_therm_shared, only: calc_Tsfc 56 #endif 46 57 USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf 47 58 USE ice_atmo, only: calc_strair 48 USE ice_therm_vertical, only: calc_Tsfc49 59 50 60 USE CICE_InitMod … … 149 159 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 150 160 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar 151 INTEGER :: ji, jj, jl 161 INTEGER :: ji, jj, jl, jk ! dummy loop indices 152 162 !!--------------------------------------------------------------------- 153 163 … … 160 170 ji_off = INT ( (jpiglo - nx_global) / 2 ) 161 171 jj_off = INT ( (jpjglo - ny_global) / 2 ) 172 173 #if defined key_nemocice_decomp 174 ! Pass initial SST from NEMO to CICE so ice is initialised correctly if 175 ! there is no restart file. 176 ! Values from a CICE restart file would overwrite this 177 IF ( .NOT. ln_rstart ) THEN 178 CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.) 179 ENDIF 180 #endif 162 181 163 182 ! Initialize CICE … … 218 237 snwice_mass_b(:,:) = 0.0_wp ! no mass exchanges 219 238 ENDIF 220 IF( nn_ice_embd == 2 .AND. & ! full embedment (case 2) & no restart : 221 & .NOT.ln_rstart ) THEN ! deplete the initial ssh belew sea-ice area 222 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 223 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 224 ! 239 IF( .NOT. ln_rstart ) THEN 240 IF( nn_ice_embd == 2 ) THEN ! full embedment (case 2) deplete the initial ssh below sea-ice area 241 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 242 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 243 #if defined key_vvl 244 ! key_vvl necessary? clem: yes for compilation purpose 245 DO jk = 1,jpkm1 ! adjust initial vertical scale factors 246 fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 247 fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 248 ENDDO 249 fse3t_a(:,:,:) = fse3t_b(:,:,:) 250 ! Reconstruction of all vertical scale factors at now and before time 251 ! steps 252 ! ============================================================================= 253 ! Horizontal scale factor interpolations 254 ! -------------------------------------- 255 CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' ) 256 CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' ) 257 CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' ) 258 CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' ) 259 CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' ) 260 ! Vertical scale factor interpolations 261 ! ------------------------------------ 262 CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W' ) 263 CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' ) 264 CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' ) 265 CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' ) 266 CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' ) 267 ! t- and w- points depth 268 ! ---------------------- 269 fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1) 270 fsdepw_n(:,:,1) = 0.0_wp 271 fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:) 272 DO jk = 2, jpk 273 fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk) 274 fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1) 275 fsde3w_n(:,:,jk) = fsdept_n(:,:,jk ) - sshn (:,:) 276 END DO 277 #endif 278 ENDIF 225 279 ENDIF 226 280 … … 375 429 376 430 ! Snowfall 377 ! Ensure fsnow is positive (as in CICE routine prepare_forcing) 431 ! Ensure fsnow is positive (as in CICE routine prepare_forcing) 432 CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit 378 433 ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0) 379 434 CALL nemo2cice(ztmp,fsnow,'T', 1. ) 380 435 381 436 ! Rainfall 437 CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit 382 438 ztmp(:,:)=fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 383 439 CALL nemo2cice(ztmp,frain,'T', 1. ) … … 524 580 ENDIF 525 581 582 #if defined key_cice4 526 583 CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 527 584 CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 585 #else 586 CALL cice2nemo(fresh_ai,ztmp1,'T', 1. ) 587 CALL cice2nemo(fsalt_ai,ztmp2,'T', 1. ) 588 #endif 528 589 529 590 ! Check to avoid unphysical expression when ice is forming (ztmp1 negative) … … 535 596 sfx(:,:)=ztmp2(:,:)*1000.0 536 597 emp(:,:)=emp(:,:)-ztmp1(:,:) 537 598 fmmflx(:,:) = ztmp1(:,:) !!Joakim edit 599 538 600 CALL lbc_lnk( emp , 'T', 1. ) 539 601 CALL lbc_lnk( sfx , 'T', 1. ) … … 557 619 ! Now add in ice / snow related terms 558 620 ! [fswthru will be zero unless running with calc_Tsfc=T in CICE] 621 #if defined key_cice4 559 622 CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 623 #else 624 CALL cice2nemo(fswthru_ai,ztmp1,'T', 1. ) 625 #endif 560 626 qsr(:,:)=qsr(:,:)+ztmp1(:,:) 561 627 CALL lbc_lnk( qsr , 'T', 1. ) … … 567 633 ENDDO 568 634 635 #if defined key_cice4 569 636 CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 637 #else 638 CALL cice2nemo(fhocn_ai,ztmp1,'T', 1. ) 639 #endif 570 640 qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 571 641 … … 713 783 IF( kt == nit000 ) THEN ! First call kt=nit000 ! 714 784 ! ! ====================== ! 785 ! namsbc_cice is not yet in the reference namelist 786 ! set file information (default values) 787 cn_dir = './' ! directory in which the model is executed 788 789 ! (NB: frequency positive => hours, negative => months) 790 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! landmask 791 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! file 792 sn_snow = FLD_N( 'snowfall_1m' , -1. , 'snowfall' , .true. , .true. , ' yearly' , '' , '' , '' ) 793 sn_rain = FLD_N( 'rainfall_1m' , -1. , 'rainfall' , .true. , .true. , ' yearly' , '' , '' , '' ) 794 sn_sblm = FLD_N( 'sublim_1m' , -1. , 'sublim' , .true. , .true. , ' yearly' , '' , '' , '' ) 795 sn_top1 = FLD_N( 'topmeltn1_1m' , -1. , 'topmeltn1' , .true. , .true. , ' yearly' , '' , '' , '' ) 796 sn_top2 = FLD_N( 'topmeltn2_1m' , -1. , 'topmeltn2' , .true. , .true. , ' yearly' , '' , '' , '' ) 797 sn_top3 = FLD_N( 'topmeltn3_1m' , -1. , 'topmeltn3' , .true. , .true. , ' yearly' , '' , '' , '' ) 798 sn_top4 = FLD_N( 'topmeltn4_1m' , -1. , 'topmeltn4' , .true. , .true. , ' yearly' , '' , '' , '' ) 799 sn_top5 = FLD_N( 'topmeltn5_1m' , -1. , 'topmeltn5' , .true. , .true. , ' yearly' , '' , '' , '' ) 800 sn_bot1 = FLD_N( 'botmeltn1_1m' , -1. , 'botmeltn1' , .true. , .true. , ' yearly' , '' , '' , '' ) 801 sn_bot2 = FLD_N( 'botmeltn2_1m' , -1. , 'botmeltn2' , .true. , .true. , ' yearly' , '' , '' , '' ) 802 sn_bot3 = FLD_N( 'botmeltn3_1m' , -1. , 'botmeltn3' , .true. , .true. , ' yearly' , '' , '' , '' ) 803 sn_bot4 = FLD_N( 'botmeltn4_1m' , -1. , 'botmeltn4' , .true. , .true. , ' yearly' , '' , '' , '' ) 804 sn_bot5 = FLD_N( 'botmeltn5_1m' , -1. , 'botmeltn5' , .true. , .true. , ' yearly' , '' , '' , '' ) 805 715 806 REWIND( numnam_ref ) ! Namelist namsbc_cice in reference namelist : 716 807 READ ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901)
Note: See TracChangeset
for help on using the changeset viewer.