2017年3月14日火曜日

iceno3 initialization problem

Issue: iceno3 was initialized to a spatially uniform value defined in PISCES/trcini_pisces.F90. This is not what we want. Later, PISCES jpno3 is updated by initialized by WOA data, which is what we want iceno3 to be initialized with.

Here is to show that iceno3 was initialized to a spatially uniform value across the domain:

 iceno3 initialized to:    31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000
   31.0400000000000        31.0400000000000        31.0400000000000


Here is to show that initialization of my_trc tracers is done before pisces tracers are updated with input data (trcini.F90):


      IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model
      IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers
      IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer
      IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers

      IF( lwp ) THEN
         !
         CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
         !
      ENDIF

      IF( ln_trcdta )      CALL trc_dta_init


      IF( ln_rsttr ) THEN
        !
        CALL trc_rst_read              ! restart from a file
        !
      ELSE
        !
        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping
            !
            CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )    ! Memory allocation
            !
            CALL trc_dta( nit000, ztrcdta )   ! read tracer data at nit000
            !
            DO jn = 1, jptra
               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
                  jl = n_trc_index(jn)
                  trn(:,:,:,jn) = ztrcdta(:,:,:,jl) * tmask(:,:,:)
               ENDIF
            ENDDO
            CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )
        ENDIF
        !
        trb(:,:,:,:) = trn(:,:,:,:)
        !
      ENDIF
I tried to add the following line just before the second last "ENDIF" statement above:

iceno3(:,:)=trn(:,:,1,jpno3)

However, the compilation error occurred which appears to be related to the ordering:

No rule to make target `trc_sms_my_trc.o', needed by `trcini.o'.

Thus, I had to instead initialize the ice BGC tracers in trcsms_my_trc.F90 instead of trcini_my_trc.F90 as follows:

      IF( kt == nit000 ) THEN
       IF( .NOT. ln_rsttr .AND. ln_trcdta ) THEN
        icedia(:,:) = trn(:,:,1,jpdia)
        write(numout,*) "iceno3 before is: ",iceno3
        iceno3(:,:) = trn(:,:,1,jpno3)
        write(numout,*) "iceno3 after is: ",iceno3
        icenh4(:,:) = trn(:,:,1,jpnh4)
       END IF
      END IF

The output from WRITE statements prove that the values have changed:

 iceno3 before is:   0.000000000000000E+000  0.000000000000000E+000
  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
   31.9878976156660        31.0438701002330        31.0369201106744
   31.0369205118954        31.0383482948276        31.0616767301434
   31.0677629528971        31.0492132090291        31.0419920432535
   31.0440657798248        31.0444710620824        31.0447721884932
   31.0375292688435        31.0382076116362        31.0373801558268
   31.0398029146832        31.0397625744607        31.0331636088933
   31.0327651221495        31.0220553651313        31.0230092701832
   31.0342232771140        31.0552545248760        31.0397772061968
   31.0473470388971        31.0546418640872        31.0543800885964


 iceno3 after is:   0.000000000000000E+000  6.051918107557494E-007
  6.110130904164567E-007  6.165130718275732E-007  6.223610345536756E-007
  6.282784081119133E-007  6.347854462720852E-007  6.416655223934390E-007
  6.425374792240063E-007  6.518916947527300E-007  6.615196029420712E-007
  6.710462543721832E-007  6.779537599405078E-007  6.832150836929839E-007
  1.485887675109245E-002  0.101301152128998       0.192842913115538
  0.288261717144609       0.410586225212846       0.567104111609461
  0.750865673296165       0.954964841291094        1.17256469087027
   1.39693899756850        1.62147709851657        1.83974371937518
   5.90219173052099        5.72045383050733        5.52942332795475
   5.33964213875681        5.16237601645325        4.98851212702143
   4.79097327138552        4.58829697326475        4.38163145548577
   4.17732627934004        3.98400314182262        3.81032497675204
   3.66491610553454        3.57114941381793        3.59987527391656

Although this may not be the best method (i.e. IF statement if not desirable for fast computing), this is it for now.

limitation terms


mixed layer depth calculation based on TKE


#    if x == 0: # MLD based on TKE criterion (steiner&denman 2008)
#        depfull=squeeze(ncfile.variables['z'])
#        tke=squeeze(ncfile.variables['tke'])
#        tke1d=zeros(len(time))
#        for y in range(len(time)):
#            tke1d[y]=depfull[where(tke[y,:]<1e-5)[0][-1]]+0.5
#        plot(time_mean,mod_mean(tke1d,dt),'w',label='MLD')

コーディングメモ

ツイッターをやめたのでまた頻繁にブロガーを更新していくことにする。ほぼ備忘録だけども。

bugabooでnemoをコンパイルすると deprecatedのどうのこうのメッセージが出てきとったけどなんかわからんかったけど

mpif90の-i4というフラッグを外したら解消された。詳細は不明。

しかしまだ以下の意味のわからんエラーが出てくる:

error #6366: The shapes of the array expressions do not conform.   [ICEDMSPD]
        icedmspd(ji,jj) = icedmspd(ji,jj) &
--------^

前までは問題なかったとけど、

lim_lig
lim_ice
lim_nut

をアウトプットとしようとコードを書き換えてる段階で出てきた。


2017年3月7日火曜日

Root canalで$2000 T_T

Root canalの治療費負担額等。

右上奥から3ばん目の歯の神経が死んでしまったようなので取り除かなければいけないと診断されたんだけど、その治療費が半端ない。

$2000。。。

そして大学院生の医療保険でどれくらいカバーされるか調べてもらったところ

$0 。。。

通常、というか年間保険負担額は歯関係の治療の場合、上限$750らしく、最近その上限を超えてしまったらしい。なので来年の1月1日まで保険負担額ゼロだと。

どうしよう。ほっといたら死んでしまった神経が腐敗していって体の中に菌が入っていく可能性がある。来年まで待てば$2000の70%までカバーしてもらえるのかな。つまりおそらく$600で治療してもらえるはず。

TAで今学期稼いだ金が$2000ちょっとなのでそれが全部歯の神経に飛ばされていくぅ〜。お金はたまりませぬな。しかし健康ならいいか。