Saturday, August 11, 2018

Research Note #15 - Opening MODIS Sinusoidal Coordinate System Data Products with GrADS

In the previous post, I've described how to open a MODIS data which uses geographic lon-lat coordinates. The real problem is, most of MODIS products use sinusoidal coordinate system/projection, and of course, this will present a problem for tools such as GrADS which only supports gridded coordinates system. Well, this is quite tricky, but we actually can still open data with sinusoidal coordinate with GrADS, with a help from other tool. For this case, the help comes from MODIS Reprojection Tool (MRT).

The main reason to use MRT is simply straightforward: to convert the sinusoidal coordinates into geographic coordinates, hence enabling GrADS to open the data afterwards. The rest of the process is basically the same with opening MODIS data with geographic coordinates.  And of course, if you are confident, you can also convert the coordinate/projection by making a program with Fortran or C instead of using MRT.

Step 1: Downloading and Installing the MRT
You can get MRT freely from this website. Please be aware though, that you have to register/login to the website before downloading it. After logging in, download the installer package which is suitable for your platform/OS. For example, since I'm using Windows, I downloaded the Windows NT+32 bit package. 

I would not explain how to install it, thus don't forget to download and read the manual (it's on the same web page) because it covers every information you need to install and running the MRT. One of the most important thing is, you will need JAVA installed in your system before installing MRT. Also, if you update JAVA after installing MRT, you should modify the tool's path because the installer will need the exact path of current JAVA installation. Otherwise, you could also re-install MRT after  updating JAVA.

Step 2: Converting the data coordinates with MRT
Once you install the tool, run it, and open a MODIS data with sinusoidal projection. For this example, I will use MODIS Terra/Aqua combined Leaf Area Index/FPAR 8-daily with 500m spatial resolution, or in short, MCD15A2H. You will then see something like this:


Next, on 'Selected Bands', choose the variables you would like to save in the converted data (with geographic projection). For example, I chose Fpar_500m and Lai_500m only. Next, specify the out file name and location on 'Specify Output File' section e.g. 'test.hdf'. Then choose HDFEOS on 'Output File Type', Bilinear on 'Resampling Type', and Geographic on 'Output Projection Type'. Lastly, put 0.005 on 'Output Projection Type'. 


Once again, this is just an example and you can actually choose the options which meet your needs. For example, you want to use 'Nearest Neighbor Resampling' instead of 'Bilinear', or '0.05' instead of '0.005' for the output pixel, it's completely fine. The most important thing is, don't forget about your chosen output pixel size, in this case, 0.005 degree. Once you finish with the configurations, hit the 'Run' button.

A status window will then appear and show the progress of conversion process. Wait until it finished converting the data. Once finished, take a look at the status windows, especially for the 'Output Image Info' section, because that part contains the dimension of the new data with geographic projection which will be needed for creating GrADS ctl file.


Step 3. Creating GrADS ctl file and opening the data
Once you finish with the projection conversion, the next steps should be very easy, because you just have to open the new-created geographic projected data with GrADS, which has exactly the same procedure with what I have described in my previous post. This is an example of the GrADS ctl file based on the information we got from the MRT status window:

DSET ^test.hdf
title MODIS LAI
DTYPE hdfsds
OPTIONS yrev 
undef 255
XDEF 4420 linear 69.282032222000 0.005
YDEF 2000 linear 30.000000000000 0.005
ZDEF 1 linear 1 1
TDEF 100 linear 02dec2016 8dy
VARS 2
Fpar_500m=>fpar 0 y,x Fpar
Lai_500m=>lai 0 y,x lai 
ENDVARS  

Finally, open the data using GrADS, and you can expect something like this:

> open test.ctl
> set display color white
> clear
> set gxout shaded
> d fpar
> cbarn


It's not difficult, is it? Anyway, before working with any kinds of dataset, I suggest you to check the documentation of the data in order to understand the dimensions, variables and any parameters of the products.

Friday, August 10, 2018

Research Note #14 - Opening MODIS Land Cover Data MCD12C1 with GrADS

