2017年4月26日水曜日

Generating PIOMAS_initialization.nc

 1014  vi namelist.piomas2naa 
 1015  ../bin/sosie.x -f namelist.piomas2naa 
 1016  vi namelist.piomas2naa 
 1017  ../bin/sosie.x -f namelist.piomas2naa 
 1019  ncks -h -A SIC_PIOMAS_1979_2013-naa_arlan.nc4 SIT_PIOMAS_1979_2013-naa_arlan.nc4 
 1021  mv SIT_PIOMAS_1979_2013-naa_arlan.nc4 PIOMAS_NAA_1979_2013.nc4
 1022  mv PIOMAS_NAA_1979_2013.nc4 ~/scratch/input_naa/hhayashi/piomas/
 1024  cdo seltimestep,1/1 ~/scratch/input_naa/hhayashi/piomas/PIOMAS_NAA_1979_2013.nc4 PIOMAS_initialization.nc
 1031  cdo chname,SIT,hicif PIOMAS_initialization.nc PIOMAS_initialization.nc2 
 1033  cdo chname,SIC,frld PIOMAS_initialization.nc2 PIOMAS_initialization.nc3 
 1041  ncap -s "frld2=1.-frld" PIOMAS_initialization.nc3 PIOMAS_initialization.nc4
 1043  ncks -x -v frld PIOMAS_initialization.nc4 PIOMAS_initialization.nc5
 1046  cdo chname,frld2,frld PIOMAS_initialization.nc5 PIOMAS_initialization.nc6
 1050  mv PIOMAS_initialization.nc6 ~/scratch/input_naa/hhayashi/piomas/PIOMAS_initialization.nc 

References:
https://code.zmaw.de/boards/1/topics/996 
http://research.jisao.washington.edu/data_sets/nco/#example5

2017年4月24日月曜日

ncdump anaconda


Solved: Not being able to use "ncdump"
 
Solution: Execute the following two commands: 
 
conda remove hdf4 hdf5 libnetcdf netcdf4
conda install -c conda-forge netcdf4 
 
Ref: https://github.com/spencerahill/aospy/issues/58

2017年4月19日水曜日

migrain aura

前々から気になっていた目の症状があって目のスペシャリストに見てもらったら

マイグレイン・オーラ

と診断された。

徹夜で仕事をし始めた学士論文ごろから起きるようになって

寝不足・コーヒー・チョコレートなども要因らしい。

目の病気だと思って心配していたのでよかった。

昨日の夜も9:30から30分ぐらい症状が出た。

起きるのは年に2〜3度。

日本語では 閃輝暗点(せんきあんてん)

というんだね。

2017年4月17日月曜日

LIM2 read air temperature to decide if snow or rain

CORE2で行くのでもう必要ないけどもしいつか必要になった時のために残しておくことにする。


2017年4月12日水曜日

random notes

one way to make existing "time" dimension to be "unlimited": 

cdo seltimestep,1/12 ifile ofile
 
where 1/12 is the first and last indices of your time record. 
Ref: https://code.zmaw.de/boards/1/topics/798


 1057  cdo seltimestep,1/1 sic_G10010_SIBT1850_v1.1-naa_icecon.nc4 sic.nc
 1058  cdo seltimestep,1/1 sit_G10010_SIBT1850_v1.1-naa_icecon.nc4 sic.nc
 1059  cdo seltimestep,1/1 sit_PIOMAS_1979_2013-naa_arlan.nc4 sit.nc 
Add all variables in sic.nc to sit.nc
 1062  ncks -h -A sic.nc sit.nc 
Remove time_counter dimension from the lists of dimensions and variables. 
 1065  ncwa -a time_counter sit.nc sit2.nc





Same names (labels) but different IDs for nodes in PyGraphviz:
 
add_node(1,label=A)
add_node(2,label=B)
add_node(3,label=A)
 
will create three nodes consisting of two As and one B. 
Ref: http://stackoverflow.com/questions/15711909/how-to-create-duplicate-nodes-in-pygraphviz


2017年4月9日日曜日

shaw memo

14 april --> internet 5.
phone disconnect --> immediately.
--> arris --> return to uptown branch.

固定電話とテレビとインターネットのプロバイダーはどこも高くてモノポリー化してるビクトリア :-(

2017年4月5日水曜日

interpolate woa13 no3 field onto NAA grid using SOSIE

I had little trouble interpolating the woa13 no3 data onto NAA grid. SOSIE was creating high values (first figure; set to the prescribed vmax of 100. in this plot) along the coast lines. I was not sure why, but what solved this issue was to change ldrown from F to T:

cf_lsm_in = 'missing_value' ! we use 'missing_value' of input field to determine
cv_lsm_in = ''                ! the land-sea-mask

ldrown    = F            ! we want to propagate sea values onto the land-sea mask


Here, the last line is modified as follows:

ldrown    = T 


Then the interpolation improved (second figure).

Furthermore, the interpolation is not too bad compared to the original file (third figure), although it may underestimate no3 in the beaufort region.

interpolated field with ldrown = F

interpolated field with ldrown = T

comparison between the original 1x1 degree data (left) and the interpolated data (right)

2017年4月3日月曜日

snow and ice melt rate

rdmsnif/rdt_ice is snow melt rate (m/s) averaged over ice covered area, and not over the entire grid cell. Otherwise the code below should include the coefficient "1-frld" in the last term:

limsbc_2.F90

!  computing freshwater exchanges at the ice/ocean interface
            zemp = + emp(ji,jj)     *         frld(ji,jj)      &   !  e-p budget over open ocean fraction 
               &   - tprecip(ji,jj) * ( 1. -  frld(ji,jj) )    &   !  liquid precipitation reaches directly the ocean
               &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  change in ice cover within the time step

               &   + rdmsnif(ji,jj) * r1_rdtice                    !  freshwater flux due to snow melting