MODIS is probably one of the best instruments ever created in the history of remote sensing. MODIS data products have been widely used in various multi-discipline studies, including atmospheric and environmental sciences. One of the data which is frequently utilized in such studies is MODIS land cover products. This time I would like to share how to open MODIS land cover product using GrADS. Nevertheless, of course we can open it with other software such as HDFView, ArcGIS or even Matlab. Anyway, since I have been studying atmospheric science for almost two decades and getting used to work with GrADS, I prefer to use the tool for such purpose.

Firstly, keep in mind that the data I used is MODIS Terra/Aqua combined land cover product yearly global or in short, MCD12C1, with 0.05 spatial resolution. You can read the detail description of the data product on this page. The point is, this data use HDF-EOS format and geographic lon-lat coordinate system which are fully supported by GrADS. MCD12C1 is quite special, because it uses geographic coordinate system instead of sinusoidal coordinate as many others MODIS products. By the way, I will make another post about opening products with such coordinate system in the near future.

Step 1: Checking the metadata
As any other self-describing data files (SDF), the first most important thing to do is checking the metadata or header, in order to get the information about its dimensions such as grid numbers, resolution and variables/parameters stored inside the data. We can easily do this by checking the product page, dumping the HDF file or using tools such as HDFView. For MCD12C1, these are the most important information we need:
  • Grid numbers (x,y,z): 7200x3600x1 --> z=1 because it's a surface data 
  • Starting longitude or left-most coordinate point: -180
  • Starting latitude or bottom-most coordinate point: -90 
  • Spatial resolution: 0.05 degree
  • Variables: Majority_Land_Cover_Type_1 etc (read the product page/dump for more details).
  • Undefined values: none or fill value (255)
MODIS data dimensions and variables/fields checked with HDFView

Step 2: Making GrADS descriptor/control (ctl) file
I previously made a post about how to open NetCDF file using GrADS ctl file and it actually could also be applied for HDF file. If this is the first time for you to open an SDF file using GrADS ctl , I suggest you to read that post first, and then return to this post. If you are good, now, create a text file using your favorite text editor and write the following entries in it:

DSET ^MCD12C1.A2016001.006.2018031200421.hdf
title MODIS Land Cover
DTYPE hdfsds
OPTIONS yrev
UNDEF 255
XDEF 7200 linear -180 0.05
YDEF 3600 linear  -90 0.05
ZDEF 1 linear 1 1
TDEF 1 linear 04jul2001 1dy
VARS 2
Majority_Land_Cover_Type_1=>Landcov1 0 y,x Landcover Type 1
Majority_Land_Cover_Type_2=>Landcov2 0 y,x Landcover Type 2
ENDVARS

For example above, I would like to open 2 variables only. You can list as many variables as you like in the ctl file. Please note that for the TDEF, you can state any dates you want because it's a single yearly data. Of course, it will be a different story if you want to open multiple data. Also, don't forget to put 'yrev' option because MODIS uses reversed geographic coordinates, otherwise the grid points will be reversed (south to north, and vice versa).

For the undefined value, use 255, because it's just a single fill value other than the main data. Of course you can also omit this if you want to show it on GrADS.

Name the ctl file, for example: mcd12c1.ctl

Step 3: Open the data with GrADS
Next, you can just open the data with GrADS as you normally do with an ordinary binary file.

> open mcd12c1.ctl
> set display color white
> set gxout shaded
> d Landcov1
> cbarn


Easy isn't it? Hope that helps you to work with MODIS land cover data :-)

Wednesday, June 13, 2018

Gunpla #37 - HGUC Efreet Nacht Review



I fell in love with this mobile suit from the first time I saw its promotional poster on internet. I've never known Efreet Nacht since I don't play Battle Field Record 0081, the game which it came from. However, one thing is certain for sure: it's totally cool! Probably one of the coolest Zeon grunt mobile suits, on par with Jesta from Feddies side. Therefore, I couldn't hold myself for a pre-order when Bandai announced it would be released as P-bandai.


It's basically an Efreet (which will be also released as p-bandai), but with a slight twist on the design. It attires much darker color scheme from the original, with additional armors on the shoulders, arms and thighs. Outer sides of the legs also equipped with additional armor and thrusters, while there are more spikes on the shoulder armors. Anyway, the armaments should be the one which differentiate it from other Efreet variants. Instead of twin heat blades or knives, the Nacht is equipped with 4 kunais (or Cold kunais, to be more precised) and one badass Cold Sword. It also has hidden machine gun under the left arm guard. Rather than a samurai equipped with Katana, the Nacht strictly resembles a ninja with its ninja-to, kunais and color scheme.


There's nothing too special for the assembly, except the polycaps. This kit use very few polycaps, which made me quite anxious since HG kits heavily depend on polycaps for their joints articulation. There are no markings and only two sticker comes with this kit, for mono-eye and upper parts of the feet. This kit also lacks hands other than two standard closed hands for holding the weapons. The sword also need to be painted since it just comes with standard grey color (and I don't complain since it's a HG). 


Nevertheless, the finished kit was looked awesome, with slight color separation on some parts of the body. The articulation however, was limited (ironically) because of the extra armors, in particular over the thighs. Also, since it lacks polycaps, the hands were easily popping-out from the arms after being posed several times. I had difficult times to pose it using its two arms without making the hand pops-out.


One more thing I noticed after finished building this kit was the spare parts. Bandai includes some spare parts from the previous Efreet Custom with Nacht. It's nice since we may have options with some parts of the body, however, what irked me the most was, they were not complete. For example, the missile launcher (from Efreet custom) lacks the back side parts, hence we should modify it more (using putty or pla plate) to make the launcher.


The verdict, for a p-bandai, this kit is really cool and worth the money. There are some aspects however, which are the cons of it: lacks of marking, polycaps, accessories and limited articulation. In the end, this is still one of my favorite Zeon suits, and I plan to customize it in the future.

-------------------------------

MS-08TX/N Efreet Nacht

Pros:
  • Cool ninja theme and color separation
  • Nice weapons set
  • Lots of spare parts from Efreet Custom
Cons:
  • Limited articulation due to extra armors and lacks of polycaps
  • Lacks of marking and extra hands
  • Some of the spare parts are not complete

Friday, May 25, 2018

Gunpla #36 - HGGO Heavy Gundam Review


Looks like I have a fetish with gundams of HG origin line. This time, another long awaited kit: P-Bandai HG Heavy Gundam. This kit is one of the most anticipated HG kits of 2018, alongside Blue Destiny Unit 3 and Gundam Ground Type. Not only because it's the first time for the Heavy Gundam to be released as HG, but also because the origin version treatment it received compared to its MG counterpart.



From the outside, the kit looks no different with the previously released Gundam Local Type (LT) and FSD from the same line. It sports the same black color scheme and basically same markings, hence many assumes that this kit is just a retool of the LT/FSD. However, once you start building it, you will realize that Heavy Gundam kit is completely different from LT/FSD. The building steps are different, for almost all parts, the torso, arms, feet, waist and even for the head. At least 70% parts are new. 



Heavy gundam has new joint systems for the head, arms, waist and crotch areas. This new joints provide much wider articulation than any gundam kits released in HG origin. One which could be easily seen is the waist, which provide crouching gimmick to the kit while the crotch joint system makes the kit be able to kneel in more natural way.





Another thing to be noticed is the design aesthetics itself. While it's different, no one can deny that Heavy Gundam has resemblance with RX-78-02 Gundam in many ways. Interestingly, I found several things which might be an indication that Bandai will released RX-78-02 in the near future. For example, an unused peg hole on the back skirt of Heavy Gundam. It's obviously made as a connector for something. So why it's unused? Because Heavy Gundam doesn't have weapon to be attached on its back skirt. So, why does the peg hole exist? Probably it was made for another mobile suit which has weapon attached on its back skirt, for exampe, Bazooka. And what is another gundam which has bazooka attached on its backskirt? RX-78-02! Binggo!




In contrast with another gundams released previously, Heavy Gundam's backpack becomes one with the torso, or we can say that it's actually doesn't have backpack. Just a torso equipped with thrusters at the back. Thus, it might be a little strange if the shoulder cannon is built as the part of the torso. Another weird thing is the ankle armors. Unlike LT/FSD, the ankle armors have articulation since they have joints connected to the shin parts of the leg. Strangely, they're connected to the shin through ball joints! While it may looks weird, thanks to the ball joints, the ankle armors could be now moved freely.



The last things I would like to mentioned are the accessories. Heavy Gundam comes with an FSD shield, a special beam rifle, 2 beam saber effects with only 1 hilt and lastly, a bigass flame launcher. I don't consider the shoulder cannon as accessories since it becomes the part of torso. The flame launcher is big ... and HEAVY. It has a small compartment for the gundam's right hand placement while using the weapon. The special beam rifle on the other hand, just an ordinary beam rifle. Story wise, the beam rifle is actually the proper beam rifle used by Gundam FSD. So, if you've already had FSD and Long-range beam rifle prototype, now you accessories are now complete.



The marking stickers are more and less similar with FSD or LT. The only annoying things are the small stickers wrapping hands and legs. The quality is basically the same with previous Gundams. Nothing so special here.

So, now the conclusion: should you buy it? I would like to say yes, because compared to the previous gundam release of origin line, Heavy Gundam build is almost completely new, and it's a badass kind of gundam. The articulation is so amazing, although I could say that it's still not in the same level as HGUC revive kits.

-------------------

FA-78-2 Heavy Gundam

Pros:
  • New design and engineering, not a mere retooled kit from previous HGGO Gundams
  • Badass weapon and accessories
  • Improved articulation from Gundam Local Type/FSD
Cons:
  • Almost nothing ... probably the weird ankle armor connector and overall same markings with Gundam local type/FSD             

Monday, May 7, 2018

Gunpla #35 - HGGO Gundam FSD + Long-range Beam Rifle Prototype Review


This kit is basically an upgrade of Gundam Local Type North American Version. If you check the package, it's obvious that Bandai just added one extra runner for the mini gattling gun, big shield, ammo drum and some body parts. The rest of the accessories are from local type. It's quite a greedy business strategy by Bandai, since they just provide the original beam rifle with Heavy Gundam which is a p-bandai, and long-range beam rifle which is a special-limited bonus from Gundam Ace manga magazine.


Since this kit is actually identical with local type (except for the chest and waist parts), I won't talk about articulation. Anyway, one of the best reason to buy this kit is probably the spare parts. You'll get ALL part and accessory from the local type, which means, you can choose making gundam FSD, original local type or the north american type, or if you can also mash those kits as you like. Unfortunately, the sticker decals are just enough for the new parts of FSD, thus you can't add some markings for the extra parts/accessories.


Now, let's talk about the gun. Not the puny machine gun of local type, but that BIG long-range beam rifle prototype from Gundam Ace magazine. The weapon is one of the original weapons of FSD as depicted on Origin MSD manga, and it's designed by the famous Katoki Hajime.




That big beam rifle had two barrels and could be extended (if you buy more than 1 magazine, of course). It also could switch into a kind of ordinary beam rifle and beam 'pistol' if you remove the barrels. The gun also has attachment for the backpack and shield (the one with stance).


It's a badass big gun, but as you may expect, it's also heavy, and that means, it will be hard to pose  the gun with the gundam kit. I found the flimsy hands of HG kits (not just FSD) were struggling to hold the gun properly, especially for the trigger handle. Luckily, there's an option to move handle to the back side of the gun, hence making it easier for posing. Furthermore, the mini gattling gun is on the way while posing the big gun, thus it's better to detach the gattling gun before putting the long range beam rifle.






Overall, I'm quite satisfied with these kits, and I recommend it for everybody who wants to try the HG kits from the Origin series. If you're confused to choose between FSD, local type or north american local type, I suggest you to choose FSD since you'll get all parts from the previous gundams to make either one of them, or a custom one.

--------------

RX-78-01 [FSD]

Pros:
- All parts from previous gundams included
- Badass color scheme and markings

Cons:
- The original weapons are limited release (p-bandai and gundam ace magazine)